Repository navigation
fix(compliance): require approval after governance conditions - #6277
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean compliance-scenario rewrite with no blocking or medium findings.
This PR rewrites the governance_conditions compliance scenario around the cross-role authorization contract (non-authorizing consultation handle, adjusted-intent approval before seller commit, get_media_buys readback + report_plan_outcome replacing response-echo assertions). The reviewer verified every asserted wire shape against the schemas — check-governance, create-media-buy-request (governance_context, total_budget object), get-media-buys-response, and report-plan-outcome — and all match. Changeset is present and correctly scoped (patch, no wire-shape change); all doc_refs resolve; regression test pins ordering, payload identity, capability gating, and the binary-execution rule.
Decision-table walk:
- Row 1 (critical/high): no findings — skip.
- Row 2 (gated_paths + not APPROVED): gated_paths is false — skip. (review_decision is REVIEW_REQUIRED but no gate is engaged.)
- Row 3/5 (high_risk): high_risk is false — skip.
- Row 4/6 (medium data-loss/schema/infra, sticky): no findings, no prior decision — skip.
- Row 7 (no-auto-approve team): no team match — skip.
- Row 8 (≥3 medium): zero medium findings — skip.
- Row 9: approve.
No Breaking-class change is present (patch changeset, no wire-shape change verified by reviewer), so the breaking-change hard gate does not apply.
Closes #6273
Summary
governance_conditionsas conditions → adjusted intent → approval → governed executionconsultation_contextwithout authorization on the conditions verdict, then capturegovernance_contextonly from approvalget_media_buysreadback andreport_plan_outcomeThe seller's execution check remains internal to
create_media_buy: a successful mutation is the positive-path evidence that the registered governance agent returnedapproved.deniedblocks mutation, whileconditionsis explicitly invalid for execution. Negative execution branches remain the follow-on coverage in #5716/#3086.Validation
npm run test:governance-conditions-storyboardlintFilevalidation for every sample request ingovernance_conditions.yamlnpm run test:storyboard-response-schemanpm run test:storyboard-context-output-pathsnpm run test:storyboard-validations-pathsnpm run test:storyboard-scopingnpm run test:storyboard-branch-setsnpm run test:storyboard-provides-state-fornpm run test:storyboard-contradictionsnpm run test:storyboard-context-entitynpm run test:storyboard-auth-shapenpm run test:storyboard-test-kitsnpm run test:compliance-source-authoritynpm run test:patch-3-0-compat-bundlenpm run build:compliancenpx changeset status --since=origin/main