[AAASM-5086] ✨ (aa-api): Canonical verdict enum + enriched decision record (schema + ADR)#1697
Conversation
…ion record Freezes the 5-way runtime verdict vocabulary (allow/narrow/scrub/pending/deny) and the enriched per-decision record shape gating the Bucket-B backend program (Epic AAASM-5082). Records a decision-capture plan for the hot-path instrumentation a follow-up would need (verdict derivation, latency measurement, trace_id propagation), explicitly flagged as requiring sign-off. Refs AAASM-5086. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Freezes the canonical runtime verdict vocabulary (allow/narrow/scrub/pending/ deny, ADR 0018) as a distinct type from the proto Decision wire enum and the capability-matrix Decision — neither of which can express narrow/scrub. Includes wire-form + distinctness unit tests. No decision-time derivation is implemented; that is the ADR-0018-gated hot-path follow-up. Refs AAASM-5086. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extends the existing GET /api/v1/agents/{id}/decisions record (AAASM-5058) with
nullable `verdict` (RuntimeVerdict) and `traceId` fields, joining the already
present nullable `latencyMs` and `matchedPolicy`. Registers RuntimeVerdict in the
OpenAPI schema and regenerates openapi/v1.yaml + the dashboard codegen; this is a
schema extension of an existing path — 0 new paths (count stays 71).
Both new fields return null: capturing them requires enforcement-hot-path
instrumentation, the ADR-0018-gated follow-up. Read-side/schema only — no
enforcement or audit-write behavior changes.
Refs AAASM-5086.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🤖 Claude Code review — READYReview-only pass on the AAASM-5086 gating contract (Epic AAASM-5082). No source changes made. CI
Scope vs AAASM-5086 + Epic 5082 — COMPLETE
Side-effects — schema + read-side ONLY ✅
Local validation
FE sanityPurely a schema extension with no visible change: no dashboard component consumes Verdict: READY ✅Schema-freeze + ADR only; 0 enforcement/hot-path touch; existing enums intact; 71 paths held. The A/B/C capture work is correctly gated behind ADR-0018 product/architecture sign-off. Not merging (review-only, per instruction). |



Description
Freezes the gating contract for the Bucket-B backend program (Epic AAASM-5082): the canonical 5-way runtime verdict vocabulary and the enriched per-decision record shape that AAASM-5085/5089 depend on. Schema + read-side only — no enforcement/hot-path behavior change.
docs/src/adr/0018-…md, registered inREADME.md+SUMMARY.md): records the 5-way vocabulary, the enriched record, and a decision-capture plan describing exactly what hot-path instrumentation a follow-up would need (where the verdict is derived inaa-runtime, where per-decision latency is measured, howtrace_idpropagates) — explicitly flagged as requiring product/architecture sign-off before implementation.RuntimeVerdictenum (aa-apimodels::verdict):allow/narrow/scrub/pending/deny. Deliberately distinct from the protoDecisionwire enum (allow/deny/pending/redact) and the capability-matrixDecision(allow/narrow/approval/deny/na) — neither can expressnarrow/scrub. The existing enums are left unchanged.GET /api/v1/agents/{id}/decisions(AAASM-5058) gains nullableverdict+traceId, joining the already-present nullablelatencyMs+matchedPolicy. Both new fields return null — capturing them is the ADR-0018-gated hot-path follow-up.Schema extension of an existing path: 0 new OpenAPI paths (count stays 71).
openapi/v1.yamland the dashboardschema.d.tscodegen are regenerated so the drift gate stays green.Type of Change
Breaking Changes
Related Issues
Testing
RuntimeVerdictwire form + distinctness from capabilityDecision; decision-row test assertsverdict/traceIdread null.openapi_spec, 71 paths) passes; live-response schema validation passes.Validated locally (org CI billing-blocked):
cargo nextest -p aa-api -p aa-integration-tests(verdict + decision-row + contract green),clippy --all-targets -D warningsclean,fmt --checkclean,cargo deny checkclean,cargo docclean. Dashboard:type-check+lint+test(1940 pass) +buildall green.Checklist
cargo fmt,cargo clippy)🤖 Generated with Claude Code