Skip to content

fix(compliance): exercise the seller execution check in governance_denied (#7758) - #7788

Merged
bokelley merged 1 commit into
mainfrom
fix/7758-governance-denied-fixture
Sep 30, 2026
Merged

bokelley merged 1 commit into
mainfrom
fix/7758-governance-denied-fixture

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Part of #7758. Compliance source fix that must land before the v3.2.1 tag. No schema or normative change.

Defect

media_buy_seller/governance_denied registers a governance agent on the seller, then sends create_media_buy with no governance_context and expects GOVERNANCE_DENIED. That is wrong for a correct seller:

  • A request without a token must be rejected with PERMISSION_DENIED (specification.mdx §Seller enforcement, error-handling.mdx §Authorization). The seller never consults governance.
  • The buy targets {brand, operator, sandbox: true}, but governance was registered on the non-sandbox account. The test kit treats those as two accounts.
  • The training agent passed only because of that mismatch. It had no agent for the sandbox account, so the "plans exist" fallback returned GOVERNANCE_DENIED.

media_buy_seller/governance_denied_recovery has the same defect, and it is also a required scenario of governance-aware-seller. It denies a $50K buy sent without a token, then expects an $8K retry with no token to succeed, which a correct seller rejects.

The single-agent governance_denied scenarios in brand-rights, signal-marketplace and creative-transformers don't have this defect. They send a missing token and expect PERMISSION_DENIED or the rejection arm, which is correct. The protocol reviewer flagged one separate tension in brand-rights, not changed here: the rejection arm vs PERMISSION_DENIED.

Fix

Reviewed with the ad-tech-protocol-expert. The denial now comes from the seller's own execution check. The trigger is state the governance fixture holds, not an optional field the seller might leave out:

  1. sync_plans creates a $100K plan.
  2. sync_accounts and sync_governance run on the non-sandbox account.
  3. get_products runs against seeded fixed-price fixtures.
  4. check_governance intent for the exact $25K request is approved.
  5. sync_plans amends the same plan to $10K. Amendments apply immediately (specification.mdx §Plan amendments).
  6. create_media_buy with the approved token. The seller's purchase execution check is denied against the amended plan, because the budget-authority category fails. Execution checks are binary, and any failed category produces denied. The seller returns GOVERNANCE_DENIED (Case-2 wire placement) and doesn't commit.

For recovery, steps 1–6 are followed by a fresh intent for a corrected $8K buy. create_media_buy with that token is expected to succeed. Recovery is now gated on adcp.governance_enforcement with signed_context and online_execution_check for create_media_buy, the same as governance_denied, instead of the legacy governance_aware boolean. It is also listed with the online-execution proofs in universal/governance.yaml.

The amendment steps use the authored plan_id, not $context.plan_id. That way a runner that suffixes plan ids per run (the hosted routing from #7779) rewrites both steps the same way.

Governance fixture fix. planned_delivery.total_budget is optional. Before this PR, the sandbox governance agent skipped budget authority entirely when a purchase check left it out, so a conformant seller that omitted it would have been approved. Such a check now evaluates the intent's authorized commitment. Per specification.mdx §Plan binding and audit, ledger authority comes from governance's own intent record.

Testing

  • Training agent, sales tenant, current source:
    • governance_denied: 11P / 0F (4 seeding steps + 7 scenario steps)
    • governance_denied_recovery: 9P / 0F
    • governance_approved: 13P / 0F (unchanged)
  • Exact-count floors are updated in run-storyboards-matrix.sh and training-agent-storyboards.yml: governance_denied:11:0, and new governance_denied_recovery:9:0.
  • End-to-end run with a loopback third-party seller (not the training agent's sales tenant), assuming the pending Hosted heartbeat never routes multi-agent governance storyboards, so a governance-aware-seller claimant can never pass the specialism #7758 decisions D and B4, as in fix(training-agent): let third-party sellers use the public governance agent (#7758) #7786. The seller verifies with the SDK and runs its own online execution check at the registered URL:
    • governance_denied: 11/11
    • governance_denied_recovery: 9/9
    • governance_approved: 13/13
    • governance_conditions: 12/12
  • New server/tests/unit/training-agent-governance-plan-amendment.test.ts covers three cases:
    • an amended plan denies an intent-approved purchase;
    • the plan is still enforced when total_budget is omitted (this case fails without the fixture fix);
    • a purchase without total_budget is still approved when the plan has headroom.
  • Storyboard lint suites pass: scoping, branch-sets, fixture resolution, contradictions, sample-request and response schema, context-output and validation paths, generate-phase scope, governance-task-slices, sdk-runner-capability-gates, doc-parity.
  • Governance and training-agent unit suites pass: 1113 tests.
  • The 3.0-compat runs use released 3.0.x bundles, so this change doesn't affect them. CI covers them.

🤖 Generated with Claude Code

…nied (#7758)

media_buy_seller/governance_denied and governance_denied_recovery sent
create_media_buy without governance_context after registering a governance
agent and asserted GOVERNANCE_DENIED. A correct seller rejects a missing
token with PERMISSION_DENIED before consulting governance, so both
scenarios failed conformant sellers. governance_denied also bought on the
sandbox:true account while governance was registered on the non-sandbox
account, which is the only reason the training agent passed.

Both scenarios now obtain an approved intent for a $25K buy under a $100K
plan, amend the plan to $10K, and send create_media_buy with the approved
token. The seller's purchase execution check is denied against the amended
plan and the seller returns GOVERNANCE_DENIED. Recovery then gets a fresh
intent for an $8K buy and expects the seller to accept it. Recovery is gated
on adcp.governance_enforcement online_execution_check, like governance_denied.

The sandbox governance agent now evaluates the intent's authorized
commitment when a purchase check omits the optional
planned_delivery.total_budget, so the amended plan binds every conformant
seller. Exact-count storyboard floors updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@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: Escalate to human review

Escalate — gated path requires human/CODEOWNERS approval.

This PR modifies .github/workflows/training-agent-storyboards.yml, which matches the hard approval gate glob .github/workflows/** (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so decision-table row 2 fires: the gate is not yet satisfied and the outcome cannot be approve.

The reviewer found no blocking or Medium findings — the fix looks clean: it rediagnoses the governance_denied / governance_denied_recovery scenarios (a tokenless request must return PERMISSION_DENIED, not GOVERNANCE_DENIED), closes a fail-open hole in intentCeilingFallback when planned_delivery.total_budget is omitted (now fail-closed, happy path preserved, unit-tested across all three branches), and ships a correctly scoped patch changeset with no schema/wire change. Absent the gated path, this would be an approve.

Escalation reasons

  • .github/workflows/training-agent-storyboards.yml (modified) is under the .github/workflows/** hard approval gate and review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.

Why human review

  • Modifies .github/workflows/training-agent-storyboards.yml — matches the .github/workflows/** hard approval gate; review_decision is REVIEW_REQUIRED (not APPROVED), so human/CODEOWNERS review is required.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/training-agent-storyboards.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Merging with admin privileges under the maintainer's explicit authorization (2026-09-30) to run the 3.2.1 GA cycle end-to-end. The only workflow change raises the exact-step floors for the corrected governance storyboards. All checks pass and there are no review threads. The fixture flow was agreed with the protocol-expert review (seller execution check denied → GOVERNANCE_DENIED; a missing token stays PERMISSION_DENIED).

@bokelley
bokelley merged commit 71e1978 into main Sep 30, 2026
54 checks passed
@bokelley
bokelley deleted the fix/7758-governance-denied-fixture branch September 30, 2026 10:37
bokelley added a commit that referenced this pull request Sep 30, 2026
…ing fixes

Replace the two "being finalized" placeholders with what shipped: the
corrected governance_denied storyboards (#7788), the interim brand-rights
acquire_rights_denied fix (#7792, #7790), hosted governance grading as a
3.2.x follow-up (#7758), and strict sf-binary enforcement in a 3.2-pinned
TypeScript verifier (@adcp/sdk rc.53, adcp-client#3073).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
bokelley added a commit that referenced this pull request Sep 30, 2026
GA wording for release notes, what's new, migration guide, versions,
versioning, roadmap, intro, FAQ and long-tail pages; 3-2-beta becomes
"AdCP 3.2 prerelease history"; docs.json banner; RELEASING.md and playbook
release topology; GA homepage strip (new dismissal cookie); Addie knowledge
snapshot and GA curriculum wording migration (613); CODE_VERSION bump; patch
changeset. The docs.json default-version flip is left to release-docs.yml
at the v3.2.1 tag.

Release notes also cover the GA-day fixes: governance storyboards (#7788,
#7803), brand-rights interim fix (#7792), strict sf-binary under the 3.2
signing profile (adcp-client#3073), execution requirements (#7774), cost
targets (#7778, #7799).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
bokelley added a commit that referenced this pull request Sep 30, 2026
GA wording for release notes, what's new, migration guide, versions,
versioning, roadmap, intro, FAQ and long-tail pages; 3-2-beta becomes
"AdCP 3.2 prerelease history"; docs.json banner; RELEASING.md and playbook
release topology; GA homepage strip (new dismissal cookie); Addie knowledge
snapshot and GA curriculum wording migration (613); CODE_VERSION bump; patch
changeset. The docs.json default-version flip is left to release-docs.yml
at the v3.2.1 tag.

Release notes also cover the GA-day fixes: governance storyboards (#7788,
#7803), brand-rights interim fix (#7792), strict sf-binary under the 3.2
signing profile (adcp-client#3073), execution requirements (#7774), cost
targets (#7778, #7799).

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant