Skip to content

fix(compliance): 3.2.x backport - functional-dispatch signing key (#8889) and enforced_policies gate for policy_backed_rejections (#8850) - #8938

Merged
bokelley merged 2 commits into
3.2.xfrom
backport/3.2.x-signing-keyid-and-policy-gate
Nov 12, 2026
Merged

bokelley merged 2 commits into
3.2.xfrom
backport/3.2.x-signing-keyid-and-policy-gate

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Two compliance-harness fixes for the 3.2.x maintenance line, so sellers graded on 3.2.x bundles stop getting false failures. Both ship in 3.2.11. One PR covers both, as two commits.

3.1.x needs neither fix, so there is no 3.1.x PR and nothing for 3.1.34. Details under "3.1.x" below.

1. Functional dispatch signs with a dedicated key (backport of #8889, fixes #8877)

Clean cherry-pick of e9c2162b18. No 3.2.x adaptation was needed: the test-kit, keys.json, README, docs page, signed-requests.yaml and the contract test applied as-is.

  • Functional dispatch in test-kits/signed-requests-runner.yaml now signs with test-functional-2026, a new Ed25519 key in the request-signing keys.json (same JWK pattern as the sibling keys), declared in runner_signing_keys. No conformance vector signs with it, so signed functional storyboard traffic no longer uses up the per-keyid cap that vector 020-rate-abuse grades on test-ed25519-2026.
  • The rate_abuse block scopes the lowered grading cap to test-ed25519-2026 only.
  • tests/functional-request-signing-contract.test.cjs checks that the published private scalar derives the published public key, and that no vector (root or profile-3.2) uses the functional keyid.
  • The 3.2.x training agent loads the whole keys.json from the compliance cache, so it needs no server change. This matches main.

2. creative/policy_backed_rejections gated on published enforced_policies (#8850)

On main, #8857 (open) gates this storyboard on a new 3.3 capability, creative.supports_registry_policy_enforcement. A new capability field is not patch-eligible on 3.2.x. This PR gates on what the seller actually publishes instead. No schema changes.

  • The controller seeds enforced_policies on the fixture product, so the gate reads the seller's get_products response, not the seed.
  • discover_policy_applicability (always runs): get_products with response_schema only, and context_outputs: [{ key: policy_products, path: products }]. products is required on every response, so the capture never fails the step.
  • confirm_enforced_policies (new) and reject_multiple_policies both carry skip_if: "!context.policy_products.0.enforced_policies.0". The exact-two-policy assertions moved from the discovery step into confirm_enforced_policies, which re-reads get_products. The rejection phase is unchanged.
  • A seller that omits enforced_policies, publishes [], or returns no products under required_policies is never sent the violating creative and has no failing steps. A seller that publishes any enforced policy runs all three steps. It is still graded on the exact policy universe and on one CREATIVE_REJECTED entry per policy.
  • Storyboard version 1.0.0 → 1.0.1. A narrative paragraph explains the gate and points to feat(compliance): gate policy-backed rejections on an explicit capability #8857 for 3.3.

Grade limitation. Neither the 3.2.x runner (@adcp/sdk 14.0.0-rc.53) nor the current SDK can turn a response value into a storyboard-level not_applicable. requires_capability reads only get_adcp_capabilities, and not_applicable_if supports only terminal_page. Phase skip_if is the only runtime gate, and it records skipped phases as neutral (passed: true, no steps). A non-enforcing seller therefore gets no failure, but the storyboard shows the discovery step as passed rather than not_applicable. #8847 (dependency_impairment) uses the same context.* skip_if pattern on this line. The 3.3 capability gate in #8857 is what produces a real not_applicable.

3.1.x: not applicable

Patch eligibility

  • Conformance harness / test-kit only. One new test key, one test-kit keyid change, and one storyboard gate. All additive or narrowing, with no new step kinds and no runner-output.json changes.
  • No stable-schema, transport, auth or signing-profile changes. Covered components, algorithms and wire shapes are unchanged. The new key is test material in the conformance keys.json.
  • Two patch changesets scoped to adcontextprotocol. check-changeset-protocol-scope.cjs origin/3.2.x passes. changeset status --since=origin/3.2.x shows only adcontextprotocol patch.

Compatibility

Testing

  • tests/policy-backed-rejections-storyboard.test.cjs: 17/17. New runner tests run on both the maintenance runner (@adcp/sdk 14.0.0-rc.53) and the private modern runner (fixture-test-sdk, 17.0.0-beta.3):
    • no enforced_policies, an empty list, or no products: zero failures, only get_products called, both gated phases skipped;
    • an enforcing seller: all three steps run and pass (get_products ×2 + sync_creatives);
    • an enforcing seller that accepts the violating creative: fails;
    • a seller publishing a different policy universe: fails the confirmation.
  • tests/functional-request-signing-contract.test.cjs: 5/5.
  • Request-signing profile-3.2, A2A, body-integrity, webhook-signing, brand-response-authorization, universal-storyboard doc parity: 229 pass, 0 fail, 2 pre-existing todo.
  • server/tests/unit/training-agent-request-signing-profile.test.ts: 5/5.
  • Every test:storyboard-* and test:compliance-* script, test:sdk-runner-capability-gates (50 + 167), test:doc-compliance-drift, test:compliance-snippets, check:published-compliance, test:auction-only-compliance, typecheck, root vitest (1174): pass.
  • Storyboard matrix (scripts/run-storyboards-matrix.sh, training agent on HEAD): running locally; result to follow in a comment.

Local hooks: the precommit server-unit suite failed only on 9 c2pa signing tests (server/tests/unit/{c2pa,illustration-c2pa-wiring,portrait-c2pa-wiring}.test.ts, "the certificate is invalid"). The fixture cert is generated by the local OpenSSL 4.1 build, and this change does not touch c2pa. Every other precommit stage passed, so the commits were made with HUSKY=0. CI is authoritative. Pushed with ADCP_SKIP_STORYBOARD_MATRIX=1 because the matrix was already running separately against the same HEAD.

Refs #8877, #8850, #8889, #8857

🤖 Generated with Claude Code

Synaeve and others added 2 commits November 12, 2026 06:42
…8889)

test-kits
- sign functional dispatch with dedicated test-functional-2026 key
- scope the lowered rate_abuse grading cap to the vector 020 keyid

test-vectors
- publish test-functional-2026 in request-signing keys.json
- document revoked and functional keys in the README key table

docs
- list test-functional-2026 among untrusted test kids
- name the functional key in signed-requests prerequisites

tests
- assert no conformance vector signs with the functional keyid
- assert the published functional key pair is consistent

(cherry picked from commit e9c2162)

Backport of #8889 to 3.2.x (fixes #8877). Clean cherry-pick; no 3.2.x adaptation was needed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…policies (3.2.x)

creative/policy_backed_rejections seeds a product with enforced_policies
through the controller and then asserted that the seller published and
enforced both fixture policies. A seller that never claimed registry
policy enforcement failed it, and the 3.2 schemas give it no capability to
opt out (adcp#8850). Main gates the storyboard on the new 3.3
creative.supports_registry_policy_enforcement capability (adcp#8857); a
new capability field is not patch-eligible here.

This line gates on what the seller publishes instead. The discovery read
asserts only a schema-valid get_products response and captures the
returned products. The policy-universe confirmation and the dual-violation
sync_creatives phases carry
  skip_if: "!context.policy_products.0.enforced_policies.0"
so they run only when the first discovered product carries a non-empty
enforced_policies list. The gate reads the seller's response, not the
seed. A seller that omits the field, publishes an empty list, or returns
no products is not sent the violating creative and is not failed. A
seller that publishes any enforced policy runs every step and is still
graded on the exact two-policy universe and one CREATIVE_REJECTED entry
per policy.

Regression tests run the storyboard on both the maintenance runner
(@adcp/sdk 14.0.0-rc.53) and the private modern runner (17.0.0-beta.3).

Refs #8850

Co-Authored-By: Claude Opus 5.5 <[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: Approve

Approve — source-only compliance bugfix with no blocking or medium findings.

What I checked:

  • No dist/** mutation (release-artifact immutability preserved) and no static/schemas/source/** changes, so no oneOf/discriminator regression and no schema↔docs coherence drift to evaluate.
  • Policy-backed-rejections scenario now gates enforcement phases on the seller-published enforced_policies field (a real optional 3.2 field, core/product.json:546), read from the get_products response via context_outputs rather than the controller seed; strict two-policy validations moved intact into a new skip_if-gated confirm phase. Version 1.0.0→1.0.1 with a patch changeset — appropriate for a bugfix that corrects spurious failures (adcp#8850), no wire-shape change.
  • Signed-requests functional dispatch moved to a dedicated test-functional-2026 Ed25519 key so functional traffic no longer consumes vector 020's per-keyid cap; key declared consistently across runner_signing_keys, keys.json, README, signed-requests.yaml, and the untrusted-kid fail-closed note. Tests crypto-derive the public key and assert no vector shares the keyid.
  • New tests cover non-enforcing, enforcing-pass, enforcing-fail, and wrong-universe sellers; the policy_products.0 gate is deterministic under controller isolation plus the required_policies filter.
  • Both changesets are patch and in-scope for the compliance/test surface.

High-risk flag: true only because docs/reference/test-vectors/index.mdx was modified — a presentational test-vector index touch with no reviewer concern. Not escalation-worthy (modification with no medium-or-higher finding).

Base is 3.2.x (not 3.1.x), gated_paths is false, no author team gate, no prior decision. No critical/high/medium findings → decision table falls through to row 9.

@bokelley
bokelley merged commit 8558eef into 3.2.x Nov 12, 2026
49 checks passed
@bokelley
bokelley deleted the backport/3.2.x-signing-keyid-and-policy-gate branch November 12, 2026 12:12
KonstantinMirin pushed a commit to KonstantinMirin/adcp that referenced this pull request Nov 13, 2026
Forward-merges the published 3.2.11 release (3.2.x = v3.2.11 =
9df1dd7, the adcontextprotocol#8942 Version Packages merge) and the 3.2.x commits since
v3.2.10: adcontextprotocol#8873, adcontextprotocol#8938, adcontextprotocol#8864, adcontextprotocol#8959 and adcontextprotocol#8961.

Release records:
- dist/compliance/3.2.11, dist/schemas/3.2.11 and the signed
  dist/protocol/3.2.11.tgz tuple are taken from v3.2.11 unchanged.
- dist/schemas/index.json and latest.json are regenerated
  (forward-merge-release-records.cjs schema-discovery).
- CHANGELOG.md is main's file plus the 3.2.11 block
  (forward-merge-release-records.cjs changelog).
- package.json, package-lock.json, static/schemas/source/index.json: main's.
- static/compliance/published-versions.json: main's. 3.2.x's only extra
  entry is 3.2.11, which is registered in a separate commit after
  qualification.

adcontextprotocol#8961's 3.1.33 records already equal main's (same tree hashes). adcontextprotocol#8959 and
the adcontextprotocol#8889 half of adcontextprotocol#8938 are cherry-picks of main commits and auto-merged
to main's bytes.

Content conflicts, all resolved to main's file. Each 3.2.x side is a 3.2
backport or 3.2-only adaptation of work main carries in its 3.3 form:
- 33 schema sources under static/schemas/source and 14 test files, from
  adcontextprotocol#8864 (the 3.2 backport of main's schema opening and adcontextprotocol#8866's named
  rejections). Main's copies are the 3.3 opening: no location 3.2.11
  opens is closed on main, and the tests cite DR-0036.
- tests/policy-backed-rejections-storyboard.test.cjs, from the adcontextprotocol#8850 half
  of adcontextprotocol#8938: main tests its capability-gated storyboard (adcontextprotocol#8857).
- docs/media-buy/media-buys/lifecycle.mdx, from adcontextprotocol#8873: the 3.2
  pending_creatives prose. Main's prose matches main's 3.3 enum.
- server/tests/unit/storyboards.test.ts, from adcontextprotocol#8961: 3.2.x's floors and
  pins. Main keeps its own.

Auto-merge reverted: the non-conflicting adcontextprotocol#8850 hunk in
creative/policy_backed_rejections.yaml. It adds the 3.2-only
enforced_policies skip_if gate on top of main's
creative.supports_registry_policy_enforcement capability gate, and its
own narrative says the 3.3 line uses the capability instead.

Outside dist/ and CHANGELOG.md the merged tree equals main's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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