spec(draft): reduce required hook context (proposal and implementation) #270
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.53) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.53 · 544 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.377
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #270"
general
weight: 0.35
MohammadHaroonAbuomar
<!-- copilot-assessment:v1 -->
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
7aaa64474ba8b5b1e46f08079b42b733e5a7aa05| Dimension | Assessment | Rationale |
|---|---|---|
| Change confidence | 8.5/10 | ↑ Local .NET restore, format check, warnings-as-errors build, 101 required tests, and 211 draft tests pass.<br>↑ Fork and upstream CI pass, including .NET cross-platform, schema generation, draft tests, and SDK checks.<br>↑ Released
spec/0.1/andconformance/0.1/remain unchanged.<br>↓ Shared CTK vectors AH-CTK-001/003 still assert the removedcontext.sequence; .NET identifies them as stale rather than rewriting the shared suite. |<!-- /copilot-assessment -->
Summary
Combines the required-context proposal and its draft schema implementation (previously split across CaitieM20/agent-hooks#16 and CaitieM20/agent-hooks#18 on the fork).
Re-evaluate common hook context so implementers do not have to invent values that their execution layer cannot meaningfully provide:
sequence,agent.id,agent.name,session.,tenant.,actor.,budgets., and the unusedActorKindenum. No separate identity object, token field, or replacement claims are introduced.spec,interception_point,timestamp,agent.framework, optionalagent.version, and optional trace identifiers. Framework/version describe the invoking runtime; runtime and trace metadata are not authentication or authorization evidence.extensionsremains onHooksRequest; budgets remain an extension concern without a defined namespace in this change.session_idandsequencefrom the draftInterceptionRecordas well, rather than inventing host-assigned substitutes.Included implementation
docs/proposals/P-270-hooks-required-context.md.jcs-sha256projection changes for every draft context becauseagent.id,session.id, andsequenceno longer participate.spec/0.1/andconformance/0.1/remain unchanged. Authentication integration, token profiles, and configured hook failure handling are not redesigned here..NET SDK migration and remaining follow-up
The .NET SDK and its tests now match the reduced draft context.
RecordHostFailureno longer acceptssessionIdorsequence; emitted records no longer carry those fields. The reference harness stamps only the required context, and context identity no longer requiressequence.Draft CTK vectors AH-CTK-001 and AH-CTK-003 still assert
context.sequence. The .NET conformance suite records them as stale for that specific reason; the shared vectors were left unchanged to avoid expanding this focused PR across SDK conformance fixtures. The docs-site record guide and other handwritten SDK adaptations remain follow-up work.Open design considerations
session_id/sequence, the draft no longer defines a total audit order or session-level record correlation. Timestamp and optional trace remain; a replacement mechanism or record-sink responsibility is not defined here.Checks
dotnet restore,dotnet format --no-restore --verify-no-changes, anddotnet build --no-restore -warnaserrorpass.check-file-headers.pypasses (184 files checked); released 0.1 spec and conformance files are unchanged.