Skip to content

fix(compliance): gate 3.1 governance scenarios by capability - #7625

Merged
bokelley merged 1 commit into
3.1.xfrom
backport/3.1.x-governance-capability
Sep 23, 2026
Merged

bokelley merged 1 commit into
3.1.xfrom
backport/3.1.x-governance-capability

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • gate the 3.1 governance approval and conditions storyboards on media_buy.governance_aware
  • document that capability applicability is evaluated before runtime requirements
  • assert the capability gate in the governance routing regression test

Validation

  • node --test tests/governance-storyboard-routing.test.cjs
  • node scripts/check-changeset-protocol-scope.cjs origin/3.1.x
  • git diff --check

Closes #7584

@bokelley
bokelley requested a review from a team as a code owner September 21, 2026 01:56

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve.

Clean backport gating the governance_approved and governance_conditions storyboards on media_buy.governance_aware, matching the gate already present on the denied scenarios at base. Reviewer verified the requires_capability shape matches the documented matcher, the capability exists in the capabilities schema (default false), the changeset patch scope is correct, and the routing test asserts the gate for both scenarios.

No blocking or Medium findings. One Low follow-up (non-blocking): the governance_aware capability description now undercounts the storyboards it gates.

Decision table: no critical/high (row 1 n/a), gated_paths false (row 2 n/a), high_risk false (rows 3/5 n/a), no medium findings (rows 4/8 n/a), no team gate (row 7 n/a), no prior decision (row 6 n/a) — falls through to row 9: approve.

Copy link
Copy Markdown
Contributor Author

@adcontextprotocol/maintainers — stable-line backport is focused, CI is green, and the regression test plus changeset scope check pass. Please provide exact-head human review before merge; automated approval is not the final gate.

@EvgenyAndroid

Copy link
Copy Markdown
Contributor

Verified end-to-end against a live seller that declares media_buy.governance_aware: false — https://sell.nofluffadvisory.com/mcp — using both scenario files exactly as this PR ships them (head cc54cadbde), run through @adcp/sdk 13.0.4 with storyboard run --file, bundle 3.1.20.

Both behave as intended:

── Phase: Capability unsupported ──
⏭️ Storyboard skipped: capability not supported by this agent (0ms)
   Error: Capability predicate `media_buy.governance_aware === true` not satisfied: agent declared false.
✅ 0 passed, 0 failed, 1 skipped

Same output for governance_approved and governance_conditions.

Three things this confirms:

  • The ordering your new schema text mandates is already what the runner does. Both files carry requires: [multi_agent] as well as the new gate. The capability predicate fires first and the storyboard is skipped as capability-unsupported — it does not reach requires and report requirement_unmet. So the added paragraph in storyboard-schema.yaml describes current 13.0.4 behaviour rather than asking for a runner change.
  • The predicate evaluates cleanly. It is single-key equals, so evaluateCapabilityPredicate goes straight to its equals branch. That's worth stating given the discussion on media_buy_seller base storyboard registers a governance agent, then buys without plan_id (3.1.x) / governance_context (main) #7585: combining present with contains there was silently broken, because the evaluator is an if-chain that returns on the first key it finds. This one has no such hazard.
  • The path is real. media_buy.governance_aware is defined as a boolean in the 3.1 get-adcp-capabilities-response.json, so a seller that simply omits it is also treated as unmet rather than matched by accident.

For this seller the practical effect is two storyboards leaving the denominator: on the hosted card today both read 2/5 partial, and under this PR both become not-applicable. That's the right result — the seller declares false because it does not consult a governance agent, and until now it was being graded on scenarios that assume it does.

One scoping note so the two don't get conflated: this covers the two scenarios #7547 names. The base media_buy_seller storyboard (protocols/media-buy/index.yaml) is untouched here and on 3.1.x still registers a governance agent in its own governance_setup phase — that's the #7600 backport tracked on #7585.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants