diff --git a/.changeset/add-principal-registration-walkthrough.md b/.changeset/add-principal-registration-walkthrough.md
new file mode 100644
index 00000000000..74e2a2c8b34
--- /dev/null
+++ b/.changeset/add-principal-registration-walkthrough.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Add the "Set up your buyer agent with a seller" walkthrough for the experimental principal layer: seller-issued credentials, `get_adcp_capabilities` discovery, `sync_principal` declarations, webhooks, and a reusable destination through the `action_required` to `ready` proof flow, account feed binding, `get_principal` readback, the kill switch, and the `principal.changed` webhook. Cross-linked from `sync_principal`, `get_principal`, and the 3.2 guide.
diff --git a/.changeset/canonicalization-step5-empty-path-no-query.md b/.changeset/canonicalization-step5-empty-path-no-query.md
new file mode 100644
index 00000000000..510e7211e0c
--- /dev/null
+++ b/.changeset/canonicalization-step5-empty-path-no-query.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Add four URL-canonicalization conformance vectors covering step 5 when the path is empty and no query is present. No normative change: step 5 already reads "If the path is empty AND an authority is present, substitute `/`", and `docs/reference/url-canonicalization.mdx` is untouched. The vectors close a detection gap. Of the 37 cases in `test-vectors/request-signing/canonicalization.json` exactly one had an empty path, and that one carried `?x=1` — the query in step 5's illustrative example. An implementation that read the example as the condition and gated the substitution on the query therefore scored 37 of 37 while emitting `https://host` for `https://host`, where RFC 3986 §6.2.3 and step 5 both require `https://host/`. The new cases are the bare authority, a non-default port that must keep the slash after the port rather than before it, an IPv6 literal whose brackets stay inside the slash, and the empty-query spelling `https://host?` where steps 5 and 7 compose to `https://host/?`. That last one is where a query-gated reading fails on its own terms: the raw URL carries a `?` but the parsed query is the empty string. The gap is not hypothetical — the Python SDK had exactly this gating, and the four cases fail against it before its fix and pass after, with the original 37 green throughout. Canonicalization divergence is silent until it surfaces as a signature mismatch or an agent-URL authorization failure, and the same algorithm governs every URL-identifier surface in the "Where it applies" table, not only `@target-uri`.
diff --git a/.changeset/compose-version-envelope-compact.md b/.changeset/compose-version-envelope-compact.md
new file mode 100644
index 00000000000..52530cd2afe
--- /dev/null
+++ b/.changeset/compose-version-envelope-compact.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Compose `core/version-envelope.json` via root `allOf` in the nine 3.2 compact/experimental request schemas (`accept_proposal`, `buy_products`, `control_media_buy`, `decline_proposals`, `list_products`, `refine_proposals`, `request_proposals`, `list_account_changes`, `sync_reporting_status`) and `core/compact-task-submitted.json` (version and protocol envelopes), so generated SDK types share envelope ancestry with the rest of the spec. The local `adcp_version` / `adcp_major_version` property declarations are retained on strict (`additionalProperties: false`) requests because draft-07 does not evaluate properties across `allOf`; request validation is unchanged. Response validation of `compact-task-submitted.json` is tightened: it now enforces the version-envelope grammar and the protocol envelope's field constraints (including the `task_status`/`response_status` ban); conformant sellers already satisfy both. `tests/composed-schema-validation.test.cjs` now fails when any non-MCP `*-request.json` stops composing the envelope, and `core/version-envelope.json` states its actual coverage.
diff --git a/.changeset/controller-seeding-requires-controller.md b/.changeset/controller-seeding-requires-controller.md
new file mode 100644
index 00000000000..a43505eedcf
--- /dev/null
+++ b/.changeset/controller-seeding-requires-controller.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Compliance storyboards that seed fixtures through `comply_test_controller` (`prerequisites.controller_seeding: true`) now declare `requires: [controller]`. A seller without a test controller receives one storyboard-level `requirement_unmet` skip naming `controller`, not a `missing_test_controller` grade on every seeded step; a controller that disappears mid-run still grades per step. The maintenance sweep adds the gate to existing 3.2 storyboards (excluding main-only outcome-target additions) without changing step logic (a seller with no controller now skips each such storyboard as a whole, including steps that did not need seeding, instead of running those steps and grading the seeded ones per step), and a new lint (`lint-storyboard-controller-requires`, wired into the compliance build) fails if a storyboard seeds through the controller without the gate. The conformance docs now state the policy: reference sellers SHOULD implement `comply_test_controller`; translator and adapter sellers that front platforms which cannot seed state are not expected to.
diff --git a/.changeset/dedupe-bundled-provenance-defs.md b/.changeset/dedupe-bundled-provenance-defs.md
new file mode 100644
index 00000000000..bfcb116c670
--- /dev/null
+++ b/.changeset/dedupe-bundled-provenance-defs.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Bundled schemas (`/schemas/{version}/bundled/`) now carry `core/provenance.json` once in root `$defs.Provenance` and reference it from each call-site as `{"$ref": "#/$defs/Provenance", "description": "..."}`, instead of inlining the full body 40-80 times per bundle. Bundle output shrinks by roughly 20%. Source schemas and validation behavior are unchanged, and per-call-site descriptions are preserved. In bundles with repeated provenance, enclosing inlined schemas now lose their deep `$id` (existing behavior for subtrees containing hoisted `$defs` refs), and two `required_disclosures` description strings may differ because the enum hoist fingerprints enums without their description.
diff --git a/.changeset/fix-advanced-delivery-reporting-join-key.md b/.changeset/fix-advanced-delivery-reporting-join-key.md
new file mode 100644
index 00000000000..f04142dce66
--- /dev/null
+++ b/.changeset/fix-advanced-delivery-reporting-join-key.md
@@ -0,0 +1,16 @@
+---
+"adcontextprotocol": patch
+---
+
+fix(compliance): add operator_unit join key to advanced_delivery_reporting storyboard
+
+The `advanced_delivery_reporting` storyboard was missing the `account.operator_unit.id`
+join key on all graded steps (`sync_account`, `discover_product`, `create_buy`,
+`get_narrowed_format_delivery`). Without this key, the controller-seeded product
+(`advanced_reporting_video`) could not be resolved by any seller because nothing on
+the wire linked the harness-identity seed to the acme-account reads. The storyboard
+graded `partial` on fully-conformant sellers.
+
+Adds `operator_unit.id: compliance-media_buy_seller_advanced_delivery_r-a37f01cb`
+to all four steps, matching the isolation pattern used by every other
+controller-seeded storyboard in the bundle. Bumps version to 1.0.3.
diff --git a/.changeset/fix-billing-gate-required-discovery.md b/.changeset/fix-billing-gate-required-discovery.md
new file mode 100644
index 00000000000..d11b58f2d5b
--- /dev/null
+++ b/.changeset/fix-billing-gate-required-discovery.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Make billing_gate_dispatch 1.1.2 capability discovery required while preserving its account capability gate. Agents with account capabilities can receive a passing overall verdict after valid billing checks; agents without account capabilities remain not applicable.
diff --git a/.changeset/fix-non-guaranteed-lifecycle-status.md b/.changeset/fix-non-guaranteed-lifecycle-status.md
new file mode 100644
index 00000000000..c9a06d65276
--- /dev/null
+++ b/.changeset/fix-non-guaranteed-lifecycle-status.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Accept active as well as pending_creatives in the non-guaranteed sales storyboard so sellers without a creative library can complete the buying flow. Clarify the capability-dependent lifecycle expectations while retaining context, package-state, and upstream-traffic checks.
diff --git a/.changeset/fix-typed-proposal-negotiation-seed.md b/.changeset/fix-typed-proposal-negotiation-seed.md
new file mode 100644
index 00000000000..f913b3241c8
--- /dev/null
+++ b/.changeset/fix-typed-proposal-negotiation-seed.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Repair the `typed_proposal_negotiation` compliance storyboard so it can pass against a conformant 3.2 seller. The seed step now calls `request_proposals` (the 3.2 proposal-lifecycle tool, as `declined_proposal_refinement` does) instead of legacy `get_products`, so the proposal it targets is one `refine_proposals` can resolve; the storyboard is gated on the seller advertising `request_proposals` in `media_buy.lifecycle_tools` and on `comply_test_controller`, and declares `controller_seeding: true` so its fixture products are seeded. The `unsatisfied_constraints` `field_contains` check addresses array elements with `[*]`, and each post-seed phase now names its upstream phases with `depends_on`, so a capability-gated phase the seller does not support (for example the unsupported-dimension rejection when the seller declares `flight`) skips alone instead of cascade-skipping finalize, accept, amendment, cancellation, and batch coverage.
diff --git a/.changeset/product-channel-declaration-guidance.md b/.changeset/product-channel-declaration-guidance.md
new file mode 100644
index 00000000000..638e75cc38d
--- /dev/null
+++ b/.changeset/product-channel-declaration-guidance.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Recommend an explicit nonempty `channels` declaration on every product in AdCP 3.x while preserving existing property-based inheritance and validation constraints. Buyers request channel details before classifying sparse responses; omission from an unrequested projection does not establish an absent seller declaration. Explain format-option narrowing and distinguish declared buying contexts from independent evidence of actual delivery or per-channel totals. Document the proposed 4.0 required-channel migration, with removal of reliance on omission-based inheritance and the projection policy left to that future breaking change. Schemas remain unchanged.
diff --git a/.changeset/profile-3-2-step-0-1-mirrors.md b/.changeset/profile-3-2-step-0-1-mirrors.md
new file mode 100644
index 00000000000..a0e43156cf7
--- /dev/null
+++ b/.changeset/profile-3-2-step-0-1-mirrors.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Compliance corpus: `profile-3.2/` now mirrors every remaining root request-signing vector except `negative/018`, so a `covers_content_digest: "required"` verifier, which is every 3.2+ verifier, can grade them. The new negatives are `001`, `011`, `019`, `021`, `022`, `023`, `024`, `026`, `027`, `028`, `029`, `030` and `031`, and the new positive guards are `013`, `014` and `015`. Each mirror keeps its root number, slug and expected code, covers `content-digest` wherever a `Signature-Input` exists, and carries a correct `Content-Digest`, so the step-0/1 fault is the vector's only fault. `negative/018` stays unmirrored because `forbidden` is illegal in 3.2. The vector README now requires every vector to carry exactly one fault (adcp#7577). No normative change.
diff --git a/.changeset/reporting-revision-unreadable-issue.md b/.changeset/reporting-revision-unreadable-issue.md
new file mode 100644
index 00000000000..7b7b5bab8aa
--- /dev/null
+++ b/.changeset/reporting-revision-unreadable-issue.md
@@ -0,0 +1,7 @@
+---
+"adcontextprotocol": patch
+---
+
+Add the `REVISION_UNREADABLE` reporting status issue code for a published revision that the seller still owes within `status_retention_days` but cannot currently serve or verify, for example because its stored rows are missing or fail the revision binding. The issue always belongs to the seller and carries the affected `reporting_obligation_id` plus a new `reporting_revision_id` field. It is `delayed` with `wait_for_retry` while automatic repair runs, and `action_required` with `contact_seller` once that repair can't restore the content. While the issue is open, the obligation is neither `healthy` nor `complete`, and an authorized exact read through `get_media_buy_delivery` returns `SERVICE_UNAVAILABLE` rather than `REFERENCE_NOT_FOUND`. The issue is retired when the committed content is readable again or the revision's retention window ends. An obligation whose official revision is lost never becomes `complete`. Readers that strictly validate the closed issue-code enum must accept the new value. Closes #8082.
+
+Release classification: this is an additive change confined to the experimental Reliable Reporting surface (`media_buy.reporting_delivery`). It introduces no new transport error code or stable envelope field: authorized exact reads use the existing `SERVICE_UNAVAILABLE` code. Strict reporting-schema consumers must update their definitions before accepting the new issue. This patch classification does not advance the consumer-status requirement or superseded-snapshot compaction notices.
diff --git a/.changeset/request-signing-step1-grading-vectors.md b/.changeset/request-signing-step1-grading-vectors.md
new file mode 100644
index 00000000000..8061b655ae1
--- /dev/null
+++ b/.changeset/request-signing-step1-grading-vectors.md
@@ -0,0 +1,7 @@
+---
+"adcontextprotocol": patch
+---
+
+Add request-signing conformance vectors for three step-1 rules the corpus did not grade (adcp#7905). `negative/029` rejects a duplicate `sig1` label on the `Signature` header (RFC 9421 §4.2, RFC 8941 §3.2). `negative/030` rejects `Content-Digest: SHA-256=…, sha-256=…`: `SHA-256` is a parse-invalid dictionary key under RFC 8941 §3.1.2, and verifiers must not fold case. `negative/031` rejects an unbracketed IPv6 `Host` header (`::1`) with `request_target_uri_malformed` at step 10; it carries a real signature over the URL authority so the header is the only fault. Adds three false-positive guards, `positive/013` (distinct `sig1`/`sig2` labels), `014` (`sha-256` + `sha-512`) and `015` (`Host: [2001:db8::1]:8443`). No new requirement; the profile-3.2 mirrors follow in adcp#7733.
+
+Correction to `negative/026-non-ascii-host`: its expected outcome changes from `request_signature_header_malformed` (step 1) to `request_target_uri_malformed` (step 10), aligning the vector with the `security.mdx` error table and `canonicalization.json`, which map a raw non-ASCII host to `request_target_uri_malformed`. The vector now also carries a real Ed25519 signature over the A-label base so the host is its only fault. Verifiers that matched the old code to pass 026 must update.
diff --git a/.changeset/seller-optimized-min-spend-fixture-package.md b/.changeset/seller-optimized-min-spend-fixture-package.md
new file mode 100644
index 00000000000..2d20e50dbbe
--- /dev/null
+++ b/.changeset/seller-optimized-min-spend-fixture-package.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": patch
+---
+
+Compliance: in the `seller_optimized_budget` storyboard, place the positive minimum-spend target on the second (retargeting) package instead of the first. The `@adcp/sdk` storyboard request builder authors a package budget on the first package of every `create_media_buy` step, which made a minimum-spend target on that package exceed its own injected cap for a seller that declares both package caps and minimum-spend targets. The target-versus-cap contradiction stays graded by `seller_optimized_min_spend_target_exceeds_package_cap`.
diff --git a/docs/accounts/overview.mdx b/docs/accounts/overview.mdx
index bdcf0508233..65b059db15b 100644
--- a/docs/accounts/overview.mdx
+++ b/docs/accounts/overview.mdx
@@ -28,7 +28,7 @@ When `require_operator_auth` is `true` (**account-id namespaces**), operators au
When `require_operator_auth` is `false` (**buyer-declared accounts**), the agent is trusted and account-scoped calls use the natural key (`brand` + `operator`). Most sellers provision these relationships through [`sync_accounts`](/docs/accounts/tasks/sync_accounts). A seller MAY instead lazily provision on the first account-scoped request when billing and every other required setting are unambiguous from capabilities or the authenticated agent's onboarding defaults. A lazy-provisioning seller MUST keep accepting the natural key and MUST expose [`list_accounts`](/docs/accounts/tasks/list_accounts) for recovery. If buyer input is required before use, the seller MUST expose `sync_accounts`.
-Follow [Provision a seller-mediated account](/docs/accounts/provisioning-walkthrough) for a complete buyer-declared workflow from discovery through human setup, activation, and first spend.
+Follow [Provision a seller-mediated account](/docs/accounts/provisioning-walkthrough) for a complete buyer-declared workflow from discovery through human setup, activation, and first spend. Follow [Set up your buyer agent with a seller](/docs/accounts/principal-registration-walkthrough) for the standing, caller-scoped setup that comes before accounts: webhooks, reusable reporting destinations, and declarations.
An **ad network** may use both models simultaneously — buyer-declared accounts on the buyer-facing side (the network is agent-trusted) and an account-id namespace with each underlying platform (the network authenticates as an operator). See the [Sponsored Intelligence guide — account model for networks](/docs/sponsored-intelligence/networks#account-model-for-networks) for the full account chain: `buyer agent → network (buyer-declared) → AI platform (account-id namespace)`.
diff --git a/docs/accounts/principal-registration-walkthrough.mdx b/docs/accounts/principal-registration-walkthrough.mdx
new file mode 100644
index 00000000000..57407172df6
--- /dev/null
+++ b/docs/accounts/principal-registration-walkthrough.mdx
@@ -0,0 +1,442 @@
+---
+title: Set up your buyer agent with a seller
+sidebarTitle: Buyer agent setup
+description: "Walk a buyer agent from seller-issued credentials to registered webhooks, a proven reporting destination, account feed binding, and the kill switch."
+"og:title": "AdCP — Set up your buyer agent with a seller"
+---
+
+This walkthrough follows one buyer agent through its first standing relationship with a seller: who it authenticates as, what it declares, where reports and webhooks go, and how that delivery is switched off. It is the caller-scoped setup that comes before account provisioning.
+
+
+**Experimental.** The principal layer ([`sync_principal`](/docs/protocol/sync_principal), [`get_principal`](/docs/protocol/get_principal), the `adcp.principal` capability block, and the `principal.changed` webhook) is an experimental AdCP 3.2 surface. It may change between 3.x releases with at least 6 weeks' notice. Sellers implementing any part of it MUST declare `protocol.principal` in `experimental_features`. See [experimental status](/docs/reference/experimental-status) for the full contract.
+
+
+## Scenario
+
+Pinnacle Agency's buyer agent will buy from Priya's StreamHaus sales agent. Sam, who runs Pinnacle's buying, wants the relationship set up before any media buy: webhooks registered once, a reusable reporting bucket proven, and a way to stop delivery if a bucket is ever compromised. In the steps below, "the agent" is Pinnacle's buyer agent acting under its own credential, and Sam is the person who reviews and operates it.
+
+Two things are deliberately **not** part of this flow:
+
+- **There is no `register_buyer_agent` task.** AdCP begins after authentication. StreamHaus's authorization system decides who its callers are.
+- **Nothing here grants access to an advertiser account.** The principal layer says where and how the principal receives data. Which advertisers it may act for is established separately through [`sync_accounts`](/docs/accounts/tasks/sync_accounts).
+
+## 1. Get credentials from the seller
+
+Credentials come from StreamHaus, out of band from AdCP: an OAuth client for the agent's workload identity, an API key issued to the agent, or a verified signed-request identity published in Pinnacle's `brand.json`. The agent then authenticates as itself on every call, and StreamHaus resolves that credential to one durable principal record with `principal_kind: buyer_agent`.
+
+Which credential shape StreamHaus offers is its authorization design. The protocol requires only that the credential map to a *stable* principal: rotating a key or renewing a token preserves the configuration only when StreamHaus maps the new credential to the same principal, and a raw key ID, token, or session is never the owner. For a signed caller, the stable subject is the canonical `brand.json` `agents[].url`, so two agent URLs under Pinnacle are two principals.
+
+A person using an interactive client follows the same lifecycle with a different credential:
+
+- Sam, working in Claude or ChatGPT against StreamHaus, authenticates as Sam: their own login at the seller, resolved as `principal_kind: operator`.
+- The client application is the instrument, never the owner. ChatGPT and Claude are not the buyer agent, and nothing registers them.
+- If a client can present only one shared service credential for all its users, StreamHaus must refuse to persist configuration under it until the client completes delegated authorization or account linking.
+
+**Principals do not merge.** A destination registered by Sam as an `operator` principal is invisible to Pinnacle's agent, and Sam's own suspension controls affect only Sam's configuration. Decide which principal owns each destination before registering it. Linking two principals needs an explicit seller-side administrative operation.
+
+Never send identity in a request body. `sync_principal` and `get_principal` reject `buyer_agent_url`, `agent_url`, `principal_id`, and `connection_id`, and a seller never derives identity from them.
+
+## 2. Discover what the seller supports
+
+The agent calls [`get_adcp_capabilities`](/docs/protocol/get_adcp_capabilities) and reads the `adcp.principal` block together with the seller's reporting offerings:
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/v3/protocol/get-adcp-capabilities-response.json",
+ "status": "completed",
+ "adcp": {
+ "major_versions": [3],
+ "supported_versions": ["3.2"],
+ "idempotency": {
+ "supported": true,
+ "replay_ttl_seconds": 86400
+ },
+ "capability_changes": {
+ "capabilities_version": "streamhaus-2026-09-01",
+ "cache_ttl_seconds": 300,
+ "notifications": {
+ "supported": true,
+ "registration_task": "sync_principal",
+ "event_types": ["capabilities.changed"]
+ }
+ },
+ "principal": {
+ "supported": true,
+ "sync_task": "sync_principal",
+ "read_task": "get_principal",
+ "supported_sections": [
+ "notification_configs",
+ "reporting_destinations",
+ "declarations"
+ ],
+ "caller_event_types": ["capabilities.changed", "principal.changed"],
+ "max_reporting_destinations": 16,
+ "reporting_destination_offerings": [
+ {
+ "pattern": "file_transfer",
+ "transports": ["s3", "gcs"],
+ "formats": ["parquet", "csv"],
+ "verification_profiles": ["manifest_checksums", "canonical_digest"]
+ }
+ ],
+ "suspension_interval_seconds": 300,
+ "optimistic_concurrency": true
+ }
+ },
+ "supported_protocols": ["media_buy"],
+ "experimental_features": ["protocol.principal", "media_buy.reporting_delivery"]
+}
+```
+
+The agent reads three things:
+
+- **`supported_sections`** lists the sections StreamHaus accepts. An unsupported section is rejected, not ignored.
+- **`reporting_destination_offerings`** is StreamHaus's objective offering. The agent picks a pattern, transport, format, and verification profile from it *before* submitting, so an out-of-offering destination is never discovered through a rejection. The account-level reporting offerings used in step 5 are advertised separately under `media_buy.reporting_delivery`.
+- **`suspension_interval_seconds`** is the longest StreamHaus may take, after a suspension or deactivation, to stop new deliveries and webhook fires.
+
+## 3. Verify who StreamHaus thinks you are
+
+Before changing anything, the agent calls [`get_principal`](/docs/protocol/get_principal). It carries no parameters and has no side effects; it never creates a principal record or issues an identifier.
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/v3/protocol/get-principal-response.json",
+ "status": "completed",
+ "result": {
+ "kind": "recognized",
+ "principal_kind": "buyer_agent",
+ "principal_id": "prin_01K4C6RGT5Q18VCPGXE7DDWQ5F"
+ }
+}
+```
+
+`recognized` means the credential maps to a durable principal that already exists and has no standing configuration. `principal_kind` is what StreamHaus resolved, not what the caller claimed; to catch a credential mix-up early, send `expected_principal_kind: "buyer_agent"` on a write, and a mismatch fails with `CONFLICT` before anything changes. A seller that does not pre-create records returns `unconfigured` instead, and the first sync creates the record. A `failed` result carries only errors, never identifiers.
+
+## 4. Sync declarations, webhooks, and a reusable destination
+
+The agent sends one request. Each section is the complete desired state for that section, omitted sections are untouched, and all sections apply together or not at all.
+
+- `declarations` states what the buyer agent can consume: which async payload versions, which webhook signing algorithms it can verify, which experimental features it opts into. The seller returns the accepted intersection.
+- `notification_configs` registers a webhook subscriber. One subscriber can carry capability and principal changes, and `principal.changed` is the doorbell for seller-driven transitions such as a destination becoming `ready`.
+- `reporting_destinations` registers a reusable, non-secret destination. It holds coordinates only: credentials, private keys, and signed URLs never transit AdCP.
+
+**Schema:** [`sync-principal-request.json`](https://adcontextprotocol.org/schemas/v3/protocol/sync-principal-request.json)
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/v3/protocol/sync-principal-request.json",
+ "idempotency_key": "5b6a3d1e-0c8f-4e49-9a2f-71c2f0d4b8a3",
+ "expected_principal_kind": "buyer_agent",
+ "configuration": {
+ "declarations": {
+ "async_adcp_versions": ["3.2"],
+ "webhook_signing_algorithms": ["ed25519"],
+ "experimental_features": ["protocol.principal"]
+ },
+ "notification_configs": [
+ {
+ "subscriber_id": "pinnacle-events",
+ "url": "https://agents.pinnacle-agency.example/adcp/webhooks",
+ "event_types": ["capabilities.changed", "principal.changed"],
+ "active": true
+ }
+ ],
+ "reporting_destinations": [
+ {
+ "pattern": "file_transfer",
+ "destination_id": "pinnacle-archive",
+ "active": true,
+ "provider": { "domain": "object-store.example" },
+ "transport": "s3",
+ "location": "s3://pinnacle-reporting/adcp/",
+ "accepted_formats": ["parquet"],
+ "accepted_verification_profiles": ["manifest_checksums"]
+ }
+ ]
+ }
+}
+```
+
+StreamHaus challenges an active webhook URL **during this call**: the endpoint must answer the seller's signed challenge before the subscriber set is replaced, and a failed challenge fails the whole request, so the receiver must be live first. Destination proof is different: it completes *after* the call, and an active destination cannot become `ready` until it succeeds. To rehearse without side effects, add `"dry_run": true`: the seller validates and reports the would-be action (`would_update`, `would_be_unchanged`, or `would_clear`) without persisting, issuing identifiers, or challenging anything.
+
+### The proof flow: `action_required` to `ready`
+
+StreamHaus validates the destination against its offering, issues a `destination_ref`, and returns the applied state. The destination is not usable yet, so its state is `action_required` and the response names the one typed action to take:
+
+**Schema:** [`sync-principal-response.json`](https://adcontextprotocol.org/schemas/v3/protocol/sync-principal-response.json)
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/v3/protocol/sync-principal-response.json",
+ "status": "completed",
+ "result": {
+ "kind": "applied",
+ "action": "updated",
+ "dry_run": false,
+ "principal_id": "prin_01K4C6RGT5Q18VCPGXE7DDWQ5F",
+ "principal_kind": "buyer_agent",
+ "configuration_version": "cfg_01K4C6V2N5PC1TQAH9WTT8D2HP",
+ "configuration": {
+ "notification_configs": [
+ {
+ "subscriber_id": "pinnacle-events",
+ "url": "https://agents.pinnacle-agency.example/adcp/webhooks",
+ "event_types": ["capabilities.changed", "principal.changed"],
+ "active": true
+ }
+ ],
+ "reporting_destinations": [
+ {
+ "destination_id": "pinnacle-archive",
+ "destination_ref": "dest_01K4C6T6Q0A9E6Y3N1FQ1T8YKV",
+ "state": "action_required",
+ "setup": { "action": "prove_control" },
+ "configuration": {
+ "pattern": "file_transfer",
+ "destination_id": "pinnacle-archive",
+ "active": true,
+ "provider": { "domain": "object-store.example" },
+ "transport": "s3",
+ "location": "s3://pinnacle-reporting/adcp/",
+ "accepted_formats": ["parquet"],
+ "accepted_verification_profiles": ["manifest_checksums"]
+ }
+ }
+ ],
+ "declarations": {
+ "declared": {
+ "async_adcp_versions": ["3.2"],
+ "webhook_signing_algorithms": ["ed25519"],
+ "experimental_features": ["protocol.principal"]
+ },
+ "accepted": {
+ "async_adcp_versions": ["3.2"],
+ "webhook_signing_algorithms": ["ed25519"],
+ "experimental_features": ["protocol.principal"]
+ },
+ "selected_async_adcp_version": "3.2"
+ }
+ }
+ }
+}
+```
+
+The loop from here:
+
+1. **Do the typed action.** AdCP carries only the action name (`prove_control`, `grant_access`, `accept_share`, or `contact_support`), an optional `setup_url`, and an optional expiry. The details, such as which proof object to write under the bucket prefix, come from StreamHaus's onboarding material or its `setup_url`. Treat `setup_url` as an untrusted link, surface it to Sam, and never fetch or execute it. Credentials stay in the provider's own control plane.
+2. **Wait for the doorbell, or poll.** StreamHaus fires `principal.changed` when the destination moves. The agent can also call `get_principal` until the state reaches `ready`; if `setup.expires_at` passes first, resubmit the destination to obtain a fresh action. Reading never advances `configuration_version`, and neither does the seller's own transition, so a read-then-write loop stays safe.
+3. **Treat `ready` as the gate.** Only a `ready` destination may be bound to an account feed. `rejected` means StreamHaus cannot use those coordinates and the request needs a different destination.
+
+If the agent later changes the provider, transport, location, accepted formats, or accepted verification profiles, StreamHaus issues a *new* `destination_ref` and requires fresh proof. The old reference stays resolvable for existing bindings and reporting history and is listed under `prior_destination_refs`. Existing feed bindings do not move on their own: to redirect delivery, bind a new `delivery_config_version` to the new reference once it is `ready`. Resubmitting the identical destination is a no-op: `action: "unchanged"` and the same reference.
+
+The declarations section returns the negotiated contract. If the agent had declared a version or algorithm StreamHaus does not support, it would be absent from `accepted` and listed under `exclusions` with a reason, and a declared signing algorithm that shares nothing with the seller's would fail the request with `UNSUPPORTED_FEATURE` while a subscriber is active.
+
+## 5. Authorize accounts and bind the feed
+
+`ready` proves only where the principal can receive data. It says nothing about *which* data. To get Nova Motors' reporting into the bucket, the agent establishes the account relationship with [`sync_accounts`](/docs/accounts/tasks/sync_accounts), as in [Provision a seller-mediated account](/docs/accounts/provisioning-walkthrough), and binds the account's feed to the reusable destination through `reporting_delivery_configs`. The example below is abbreviated: include `timezone`, `payment_terms`, and `billing_entity` as that walkthrough does, and choose `offering_id` and `report_definition_id` from the seller's `media_buy.reporting_delivery` offerings.
+
+**Schema:** [`sync-accounts-request.json`](https://adcontextprotocol.org/schemas/v3/account/sync-accounts-request.json)
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/v3/account/sync-accounts-request.json",
+ "idempotency_key": "e7a40a15-2d54-4a4b-8d0b-3f7a1c9b6d52",
+ "accounts": [
+ {
+ "brand": { "domain": "novamotors.example" },
+ "operator": "pinnacle-agency.example",
+ "billing": "advertiser",
+ "reporting_delivery_configs": [
+ {
+ "delivery_config_id": "pinnacle-pacing",
+ "delivery_config_version": 1,
+ "offering_id": "pacing-hourly",
+ "active": true,
+ "feed_purpose": "pacing",
+ "report_definition_id": "streamhaus_delivery_summary_v1",
+ "reporting_profile": "streamhaus_delivery_summary_v1",
+ "scope": { "all_media_buys": true },
+ "coverage_requirement": "full",
+ "required_finality": "snapshot",
+ "reconciliation_mode": "delivery_only",
+ "schedule": {
+ "period_duration": "PT1H",
+ "alignment": "utc",
+ "delivery_sla": "PT1H"
+ },
+ "method": {
+ "pattern": "file_transfer",
+ "transport": "s3",
+ "orchestration": "producer_managed",
+ "format": "parquet",
+ "destination": {
+ "mode": "existing",
+ "destination_ref": "dest_01K4C6T6Q0A9E6Y3N1FQ1T8YKV"
+ }
+ }
+ }
+ ]
+ }
+ ]
+}
+```
+
+Two independent checks gate this binding:
+
+- **The destination.** StreamHaus resolves `destination_ref` only for the principal that registered it, and a new binding requires it to be `ready`. An unknown, cross-principal, or unauthorized reference fails indistinguishably.
+- **The account.** StreamHaus authorizes the disclosure of Nova Motors' feed to this principal for this scope. Possessing a `ready` reference is never account authority, and the account check is independent of the destination's state.
+
+The same destination can serve several accounts, each bound and authorized separately. A binding can still wait on account setup or provider readiness; observe it through [`get_reporting_status`](/docs/media-buy/task-reference/get_reporting_status). Reliable reporting is its own experimental surface (`media_buy.reporting_delivery`); see [experimental status](/docs/reference/experimental-status).
+
+## 6. Read it back, and know the kill switch
+
+[`get_principal`](/docs/protocol/get_principal) is the durable answer to "what does StreamHaus think my standing configuration is?". The agent uses it to bootstrap `expected_configuration_version` before a guarded replacement, to recover after a restart, and to observe setup transitions.
+
+**Schema:** [`get-principal-response.json`](https://adcontextprotocol.org/schemas/v3/protocol/get-principal-response.json)
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/v3/protocol/get-principal-response.json",
+ "status": "completed",
+ "result": {
+ "kind": "current",
+ "principal_id": "prin_01K4C6RGT5Q18VCPGXE7DDWQ5F",
+ "principal_kind": "buyer_agent",
+ "configuration_version": "cfg_01K4C6V2N5PC1TQAH9WTT8D2HP",
+ "configuration": {
+ "notification_configs": [
+ {
+ "subscriber_id": "pinnacle-events",
+ "url": "https://agents.pinnacle-agency.example/adcp/webhooks",
+ "event_types": ["capabilities.changed", "principal.changed"],
+ "active": true
+ }
+ ],
+ "reporting_destinations": [
+ {
+ "destination_id": "pinnacle-archive",
+ "destination_ref": "dest_01K4C6T6Q0A9E6Y3N1FQ1T8YKV",
+ "state": "ready",
+ "configuration": {
+ "pattern": "file_transfer",
+ "destination_id": "pinnacle-archive",
+ "active": true,
+ "provider": { "domain": "object-store.example" },
+ "transport": "s3",
+ "location": "s3://pinnacle-reporting/adcp/",
+ "accepted_formats": ["parquet"],
+ "accepted_verification_profiles": ["manifest_checksums"]
+ }
+ }
+ ],
+ "declarations": {
+ "declared": {
+ "async_adcp_versions": ["3.2"],
+ "webhook_signing_algorithms": ["ed25519"],
+ "experimental_features": ["protocol.principal"]
+ },
+ "accepted": {
+ "async_adcp_versions": ["3.2"],
+ "webhook_signing_algorithms": ["ed25519"],
+ "experimental_features": ["protocol.principal"]
+ },
+ "selected_async_adcp_version": "3.2"
+ }
+ }
+ }
+}
+```
+
+Pass `configuration_version` back as `expected_configuration_version` on a guarded `sync_principal`. If two services share one principal and one is stale, StreamHaus rejects the stale write with `CONFLICT` and changes nothing; read again, reconcile, and resubmit under a **new** `idempotency_key`. Retries of one logical request reuse both the key and the body.
+
+### The kill switch
+
+These controls stop delivery on the caller's own principal. They are only as trustworthy as the credential that drives them: if a credential is compromised, revoke it in the seller's authorization system, because anyone holding it can reverse these settings.
+
+- **Pause a webhook.** Resubmit the subscriber with `active: false`. Fires to that endpoint, across every account, halt within `suspension_interval_seconds`.
+- **Suspend a destination.** Resubmit the destination with `active: false`. New deliveries to *every generation* of that `destination_id` halt within the same bound, and every bound account is marked with a typed `destination_suspended` issue. Resubmitting with `active: true` lifts it without new proof when nothing else changed.
+- **Revoke a destination.** Omit it from `reporting_destinations`, or send `[]` for all. Revocation has every suspension effect, removes the destination from current state, and keeps its generations under `retired_destinations` for audit. Reusing the `destination_id` later needs fresh registration and proof.
+
+New deliveries may continue until the advertised interval elapses, and none of these delete data already delivered or revoke grants managed in the provider's control plane. Narrower controls exist per account (deactivating a `reporting_delivery_configs` entry, or changing account authority through `sync_accounts`), and per-buy `reporting_webhook` and account-level subscribers are independent of the principal-level subscriber.
+
+### The `principal.changed` webhook
+
+StreamHaus tells the agent's subscriber when its own transitions change the principal state. The payload is an invalidation signal, not state: identifiers and a repair pointer only. The receiver verifies the webhook signature, dedupes on `idempotency_key`, and repairs by calling `get_principal`.
+
+**Schema:** [`principal-changed-webhook.json`](https://adcontextprotocol.org/schemas/v3/core/principal-changed-webhook.json)
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/v3/core/principal-changed-webhook.json",
+ "idempotency_key": "9f2c1e57-3f6a-4f4e-9f0d-2a45b7c6e881",
+ "notification_id": "conn_txn_01K4D0Z3M8Q0V5T2C9XWJ7R4BA",
+ "notification_type": "principal.changed",
+ "fired_at": "2026-09-01T12:00:05Z",
+ "subscriber_id": "pinnacle-events",
+ "agent_url": "https://sales.streamhaus.example/adcp",
+ "changed_at": "2026-09-01T12:00:03Z",
+ "reason": "destination_state_changed",
+ "destination_id": "pinnacle-archive"
+}
+```
+
+The `$schema` key above is documentation metadata, not part of the payload. The webhook is not fired for the agent's own `sync_principal` mutations, since the sync response already reports those. Webhooks can be dropped, so a receiver also polls `get_principal` on a bounded schedule rather than relying on the doorbell alone.
+
+## Run it against the training agent
+
+The public training agent implements `sync_principal` and `get_principal` on its sales endpoint, `https://test-agent.adcontextprotocol.org/sales/mcp` (see [Build a caller](/docs/building/by-layer/L4/build-a-caller) for connecting). Calls need a credential: anonymous calls get `AUTH_REQUIRED`. It is a reference seller, so it differs from StreamHaus:
+
+- It advertises the `reporting_destinations` and `declarations` sections. Webhook subscribers are still registered through [`sync_agent_notification_configs`](/docs/protocol/sync_agent_notification_configs), so drop `notification_configs` from the step 4 request.
+- Destination proof is simulated. An active destination reads back `action_required` with `setup.action: prove_control` (also for warehouse patterns, where a real seller would ask for `grant_access`), then `ready` a few seconds later. No bucket is contacted and no `principal.changed` webhook fires.
+- It offers `file_transfer` (`s3`, `gcs`) and `warehouse_materialization` (`bigquery`, `snowflake`). Read its `adcp.principal` block for the exact offering.
+- State is keyed to the credential you authenticate with, and everyone using the shared public test token is the same principal. Treat anything you register there as public, and expect `current` rather than `recognized` if someone else has already configured it.
+
+The runnable subset of step 4. Use your own `destination_id` so the sequence is reproducible on a shared token:
+
+**Schema:** [`sync-principal-request.json`](https://adcontextprotocol.org/schemas/v3/protocol/sync-principal-request.json)
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/v3/protocol/sync-principal-request.json",
+ "idempotency_key": "1d0b7c44-6b0e-4f0b-8a43-9d3c5a2f7e10",
+ "configuration": {
+ "declarations": {
+ "async_adcp_versions": ["3.2"],
+ "webhook_signing_algorithms": ["ed25519"]
+ },
+ "reporting_destinations": [
+ {
+ "pattern": "file_transfer",
+ "destination_id": "pinnacle-archive-demo",
+ "active": true,
+ "provider": { "domain": "object-store.example" },
+ "transport": "s3",
+ "location": "s3://pinnacle-reporting/adcp/",
+ "accepted_formats": ["parquet"],
+ "accepted_verification_profiles": ["manifest_checksums"]
+ }
+ ]
+ }
+}
+```
+
+Call `get_principal` first, send this request (expect `applied` with `action_required`), then poll `get_principal` until the destination is `ready`. Send the same body under a fresh `idempotency_key` to see `action: "unchanged"` with the same `destination_ref`. Clear your destination by resubmitting the section without it; avoid `[]` on a shared token unless you registered everything there. The [`principal` storyboard](/docs/building/verification/conformance) covers the recognized read, apply and readback, idempotent replay, and section clearing; it applies a suspended destination, so it does not exercise the proof transition.
+
+## Failure branches
+
+The full error table is in the [`sync_principal` reference](/docs/protocol/sync_principal#errors). The ones a buyer agent meets first:
+
+- **`AUTH_REQUIRED`.** The call carried no stable principal. Authenticate with a credential the seller maps to one.
+- **`UNSUPPORTED_FEATURE`.** A section, destination, or event type is outside what the seller advertised. Re-read capabilities and choose from the offering.
+- **`CONFLICT`.** `expected_configuration_version` or `expected_principal_kind` did not match. Nothing changed; read with `get_principal`, reconcile, and resubmit under a new key.
+- **A destination stays `action_required`.** The typed action is incomplete or unverified. Complete it in the provider and poll; resubmit only if `setup.expires_at` has passed.
+- **A destination is `rejected`.** Those coordinates cannot be used. Register a different destination rather than retrying.
+- **The feed binding is refused.** The destination is not `ready`, or the account relationship does not authorize the feed. Fix whichever side failed; one does not substitute for the other.
+
+## Related reference
+
+- [`sync_principal`](/docs/protocol/sync_principal) and [`get_principal`](/docs/protocol/get_principal) — request, response, and error reference
+- [`get_adcp_capabilities`](/docs/protocol/get_adcp_capabilities) — the `adcp.principal` block
+- [`sync_accounts`](/docs/accounts/tasks/sync_accounts) — account authorization and `reporting_delivery_configs`
+- [Provision a seller-mediated account](/docs/accounts/provisioning-walkthrough) — the related account walkthrough
+- [`sync_agent_notification_configs`](/docs/protocol/sync_agent_notification_configs) — the specialized webhook registration task
diff --git a/docs/building/by-layer/L3/comply-test-controller.mdx b/docs/building/by-layer/L3/comply-test-controller.mdx
index 09263847db2..93800fea555 100644
--- a/docs/building/by-layer/L3/comply-test-controller.mdx
+++ b/docs/building/by-layer/L3/comply-test-controller.mdx
@@ -1325,6 +1325,10 @@ The runner distinguishes three outcome categories in deterministic mode:
- **Transition correctly rejected** — controller returned [`INVALID_TRANSITION`](/docs/building/by-layer/L3/comply-test-controller#error-codes) for an invalid state change. This is a pass.
- **Unexpected failure** — controller returned an error for a transition that should be valid, or succeeded on a transition that should fail. This is a compliance failure.
+### Who is expected to implement the controller
+
+Reference sellers (implementations published to demonstrate full conformance, such as the SDK reference and example sellers that SDK CI grades) SHOULD implement `comply_test_controller`; one that omits it leaves its controller-seeded lifecycle coverage ungraded. Translator and adapter sellers that front platforms which cannot seed state are not expected to implement it. Storyboards that seed through the controller declare `requires: [controller]`, so a seller without the controller receives one storyboard-level `requirement_unmet` skip naming `controller` on each such storyboard it is graded on, not a `missing_test_controller` grade on every seeded step. If the controller disappears mid-run, the runner still grades each affected step `missing_test_controller`.
+
### Example: creative lifecycle in deterministic mode
```
diff --git a/docs/building/verification/get-test-ready.mdx b/docs/building/verification/get-test-ready.mdx
index c9647d58d0f..078df4a653d 100644
--- a/docs/building/verification/get-test-ready.mdx
+++ b/docs/building/verification/get-test-ready.mdx
@@ -70,7 +70,7 @@ In practice, sellers usually run both:
| Run | Endpoint | Expected result |
|-----|----------|-----------------|
-| Observational sandbox run | Production endpoint with sandbox accounts, no controller exposed | `steps_failed = 0`; live-only probes appear as not selected, and selected controller-dependent scenarios may make the summary `partial` with `missing_test_controller` skips |
+| Observational sandbox run | Production endpoint with sandbox accounts, no controller exposed | `steps_failed = 0`; live-only probes appear as not selected, and selected controller-dependent scenarios may make the summary `partial` with `requirement_unmet` (`controller`) or `missing_test_controller` skips |
| Deterministic run | Dev/staging or sandbox-only endpoint with [`comply_test_controller`](/docs/building/by-layer/L3/comply-test-controller) | `steps_failed = 0` and no controller-dependent coverage skips |
The first run answers "does the production buyer-visible path tolerate sandbox traffic?" The second answers "can the runner prove every lifecycle path for the declared specialisms?" Do not collapse those into one signal. A zero-failure partial run is useful, but buyers need the skip list to know exactly which lifecycle assertions were not graded.
diff --git a/docs/building/verification/how-grading-works.mdx b/docs/building/verification/how-grading-works.mdx
index c4052456772..3a4edafe313 100644
--- a/docs/building/verification/how-grading-works.mdx
+++ b/docs/building/verification/how-grading-works.mdx
@@ -177,8 +177,9 @@ Runner summaries distinguish **failure** from **coverage**:
| `summary.steps_failed = 0` with a failed `StoryboardResult.assertions[]` entry | The raw storyboard failed despite passing step counters; the rc15 aggregate does not preserve this verdict | Fix the invariant failure and treat the run as failed; do not rely on the aggregate status |
| `summary.steps_failed = 0`, with `summary.steps_not_selected > 0` only | The requested suite or run mode intentionally excluded some probes, such as live-only checks during a sandbox-only run | No implementation ask; label the run mode clearly |
| `summary.steps_failed = 0`, with only capability-gate `not_applicable` skips | Narrower declared scope, not a failure | The agent honestly declined an optional capability, such as `media_buy.supports_proposals: false` |
-| `summary.steps_failed = 0`, with `missing_test_controller` skips | Deterministic-test-surface coverage gap | Run a dev/staging deterministic pass or publish the skipped lifecycle coverage explicitly |
-| Any `missing_tool`, `requirement_unmet`, or `unsatisfied_contract` skip for a declared protocol or specialism | The seller declared a claim the runner could not fully test | Fix the missing surface or narrow the declaration |
+| `summary.steps_failed = 0`, with `missing_test_controller` skips | Deterministic-test-surface coverage gap: the controller was available at load time but became unavailable mid-run, or a step calls it in a storyboard that does not gate on it | Run a dev/staging deterministic pass or publish the skipped lifecycle coverage explicitly |
+| `requirement_unmet` skip naming `controller` on controller-seeded storyboards | The seller exposes no [`comply_test_controller`](/docs/building/by-layer/L3/comply-test-controller#who-is-expected-to-implement-the-controller); reference sellers SHOULD implement it, translator and adapter sellers that cannot seed state are not expected to | Reference sellers: implement the controller. Translator and adapter sellers: no ask; publish the skipped coverage list |
+| Any `missing_tool`, `unsatisfied_contract`, or other `requirement_unmet` skip (except the `controller` row above) for a declared protocol or specialism | The seller declared a claim the runner could not fully test | Fix the missing surface or narrow the declaration |
This distinction matters for production-path sandbox runs. A seller can run the storyboard suite against the real production endpoint under sandbox-flagged traffic and get **zero failures** while still seeing a `partial` summary because the production endpoint correctly does not expose [`comply_test_controller`](/docs/building/by-layer/L3/comply-test-controller). After confirming that the raw storyboard results contain no failed storyboard-scoped assertions, that result says: "the buyer-visible sandbox path passed every assertion the runner could grade, but controller-seeded lifecycle scenarios were skipped." It is useful evidence for sandbox readiness, but it is not the same as full deterministic specialism coverage.
diff --git a/docs/building/verification/validate-your-agent.mdx b/docs/building/verification/validate-your-agent.mdx
index 8c98ee9e0b5..1a4db2e6f7d 100644
--- a/docs/building/verification/validate-your-agent.mdx
+++ b/docs/building/verification/validate-your-agent.mdx
@@ -133,7 +133,7 @@ The storyboard runner operates in two modes depending on whether your agent impl
### Reading `partial`
-`partial` is a coverage result, not automatically a failure. The runner uses it when one or more selected scenarios could not be graded even though no executed assertion failed. The most common cause is intentional: production endpoints MUST NOT expose [`comply_test_controller`](/docs/building/by-layer/L3/comply-test-controller), so controller-seeded or controller-forced phases skip with `missing_test_controller`.
+`partial` is a coverage result, not automatically a failure. The runner uses it when one or more selected scenarios could not be graded even though no executed assertion failed. The most common cause is intentional: production endpoints MUST NOT expose [`comply_test_controller`](/docs/building/by-layer/L3/comply-test-controller), so controller-seeded storyboards skip with a storyboard-level `requirement_unmet` naming `controller`, and controller-forced steps that are not gated skip with `missing_test_controller`.
Read `steps_not_selected` separately from `steps_skipped`. Not-selected scenarios were outside the suite or run mode you asked for. Skipped scenarios were inside the selected suite, but the runner could not execute them because of an applicability gate, missing test surface, missing tool, or prerequisite.
@@ -143,7 +143,7 @@ Use the summary counters and skip reasons to decide what the result means:
|---------|----------------|
| `0 failed`, `steps_not_selected > 0`, `steps_skipped = 0` | Expected for the selected run mode, such as sandbox-only testing that excludes live-only probes |
| `0 failed`, only capability-gate `not_applicable` skips | Clean pass for the capability scope the seller declared |
-| `0 failed`, `missing_test_controller` skips | Buyer-visible path passed, but deterministic lifecycle coverage was not graded |
+| `0 failed`, `requirement_unmet` (`controller`) or `missing_test_controller` skips | Buyer-visible path passed, but deterministic lifecycle coverage was not graded |
| Any `missing_tool` skip for a declared protocol or specialism | The seller overclaimed or forgot to expose a required tool |
| Any failed step | Not conformant for the declared scope until fixed |
diff --git a/docs/contributing/storyboard-authoring.md b/docs/contributing/storyboard-authoring.md
index bd9dfd7fa14..e54c0c41635 100644
--- a/docs/contributing/storyboard-authoring.md
+++ b/docs/contributing/storyboard-authoring.md
@@ -108,6 +108,8 @@ Declare fixtures at the storyboard root. Set `prerequisites.controller_seeding:
```yaml
id: sales_non_guaranteed
+requires:
+ - controller
prerequisites:
controller_seeding: true
description: "Requires a seeded product and approved creative."
@@ -138,6 +140,8 @@ phases:
The runner injects a fixtures phase that calls `comply_test_controller` with `scenario: seed_product`, `scenario: seed_pricing_option`, and `scenario: seed_creative` (in foreign-key order) before running `place_buy`. An agent that implements the seed scenarios passes out of the box; an agent that returns `UNKNOWN_SCENARIO` on the seeds causes the storyboard to grade as `not_applicable`, not failed — implementers don't get penalized for missing sandbox-only surface.
+**A storyboard with `prerequisites.controller_seeding: true` MUST also declare `requires: [controller]`.** Without it, a seller that has no test controller is graded `missing_test_controller` on every seeded step instead of one storyboard-level `requirement_unmet` skip (capability gates still evaluate first, so a seller that never claimed the capability gets `not_applicable`). `tests/lint-storyboard-controller-requires.test.cjs` enforces this.
+
When a vendor-metric storyboard needs a deterministic external `measurement.metrics[]` snapshot, add an explicit `comply_test_controller` step with `scenario: seed_measurement_catalog`. Use `measurement_catalogs[]` inside a product fixture only as a compatibility fallback when the same storyboard also needs to carry the seller's product-level capability fields.
See the full list of seed scenarios and their params in [Compliance test controller — Scenarios](/docs/building/implementation/comply-test-controller#scenarios).
diff --git a/docs/media-buy/product-discovery/media-products.mdx b/docs/media-buy/product-discovery/media-products.mdx
index bb6036087e9..8cce8eb68ab 100644
--- a/docs/media-buy/product-discovery/media-products.mdx
+++ b/docs/media-buy/product-discovery/media-products.mdx
@@ -18,7 +18,7 @@ Products declare which pricing models they support. Buyers select a specific pri
- `name` (string, required)
- `description` (string, required)
- `publisher_properties` (list[PublisherPropertySelector], required): Publisher properties covered by this product. See [Property Targeting](#property-targeting).
-- `channels` (list[string], optional): Advertising channels this product is sold as (e.g., `["retail_media"]`, `["display", "olv"]`). Sellers SHOULD declare `channels` on products that span non-obvious channels, particularly retail media, CTV/OLV, and multi-channel bundles. Product channels SHOULD be a subset of the union of their properties' `supported_channels`. See [Media Channel Taxonomy](/docs/reference/media-channel-taxonomy).
+- `channels` (list[MediaChannel], optional in 3.x): Advertising channels this product is sold as (e.g., `["retail_media"]`, `["display", "olv"]`). Sellers SHOULD explicitly declare at least one channel on every product. Products inherit from their properties' `supported_channels` but may narrow the scope; product channels SHOULD be a subset of the union of those property channels. See [Media channel taxonomy](/docs/reference/media-channel-taxonomy).
- `video_placement_types` (list[string], optional): Declared video placement types that may be included in this product, using IAB Tech Lab/OpenRTB 2.6 `video.plcmt` definitions with AdCP-native names: `instream`, `accompanying_content`, `interstitial`, and `standalone`. Aggregate products and ad-network products may include multiple values. This is seller-declared discovery metadata, not independent verification of inventory quality or delivery context.
- `audio_distribution_types` (list[string], optional): Declared audio distribution types that may be included in this product, using IAB Tech Lab/OpenRTB 2.6 `audio.feed` definitions with AdCP-native names: `music_streaming_service`, `fm_am_broadcast`, `podcast`, `catch_up_radio`, `web_radio`, `video_game`, and `text_to_speech`. Aggregate products and ad-network products may include multiple values. This is seller-declared discovery metadata, not independent verification of inventory quality or delivery context.
- `sponsored_placement_types` (list[string], optional): Declared sponsored-placement types for catalog-driven retail-media products: `sponsored_search`, `sponsored_display`, and `sponsored_native`. Aggregate products and ad-network products may include multiple values. This is seller-declared discovery metadata, not independent verification of inventory quality or delivery context.
@@ -57,6 +57,16 @@ Products declare which pricing models they support. Buyers select a specific pri
- `conversion_tracking` (object, optional): Conversion event tracking capabilities. Presence indicates the product supports `optimization_goals` with `kind: "event"`. See [Conversion tracking](#conversion-tracking-1).
- `product_card` (object, optional): Visual card definition for displaying this product in user interfaces. See [Product Cards](#product-cards).
+## Product channel declarations
+
+An explicit product declaration distinguishes the buying context from the broader channels its properties support. The existing 3.x property-based inheritance remains unchanged, but sellers SHOULD explicitly declare a nonempty `channels` array on every product so buyers do not have to rely on that fallback. Creative formats and seller-wide `portfolio.primary_channels` do not independently declare a product's channels: the same VAST video format can serve both online video (`olv`) and connected TV (`ctv`). Buyers can use explicit product channels for channel-specific discovery, proposal routing, and planning. These declarations are seller metadata, not independent verification of delivery context or proof of per-channel delivery totals for a multi-channel product.
+
+When using a `fields` projection, buyers should include `channels` before classifying the product. Omission from a projection that did not request `channels` does not establish that the seller failed to declare it. A missing or empty array supplies no explicit product channel values; this guidance does not replace the existing 3.x inheritance behavior or require buyers to exclude legacy products that rely on it. Omission is not a wildcard for every channel in the taxonomy.
+
+A format option's optional `applies_to_channels` narrows the product's declared channels and must be a subset of them. Omitting `applies_to_channels` makes that option applicable to every channel declared on the product, not every channel in the taxonomy. The option does not independently declare the product's channels.
+
+The [4.0 proposal in #7869](https://github.com/adcontextprotocol/adcp/issues/7869) would require `channels` with at least one `MediaChannel` value on every Product. This is a proposed breaking change; 3.x still accepts omitted or empty arrays. Sellers can prepare now by declaring each product's actual channels. See [Preparing product channels for 4.0](/docs/reference/migration/channels#preparing-product-channels-for-4-0).
+
## Property and collection list application receipts
Property and collection lists are resolved outside the seller, but their inventory effect is product-specific. Whenever effective discovery targeting contains `property_list`, `property_list_exclude`, `collection_list`, or `collection_list_exclude`, the seller MUST return one `list_applications` receipt for each targeting reference on every returned product. This requirement overrides a narrow `fields` projection. An exclusion application returns a zero-match receipt; zero matches for any inclusion application leave no eligible inventory, so the seller MUST omit that product. If the same list is referenced for both inclusion and exclusion, those are separate applications and produce separate receipts on any product that remains eligible.
diff --git a/docs/media-buy/task-reference/get_media_buy_delivery.mdx b/docs/media-buy/task-reference/get_media_buy_delivery.mdx
index 9e7c5888c65..5ce96fe8228 100644
--- a/docs/media-buy/task-reference/get_media_buy_delivery.mdx
+++ b/docs/media-buy/task-reference/get_media_buy_delivery.mdx
@@ -40,7 +40,13 @@ page is not verification. `pagination` is available only with
`reporting_revision_id`; exact mode rejects every other delivery/filter selector.
When `account` is omitted, the seller searches all accounts accessible to the
authenticated caller. Unknown and unauthorized revision/account combinations return
-the same nondisclosing `REPORTING_REVISION_NOT_FOUND` result.
+the same nondisclosing [`REFERENCE_NOT_FOUND`](/docs/building/verification/compliance-catalog#error-code-reference-not-found) result.
+A revision the seller still owes within `status_retention_days` but cannot currently
+serve or verify — for example, its stored rows are missing or fail the binding —
+returns [`SERVICE_UNAVAILABLE`](/docs/building/verification/compliance-catalog#error-code-service-unavailable)
+to an authorized caller, never `REFERENCE_NOT_FOUND`, and
+[`get_reporting_status`](/docs/media-buy/task-reference/get_reporting_status) reports
+a `REVISION_UNREADABLE` issue for each affected obligation.
**Request Schema**: [`/schemas/v3/media-buy/get-media-buy-delivery-request.json`](https://adcontextprotocol.org/schemas/v3/media-buy/get-media-buy-delivery-request.json)
**Response Schema**: [`/schemas/v3/media-buy/get-media-buy-delivery-response.json`](https://adcontextprotocol.org/schemas/v3/media-buy/get-media-buy-delivery-response.json)
@@ -695,6 +701,8 @@ asyncio.run(main())
| [`VALIDATION_ERROR`](/docs/building/verification/compliance-catalog#error-code-validation-error) | Only one date is present, `end_date` is not after `start_date`, or a dated request spans products with different reporting timezones | Supply both dates with `start_date < end_date`. Narrow `media_buy_ids` to buys sharing one reporting timezone, or omit both dates for lifetime delivery |
| [`UNSUPPORTED_FEATURE`](/docs/building/verification/compliance-catalog#error-code-unsupported-feature) | Product only supports lifetime reporting | Omit `start_date` and `end_date`. Check `reporting_capabilities.date_range_support` on the product. |
| [`UNSUPPORTED_GRANULARITY`](/docs/building/verification/compliance-catalog#error-code-unsupported-granularity) | Requested `time_granularity` is not in the product's `windowed_pull_granularities` | Re-issue with a granularity from `error.details.supported_granularities`, or omit `time_granularity` to fall back to cumulative date-range pulls. See [Windowed pull recovery](#windowed-pull-recovery). |
+| [`REFERENCE_NOT_FOUND`](/docs/building/verification/compliance-catalog#error-code-reference-not-found) | Unknown or unauthorized `reporting_revision_id` + account combination (nondisclosing — expired, inaccessible, and absent revisions return the same response) | Verify the revision ID exists and is accessible to the authenticated account |
+| [`SERVICE_UNAVAILABLE`](/docs/building/verification/compliance-catalog#error-code-service-unavailable) | A retained `reporting_revision_id` whose content cannot currently be served or verified | Retry within the standard retry budget; if the open revision issue in [`get_reporting_status`](/docs/media-buy/task-reference/get_reporting_status) says `contact_seller`, stop retrying and escalate |
A valid query with no matching media buys succeeds with an empty `media_buy_deliveries` array.
diff --git a/docs/media-buy/task-reference/get_products.mdx b/docs/media-buy/task-reference/get_products.mdx
index d05cfdc07ff..c08d1251d23 100644
--- a/docs/media-buy/task-reference/get_products.mdx
+++ b/docs/media-buy/task-reference/get_products.mdx
@@ -702,6 +702,7 @@ result set. Otherwise confirmation remains a best practice.
| `name` | string | Human-readable product name |
| `description` | string | Detailed product description |
| `publisher_properties` | PublisherProperty[] | Array of publisher entries, each with `publisher_domain` and either `property_ids` or `property_tags` |
+| `channels` | MediaChannel[] | (Optional in 3.x) Buying contexts this product is sold as. Sellers SHOULD explicitly declare at least one channel on every product; existing 3.x property-based inheritance remains unchanged. Buyers should request `channels` in a `fields` projection before classification; omission from an unrequested projection does not establish an absent seller declaration. Creative formats and seller-wide capabilities do not independently declare product channels. See [Product channel declarations](/docs/media-buy/product-discovery/media-products#product-channel-declarations). |
| `format_options` | ProductFormatDeclaration[] | Closed canonical creative contracts this product can deliver, including optional seller-enforced `locale_policy.accepted_language_ranges` that buyers use to preflight planned creative languages before purchase. |
| `format_ids` | FormatID[] | Deprecated 3.x compatibility projection, when emitted. Locale-constrained options cannot be represented on this path. |
| `delivery_type` | string | `"guaranteed"` or `"non_guaranteed"` |
diff --git a/docs/media-buy/task-reference/get_reporting_status.mdx b/docs/media-buy/task-reference/get_reporting_status.mdx
index fb1afec6398..cd03bb327f7 100644
--- a/docs/media-buy/task-reference/get_reporting_status.mdx
+++ b/docs/media-buy/task-reference/get_reporting_status.mdx
@@ -224,6 +224,16 @@ window appear in the ledger. Consumers must not assume the latest snapshot is th
only relevant record, and must never treat an adjustment as authority to rewrite an
invoice or accounting book.
+If the seller cannot serve or verify the content of a revision it still owes — its
+stored rows are missing or no longer match `revision_content_sha256` — it opens a
+`REVISION_UNREADABLE` issue naming the revision and each affected obligation. The
+revision stays listed, the obligation is neither `healthy` nor `complete` while the
+issue is open, and exact reads return [`SERVICE_UNAVAILABLE`](/docs/building/verification/compliance-catalog#error-code-service-unavailable) rather than a not-found
+result. The issue is `delayed` with `wait_for_retry` while automatic repair runs and
+`action_required` with `contact_seller` once it cannot. It is retired when exact
+reads again return the committed content or the revision's retention window ends.
+An obligation whose official revision is lost never becomes `complete`.
+
`reporting_revision_id` is the portable AdCP identity. Every ready resource selects
immutable bytes or an immutable native snapshot/version—for example a Delta version,
Snowflake object identity, BigQuery snapshot, or manifest generation—and never
diff --git a/docs/protocol/get_principal.mdx b/docs/protocol/get_principal.mdx
index 37ca6191570..7450ca37793 100644
--- a/docs/protocol/get_principal.mdx
+++ b/docs/protocol/get_principal.mdx
@@ -8,6 +8,8 @@ description: "get_principal reads the authenticated caller's seller-resolved ide
The read is side-effect free. It never creates a principal record, issues identifiers, sends endpoint proof challenges, mutates state, or advances `configuration_version`.
+For the full lifecycle from credentials through destination proof and readback, see [Set up your buyer agent with a seller](/docs/accounts/principal-registration-walkthrough).
+
{/* Using latest because this experimental schema is not yet released. Update after release. */}
**Request schema:** [`/schemas/3.2.1/protocol/get-principal-request.json`](https://adcontextprotocol.org/schemas/3.2.1/protocol/get-principal-request.json)
diff --git a/docs/protocol/sync_principal.mdx b/docs/protocol/sync_principal.mdx
index fe2a91f7987..010699bbe7f 100644
--- a/docs/protocol/sync_principal.mdx
+++ b/docs/protocol/sync_principal.mdx
@@ -16,6 +16,8 @@ A **principal** is the durable party behind an authenticated caller — a buyer
The task does not register a buyer agent and does not accept a buyer-agent URL or identity in its body. Who the principal is comes only from authenticated transport.
+For an end-to-end buyer-side example, see [Set up your buyer agent with a seller](/docs/accounts/principal-registration-walkthrough).
+
{/* Using latest because this experimental schema is not yet released. Update after release. */}
**Request schema:** [`/schemas/3.2.1/protocol/sync-principal-request.json`](https://adcontextprotocol.org/schemas/3.2.1/protocol/sync-principal-request.json)
diff --git a/docs/reference/media-channel-taxonomy.mdx b/docs/reference/media-channel-taxonomy.mdx
index 742a3844166..b91e9e289f0 100644
--- a/docs/reference/media-channel-taxonomy.mdx
+++ b/docs/reference/media-channel-taxonomy.mdx
@@ -656,7 +656,11 @@ Properties in `adagents.json` declare which channels they support:
### Usage in Product Definitions
-Products declare which channels they are sold as. This typically inherits from properties but may be more specific:
+Products declare which channels they are sold as. This typically inherits from properties but may be more specific. Sellers SHOULD explicitly declare at least one channel on every product, with product channels a subset of the union of their properties' `supported_channels`. The existing 3.x inheritance behavior remains unchanged; an explicit declaration distinguishes the product's buying context from broader property support. Omission is not a wildcard for every channel in the taxonomy.
+
+Buyers should request `channels` when using a `fields` projection; omission from a projection that did not request the field does not establish that the seller omitted its declaration. Creative formats and seller-wide capabilities do not independently declare the product's buying context. For example, a VAST format can serve both `olv` and `ctv`.
+
+A product can narrow the channels its properties support:
```json
{
diff --git a/docs/reference/migration/channels.mdx b/docs/reference/migration/channels.mdx
index feb664a1a9e..86556ef790a 100644
--- a/docs/reference/migration/channels.mdx
+++ b/docs/reference/migration/channels.mdx
@@ -133,6 +133,20 @@ When products are returned from `get_products`, each product's `channels` array
}
```
+## Preparing product channels for 4.0
+
+[`Product.channels` is proposed to become required in 4.0](https://github.com/adcontextprotocol/adcp/issues/7869), with at least one value from the existing `MediaChannel` enum. The 3.x schemas still accept omitted or empty arrays, and the existing property-based inheritance remains unchanged. Sellers SHOULD populate an explicit nonempty declaration on every product now.
+
+For each product, declare the channels in which that inventory is sold. Use `ctv` for connected TV, `olv` for online video, and the relevant audio channels such as `radio`, `streaming_audio`, or `podcast`. A product sold in multiple buying contexts declares all applicable values. Product channels SHOULD be a subset of the union of their properties' `supported_channels`.
+
+Do not derive the declaration from creative format alone: a VAST video format can serve both `ctv` and `olv`. Do not copy a seller-wide channel list onto every product; a seller can sell different channels on different products.
+
+Format options keep optional `applies_to_channels` as a narrowing of the product declaration. Every listed value must belong to the product's `channels`. When the narrowing is omitted, the format option applies to all channels declared on that product. It does not independently declare the product's channels.
+
+Buyers reading 3.x products should request `channels` in any `fields` projection before classifying products. Omission from a projection that did not request the field does not establish that the seller omitted its declaration. Existing 3.x property-based inheritance remains supported; this preparation does not replace it with automatic exclusion from discovery or proposal routing. Omission is not a wildcard for every channel in the taxonomy. Declared channels describe buying contexts, not independent evidence of actual delivery or per-channel totals.
+
+The proposed 4.0 change would require an explicit nonempty declaration on the product, removing reliance on omission-based inheritance. Its treatment of missing channel details and sparse projections needs to be specified as part of that change. Buyers that also read 3.x responses still need to preserve the 3.x compatibility behavior.
+
## Declaring channel support in capabilities
Buyers should call `get_adcp_capabilities` before filtering `get_products`
diff --git a/docs/reference/release-notes.mdx b/docs/reference/release-notes.mdx
index c289133f254..43e6b7ddda9 100644
--- a/docs/reference/release-notes.mdx
+++ b/docs/reference/release-notes.mdx
@@ -9,6 +9,19 @@ Authoritative version-by-version release record for AdCP, with cumulative change
---
+## Version 3.2.4
+
+Maintenance patch for the stable 3.2 line. The release artifact and Git tag are `3.2.4` / `v3.2.4`. The wire version remains `"3.2"`; patch versions identify bundles and are never sent as `adcp_version`.
+
+- **Reliable Reporting (experimental):** `REVISION_UNREADABLE` identifies a published revision whose retained content the seller cannot serve or verify. The issue carries its obligation and revision IDs, names the seller as responsible, and pairs retry or escalation with the repair state. Authorized exact reads use the existing `SERVICE_UNAVAILABLE` error; unknown or unauthorized revisions retain `REFERENCE_NOT_FOUND`. An affected obligation is neither healthy nor complete. Strict readers must update their reporting schema definitions before accepting the new issue.
+- **Conformance corrections:** required billing capability discovery, active non-guaranteed lifecycle acceptance, the advanced-reporting fixture account join, typed proposal seeding and phase dependencies, and minimum-spend fixture placement. Existing controller-seeded storyboards declare their controller requirement so agents without a controller skip the whole storyboard rather than receive misleading fixture failures.
+- **Signing and canonicalization coverage:** additional vectors and 3.2-profile mirrors test existing header, authority, and URL canonicalization rules. The raw non-ASCII host vector uses the malformed-target error already specified by the 3.2 profile; no signing format or covered component changes.
+- **Schemas and guidance:** compose existing version/protocol envelopes in compact schemas, deduplicate provenance in bundled schemas without changing the wire contract, and clarify product channel declarations and experimental principal setup.
+
+This patch does not advance the scheduled mandatory consumer-status task or superseded-snapshot compaction changes. SDKs must synchronize from the published 3.2.4 bundle before claiming support for its new reporting issue.
+
+---
+
## Version 3.2.1
**Status:** General availability, published 2026-09-30. AdCP 3.2 is a minor release. The release artifact and Git tag are `3.2.1` / `v3.2.1`, and the stable wire value is `"3.2"`. The number `3.2.0` was never released, so `3.2.1` is the first stable 3.2 artifact. 3.1 stays supported for integrations pinned to `"3.1"`. Send `"3.2"` only after a peer lists it in `get_adcp_capabilities.adcp.supported_versions`.
diff --git a/docs/reference/whats-new-in-3-2.mdx b/docs/reference/whats-new-in-3-2.mdx
index 460889659a7..8cc9fa5ed20 100644
--- a/docs/reference/whats-new-in-3-2.mdx
+++ b/docs/reference/whats-new-in-3-2.mdx
@@ -176,7 +176,7 @@ See the [compliance catalog](/docs/building/verification/compliance-catalog#choo
- **Account settings.** Sellers declare account time zones and currency modes.
- **Cache invalidation.** `capabilities.changed` and `account.status_changed` tell caches when to refresh.
- **Account change feed (experimental).** `list_account_changes` is an optional, capability-gated feed of material changes to a shared account, including changes made outside your own calls. It ships as experimental feature `account.change_feed` while [RFC #6810](https://github.com/adcontextprotocol/adcp/issues/6810) is open.
-- **Authenticated principals (experimental).** `sync_principal` and `get_principal` hold a caller's standing relationship with a seller: caller-level webhooks with a one-call kill switch, reusable reporting destinations, and declarations of which async versions, signing algorithms, and experimental features the caller can consume. Principal configuration never grants advertiser-account authority.
+- **Authenticated principals (experimental).** `sync_principal` and `get_principal` hold a caller's standing relationship with a seller: caller-level webhooks with a one-call kill switch, reusable reporting destinations, and declarations of which async versions, signing algorithms, and experimental features the caller can consume. Principal configuration never grants advertiser-account authority. Follow the buyer-side flow in [Set up your buyer agent with a seller](/docs/accounts/principal-registration-walkthrough).
### Creative: one traceable path from brief to replay
diff --git a/docs/snippets/compliance-storyboard-inventory.mdx b/docs/snippets/compliance-storyboard-inventory.mdx
index 041d2364497..fde95c5d6ec 100644
--- a/docs/snippets/compliance-storyboard-inventory.mdx
+++ b/docs/snippets/compliance-storyboard-inventory.mdx
@@ -47,7 +47,7 @@ description: "Graded universal compliance storyboards that every AdCP agent runs
| `schema-validation` | Validates that agent responses conform to AdCP schemas and that temporal constraints are enforced. | [YAML](https://adcontextprotocol.org/compliance/latest/universal/schema-validation.yaml) |
| `schema-validation-signals` | Validates that signals agent responses conform to AdCP schemas with all required fields present and correctly typed. | [YAML](https://adcontextprotocol.org/compliance/latest/universal/schema-validation-signals.yaml) |
| `security` | Every AdCP agent MUST require authentication on protected operations. At least one of static credentials or OAuth MUST be implemented and correctly advertised. | [YAML](https://adcontextprotocol.org/compliance/latest/universal/security.yaml) |
-| `signed-requests` | Agent verifies RFC 9421 HTTP Signatures on incoming AdCP requests per the 3.1-compatible transport-layer profile. Universal capability-gated storyboard — runs for any agent advertising {"request_signing.supported: true"} regardless of {"supported_protocols"}. Graded against the legacy wire suite covering every 3.1 checklist step and canonicalization-edge rule. | [YAML](https://adcontextprotocol.org/compliance/latest/universal/signed-requests.yaml) |
+| `signed-requests` | Agent verifies RFC 9421 HTTP Signatures on incoming AdCP requests per the 3.1-compatible transport-layer profile. Universal capability-gated storyboard — runs for any agent advertising {"request_signing.supported: true"} regardless of {"supported_protocols"}. Graded against the legacy wire suite covering every 3.1 checklist step and canonicalization-edge rule; a verifier advertising {"covers_content_digest: \"required\""} (every 3.2+ verifier) is graded against the {"profile-3.2/"} mirror, which carries a counterpart of every legacy vector (positive {"001"} and {"002"} collapse into {"positive/001-post-with-content-digest"}) except {"negative/018"} ({"forbidden"} is illegal in 3.2). | [YAML](https://adcontextprotocol.org/compliance/latest/universal/signed-requests.yaml) |
| `stale-response-advisory` | Validates that STALE_RESPONSE rides in errors[] on a populated success response with transport success preserved, and that STALE_RESPONSE is absent on healthy upstream responses. | [YAML](https://adcontextprotocol.org/compliance/latest/universal/stale-response-advisory.yaml) |
| `trusted-match-publisher-authentication` | Verifies that a TMP router deployment rejects schema-valid Context Match and Identity Match requests with absent or invalid publisher authentication using HTTP 401 and a WWW-Authenticate challenge. | [YAML](https://adcontextprotocol.org/compliance/latest/universal/trusted-match-publisher-authentication.yaml) |
| `v3-envelope-integrity` | v3 protocol envelopes MUST NOT carry task_status or response_status — v2 legacy field names that have no semantics in v3. | [YAML](https://adcontextprotocol.org/compliance/latest/universal/v3-envelope-integrity.yaml) |
diff --git a/package.json b/package.json
index ed21adde7c6..d9b26111acf 100644
--- a/package.json
+++ b/package.json
@@ -105,6 +105,7 @@
"test:storyboard-check-enum": "node --test --test-force-exit --test-timeout=30000 tests/lint-storyboard-check-enum.test.cjs tests/policy-backed-rejections-storyboard.test.cjs",
"test:update-media-buy-affected-packages": "node --test --test-force-exit --test-timeout=30000 tests/lint-update-media-buy-affected-packages.test.cjs",
"test:storyboard-advisory-expiry": "node --test --test-force-exit --test-timeout=30000 tests/lint-storyboard-advisory-expiry.test.cjs",
+ "test:storyboard-controller-requires": "node --test --test-force-exit --test-timeout=30000 tests/lint-storyboard-controller-requires.test.cjs",
"test:storyboard-raw-mode-required": "node --test --test-force-exit --test-timeout=30000 tests/lint-storyboard-raw-mode-required.test.cjs",
"test:storyboard-upstream-traffic-paths": "node --test --test-force-exit --test-timeout=30000 tests/lint-storyboard-upstream-traffic-paths.test.cjs",
"test:storyboard-generate-phase-scope": "node --test --test-force-exit --test-timeout=30000 tests/lint-storyboard-generate-phase-scope.test.cjs",
@@ -125,6 +126,7 @@
"test:certification-demo-formatting": "vitest run server/tests/unit/certification-demo-formatting.test.ts",
"test:build-schemas-hoist-enums": "node --test --test-force-exit --test-timeout=30000 tests/build-schemas-hoist-enums.test.cjs",
"test:build-schemas-hoist-marked": "node --test --test-force-exit --test-timeout=30000 tests/build-schemas-hoist-marked.test.cjs",
+ "test:build-schemas-hoist-by-identity": "node --test --test-force-exit --test-timeout=30000 tests/build-schemas-hoist-by-identity.test.cjs",
"test:build-schemas-async-response-refs": "node --test --test-force-exit --test-timeout=30000 tests/build-schemas-async-response-refs.test.cjs",
"test:build-schemas-vendor-metric-uniqueness": "node --test --test-force-exit --test-timeout=30000 tests/build-schemas-vendor-metric-uniqueness.test.cjs",
"test:release-workflow": "node tests/release-workflow-immutability.test.cjs && node --test tests/release-publication-ordering.test.cjs tests/changesets-fence.test.cjs tests/release-supersession.test.cjs tests/skip-withdrawn-release.test.cjs && node tests/promote-release-candidate.test.cjs && node tests/published-compliance-versions.test.cjs && node --test --test-timeout=30000 tests/cdn-artifacts.test.cjs tests/artifact-cdn-worker.test.cjs",
@@ -162,7 +164,7 @@
"audit:verification-profile-shadow": "tsx server/src/scripts/audit-verification-profile-shadow.ts",
"test:schema-utf8": "node scripts/normalize-schema-utf8.mjs --check",
"fix:schema-utf8": "node scripts/normalize-schema-utf8.mjs",
- "test": "npm run test:sdk-response-conformance && npm run test:docs-nav && npm run test:owned-links && npm run test:release-docs-nav && npm run test:rewrite-dist-redirect-links && npm run test:rewrite-dist-links-idempotency && npm run test:docs-error-handling-copy && npm run test:schemas && npm run test:performance-feedback && npm run test:mcp-schema-projection && npm run test:dist-schema-version-ids && npm run test:examples && npm run test:extensions && npm run test:extension-schemas && npm run test:error-handling && npm run test:json-schema && npm run test:audio-radio && npm run test:adagents-catalog-only && npm run test:fast-channel-collections && npm run test:collection-selection-echo && npm run test:canonical-reference-resolver && npm run test:composed && npm run test:rejection-arm-mutex && npm run test:migrations && npm run test:hmac-vectors && npm run test:hmac-signer-conformance && npm run test:webhook-signing-vectors && npm run test:functional-request-signing-contract && npm run test:webhook-receiver-envelope && npm run test:webhook-emission-storyboard && npm run test:oauth-setup-vectors && npm run test:a2a-profile-extension && npm run test:transport-errors && npm run test:targeting-overlay-vectors && npm run test:targeting-null-clear && npm run test:targeting-aware-discovery && npm run test:demographic-targeting && npm run test:audience-activation-methods && npm run test:principal && npm run test:audience-external-sources && npm run test:language-targeting && npm run test:availability-horizon && npm run test:attestation-vectors && npm run test:rights-attestations && npm run test:governance-runtime-attestations && npm run test:governance-conditions-storyboard && npm run test:signal-governance-storyboard && npm run test:governance-task-slices && npm run test:audience-evidence && npm run test:status-as-of-vectors && npm run test:storyboard-scoping && npm run test:storyboard-branch-sets && npm run test:storyboard-provides-state-for && npm run test:storyboard-fixture-resolution && npm run test:storyboard-contradictions && npm run test:storyboard-context-entity && npm run test:storyboard-auth-shape && npm run test:storyboard-test-kits && npm run test:storyboard-buyer-fixture-lifecycle-tools && npm run test:storyboard-buyer-fixture-products && npm run test:compliance-packaged-refs && npm run test:compliance-source-authority && npm run test:storyboard-sample-request-schema && npm run test:storyboard-response-schema && npm run test:storyboard-context-output-paths && npm run test:storyboard-validations-paths && npm run test:storyboard-check-enum && npm run test:update-media-buy-affected-packages && npm run test:storyboard-advisory-expiry && npm run test:storyboard-raw-mode-required && npm run test:storyboard-upstream-traffic-paths && npm run test:storyboard-generate-phase-scope && npm run test:refine-finalize-validation-ids && npm run test:run-storyboards-schema-root && npm run test:storyboard-doc-parity && npm run test:pagination-invariant && npm run test:version-envelope && npm run test:test-dynamic-imports && npm run test:sdk-shims && npm run test:format-identity-boundaries && npm run test:sdk-runner-capability-gates && npm run test:callapi-state-change && npm run test:sign-protocol-tarball && npm run test:chat-streaming-code-fences && npm run test:certification-demo-formatting && npm run test:build-schemas-hoist-enums && npm run test:build-schemas-hoist-marked && npm run test:build-schemas-async-response-refs && npm run test:build-schemas-vendor-metric-uniqueness && npm run test:release-workflow && npm run test:immutable-release-artifacts && npm run test:patch-3-0-compat-bundle && npm run test:error-codes && npm run test:compliance-snippets && npm run test:doc-compliance-drift && npm run test:substitution-vector-names && npm run test:platform-agnostic && npm run test:oneof-discriminators && npm run test:schema-utf8 && npm run test:unit && npm run test:server-unit && npm run test:openapi && npm run typecheck && npm run test:contracts && npm run test:example-validation && npm run test:test-coverage",
+ "test": "npm run test:sdk-response-conformance && npm run test:docs-nav && npm run test:owned-links && npm run test:release-docs-nav && npm run test:rewrite-dist-redirect-links && npm run test:rewrite-dist-links-idempotency && npm run test:docs-error-handling-copy && npm run test:schemas && npm run test:performance-feedback && npm run test:mcp-schema-projection && npm run test:dist-schema-version-ids && npm run test:examples && npm run test:extensions && npm run test:extension-schemas && npm run test:error-handling && npm run test:json-schema && npm run test:audio-radio && npm run test:adagents-catalog-only && npm run test:fast-channel-collections && npm run test:collection-selection-echo && npm run test:canonical-reference-resolver && npm run test:composed && npm run test:rejection-arm-mutex && npm run test:migrations && npm run test:hmac-vectors && npm run test:hmac-signer-conformance && npm run test:webhook-signing-vectors && npm run test:functional-request-signing-contract && npm run test:webhook-receiver-envelope && npm run test:webhook-emission-storyboard && npm run test:oauth-setup-vectors && npm run test:a2a-profile-extension && npm run test:transport-errors && npm run test:targeting-overlay-vectors && npm run test:targeting-null-clear && npm run test:targeting-aware-discovery && npm run test:demographic-targeting && npm run test:audience-activation-methods && npm run test:principal && npm run test:audience-external-sources && npm run test:language-targeting && npm run test:availability-horizon && npm run test:attestation-vectors && npm run test:rights-attestations && npm run test:governance-runtime-attestations && npm run test:governance-conditions-storyboard && npm run test:signal-governance-storyboard && npm run test:governance-task-slices && npm run test:audience-evidence && npm run test:status-as-of-vectors && npm run test:storyboard-scoping && npm run test:storyboard-branch-sets && npm run test:storyboard-provides-state-for && npm run test:storyboard-fixture-resolution && npm run test:storyboard-contradictions && npm run test:storyboard-context-entity && npm run test:storyboard-auth-shape && npm run test:storyboard-test-kits && npm run test:storyboard-buyer-fixture-lifecycle-tools && npm run test:storyboard-buyer-fixture-products && npm run test:compliance-packaged-refs && npm run test:compliance-source-authority && npm run test:storyboard-sample-request-schema && npm run test:storyboard-response-schema && npm run test:storyboard-context-output-paths && npm run test:storyboard-validations-paths && npm run test:storyboard-check-enum && npm run test:update-media-buy-affected-packages && npm run test:storyboard-advisory-expiry && npm run test:storyboard-controller-requires && npm run test:storyboard-raw-mode-required && npm run test:storyboard-upstream-traffic-paths && npm run test:storyboard-generate-phase-scope && npm run test:refine-finalize-validation-ids && npm run test:run-storyboards-schema-root && npm run test:storyboard-doc-parity && npm run test:pagination-invariant && npm run test:version-envelope && npm run test:test-dynamic-imports && npm run test:sdk-shims && npm run test:format-identity-boundaries && npm run test:sdk-runner-capability-gates && npm run test:callapi-state-change && npm run test:sign-protocol-tarball && npm run test:chat-streaming-code-fences && npm run test:certification-demo-formatting && npm run test:build-schemas-hoist-enums && npm run test:build-schemas-hoist-marked && npm run test:build-schemas-hoist-by-identity && npm run test:build-schemas-async-response-refs && npm run test:build-schemas-vendor-metric-uniqueness && npm run test:release-workflow && npm run test:immutable-release-artifacts && npm run test:patch-3-0-compat-bundle && npm run test:error-codes && npm run test:compliance-snippets && npm run test:doc-compliance-drift && npm run test:substitution-vector-names && npm run test:platform-agnostic && npm run test:oneof-discriminators && npm run test:schema-utf8 && npm run test:unit && npm run test:server-unit && npm run test:openapi && npm run typecheck && npm run test:contracts && npm run test:example-validation && npm run test:test-coverage",
"test:all": "npm run test:schemas && npm run test:examples && npm run test:extensions && npm run test:error-handling && npm run test:snippets && npm run typecheck",
"precommit:server-unit": "node scripts/precommit-server-unit.cjs",
"precommit": "bash scripts/with-timeout.sh 180 npm run test:unit && npm run test:test-dynamic-imports && npm run test:format-identity-boundaries && npm run test:callapi-state-change && bash scripts/with-timeout.sh 1500 npm run precommit:server-unit && npm run typecheck",
diff --git a/scripts/build-compliance.cjs b/scripts/build-compliance.cjs
index 47626ed100c..a7ca8fe9b5d 100644
--- a/scripts/build-compliance.cjs
+++ b/scripts/build-compliance.cjs
@@ -809,6 +809,20 @@ function main() {
process.exit(1);
}
+ // Controller-requires lint: storyboards that seed through
+ // comply_test_controller (prerequisites.controller_seeding: true) MUST
+ // declare requires: [controller] so a seller without a controller gets one
+ // storyboard-level requirement_unmet skip, not per-step
+ // missing_test_controller grades. adcontextprotocol/adcp#7858.
+ try {
+ execSync('node scripts/lint-storyboard-controller-requires.cjs', {
+ cwd: path.join(__dirname, '..'),
+ stdio: 'inherit',
+ });
+ } catch {
+ process.exit(1);
+ }
+
// Upstream-traffic path lint: identifier_paths use a small portable
// request-payload-relative grammar so runners don't diverge on JSONPath
// variants, numeric indexes, or explicit roots. adcontextprotocol/adcp#5073.
diff --git a/scripts/build-schemas.cjs b/scripts/build-schemas.cjs
index cba3c145fb2..a77d9ef14c1 100644
--- a/scripts/build-schemas.cjs
+++ b/scripts/build-schemas.cjs
@@ -1595,20 +1595,31 @@ function findSchemaFiles(dir, baseDir = dir) {
* true circular references (A → B → A). This is different from multiple
* references to the same schema from different locations, which should
* all be resolved.
+ *
+ * `options.hoistRefs` (a Map of `/schemas/...` ref -> `{ defName, count }`)
+ * is set only by `hoistBySourceIdentity`: listed refs are rewritten to
+ * `#/$defs/` instead of inlined, and `count` tallies call-sites.
*/
-function resolveRefs(schema, sourceDir, ancestorRefs = new Set()) {
+function resolveRefs(schema, sourceDir, ancestorRefs = new Set(), options = {}) {
if (!schema || typeof schema !== 'object') {
return schema;
}
if (Array.isArray(schema)) {
- return schema.map(item => resolveRefs(item, sourceDir, ancestorRefs));
+ return schema.map(item => resolveRefs(item, sourceDir, ancestorRefs, options));
}
const result = {};
for (const [key, value] of Object.entries(schema)) {
- if (key === '$ref' && typeof value === 'string' && value.startsWith('/schemas/')) {
+ if (key === '$ref' && typeof value === 'string' && options.hoistRefs && options.hoistRefs.has(value)) {
+ // Source-identity hoist (see `hoistBySourceIdentity`): point at the
+ // root `$defs` entry instead of inlining. Sibling keys (notably the
+ // per-call-site `description`) are visited as ordinary keys of this
+ // object and survive untouched.
+ options.hoistRefs.get(value).count++;
+ result[key] = `#/$defs/${options.hoistRefs.get(value).defName}`;
+ } else if (key === '$ref' && typeof value === 'string' && value.startsWith('/schemas/')) {
// Resolve the reference
const externalRef = value.replace('/schemas/', '');
const hashIndex = externalRef.indexOf('#');
@@ -1643,7 +1654,7 @@ function resolveRefs(schema, sourceDir, ancestorRefs = new Set()) {
const newAncestors = new Set(ancestorRefs);
newAncestors.add(ancestorKey);
// Recursively resolve refs in the referenced schema
- const resolvedRef = resolveRefs(refContent, sourceDir, newAncestors);
+ const resolvedRef = resolveRefs(refContent, sourceDir, newAncestors, options);
// Merge the resolved content. Drop `$schema` (only meaningful at
// document root). Preserve `$id` on the inlined subtree so SDK
// error reporting can name the deep sub-schema (#3868) — if the
@@ -1661,13 +1672,92 @@ function resolveRefs(schema, sourceDir, ancestorRefs = new Set()) {
result[key] = value;
}
} else {
- result[key] = resolveRefs(value, sourceDir, ancestorRefs);
+ result[key] = resolveRefs(value, sourceDir, ancestorRefs, options);
}
}
return result;
}
+/**
+ * Resolve every `$ref` like `resolveRefs`, except that refs to the listed
+ * source schemas are NOT inlined. Each one is written once to the root
+ * `$defs` (named after the source schema's `title`) and every call-site
+ * becomes `{ "$ref": "#/$defs/", ...siblings }`.
+ *
+ * Why identity-based and not `x-adcp-hoist`: `hoistMarkedSchemas` matches
+ * on inlined content and replaces the whole node, which drops `$ref`
+ * siblings. Call-site `description`s (e.g. "overrides manifest-level
+ * provenance") are real adopter information, so they must stay next to the
+ * `$ref`. Siblings are already merged into the inlined body by the time
+ * a post-inline pass runs, so the hoist has to happen while resolving.
+ *
+ * Wire-neutral: the sibling keys are annotation-only (`description`), and
+ * the `$defs` entry is the same body that used to be inlined at each site.
+ * Source schemas are untouched.
+ *
+ * `refPaths` are `/schemas/...` refs without a fragment, e.g.
+ * `/schemas/core/provenance.json`. A listed ref is hoisted only when it
+ * appears 2+ times in the resolved schema; otherwise it is inlined as
+ * before and no `$defs` entry is added.
+ */
+function hoistBySourceIdentity(schema, sourceDir, refPaths, ancestorRefs = new Set()) {
+ const hoistRefs = new Map();
+ const bodies = new Map();
+ for (const refPath of refPaths) {
+ if (!refPath.startsWith('/schemas/') || refPath.includes('#')) {
+ throw new Error(`hoistBySourceIdentity: expected a /schemas/ ref without a fragment, got '${refPath}'.`);
+ }
+ // A missing source file just means this tree never references it
+ // (synthetic fixtures); a real dangling ref is handled by `resolveRefs`.
+ const sourceFile = path.join(sourceDir, refPath.replace('/schemas/', ''));
+ if (!fs.existsSync(sourceFile)) continue;
+ const source = JSON.parse(fs.readFileSync(sourceFile, 'utf8'));
+ const defName = typeof source.title === 'string' ? source.title.replace(/[^A-Za-z0-9_]/g, '') : '';
+ if (!defName || ['__proto__', 'constructor', 'prototype'].includes(defName)) {
+ throw new Error(`hoistBySourceIdentity: ${refPath} needs a usable \`title\` to name its $defs entry.`);
+ }
+ hoistRefs.set(refPath, { defName, count: 0 });
+ bodies.set(refPath, source);
+ }
+
+ let options = { hoistRefs };
+ let result = resolveRefs(schema, sourceDir, ancestorRefs, options);
+
+ // Like `hoistDuplicateInlineEnums`, only hoist what repeats. A single
+ // call-site gains nothing from a `$defs` indirection, and the local
+ // `#/$defs/...` ref would make `stripIdsFromSubtreesWithLocalRefs` drop
+ // the `$id` of every enclosing inlined schema. Re-resolve without the
+ // singletons so those bundles stay byte-identical to before.
+ let hasSingleton = false;
+ for (const [refPath, entry] of [...hoistRefs]) {
+ if (entry.count === 1) hasSingleton = true;
+ if (entry.count < 2) hoistRefs.delete(refPath);
+ }
+ if (hasSingleton) {
+ for (const refPath of [...bodies.keys()]) if (!hoistRefs.has(refPath)) bodies.delete(refPath);
+ for (const entry of hoistRefs.values()) entry.count = 0;
+ options = { hoistRefs };
+ result = resolveRefs(schema, sourceDir, ancestorRefs, options);
+ }
+ if (!result || typeof result !== 'object' || Array.isArray(result)) return result;
+
+ for (const [refPath, entry] of hoistRefs) {
+ // Resolve the body once; its internal refs (enums, ext) inline exactly
+ // as they did at every old call-site.
+ const refFile = path.join(sourceDir, refPath.replace('/schemas/', ''));
+ const { $schema, ...body } = resolveRefs(bodies.get(refPath), sourceDir, new Set([...ancestorRefs, refFile]), options);
+ result.$defs = result.$defs || {};
+ if (Object.prototype.hasOwnProperty.call(result.$defs, entry.defName)) {
+ throw new Error(
+ `hoistBySourceIdentity: root $defs already defines '${entry.defName}'; cannot hoist ${refPath} under that name.`
+ );
+ }
+ result.$defs[entry.defName] = body;
+ }
+ return result;
+}
+
/**
* Hoist nested `$defs` and `definitions` blocks to the document root.
*
@@ -2197,6 +2287,14 @@ function dedupBundledSchemaIds(schema) {
walk(schema, true);
}
+/**
+ * Source schemas that are hoisted to root `$defs` by identity rather than
+ * inlined at every `$ref` call-site. `core/provenance.json` is referenced
+ * from ~25 asset/manifest schemas, so inlining multiplied its ~300-line
+ * body 40-80x per bundled response. See #4875.
+ */
+const IDENTITY_HOISTED_REFS = ['/schemas/core/provenance.json'];
+
/**
* Generate bundled (dereferenced) schemas
* These have all $ref resolved inline for tools that can't handle references
@@ -2241,8 +2339,10 @@ async function generateBundledSchemas(sourceDir, bundledDir, version) {
// Read the schema
const schema = JSON.parse(fs.readFileSync(schemaPath, 'utf8'));
- // Resolve all $refs
- const dereferenced = resolveRefs(schema, sourceDir, new Set([schemaPath]));
+ // Resolve all $refs. Schemas listed in IDENTITY_HOISTED_REFS are
+ // written once to root $defs instead of being inlined at every
+ // call-site, keeping per-call-site `description` siblings. See #4875.
+ const dereferenced = hoistBySourceIdentity(schema, sourceDir, IDENTITY_HOISTED_REFS, new Set([schemaPath]));
// After inlining, referenced schemas that carried local `#/$defs/...`
// pointers leave their `$defs` nested wherever they were inlined —
@@ -2736,6 +2836,7 @@ module.exports = {
generateExtensionRegistry,
hoistDuplicateInlineEnums,
hoistMarkedSchemas,
+ hoistBySourceIdentity,
resolveRefs,
versionInlineSchemaIds,
dedupBundledSchemaIds,
diff --git a/scripts/generate-request-signing-profile-3.2-vectors.mjs b/scripts/generate-request-signing-profile-3.2-vectors.mjs
index fbbb2085f58..7e34ccd0f60 100644
--- a/scripts/generate-request-signing-profile-3.2-vectors.mjs
+++ b/scripts/generate-request-signing-profile-3.2-vectors.mjs
@@ -8,9 +8,11 @@
* advertises `covers_content_digest: "required"` — the only posture a 3.2
* signing peer may advertise — cannot grade them. This script derives a
* 3.2 counterpart for each legacy positive vector and for each legacy negative
- * that tests checklist steps 2–12, under `profile-3.2/{positive,negative}/`.
- * Each counterpart keeps the SAME number and slug as the root vector it
- * mirrors; root vectors that are not mirrored leave gaps. Root positive/001
+ * that tests checklist steps 2–12, plus the step-0 and step-1 negatives
+ * (adcp#7733), under `profile-3.2/{positive,negative}/`. Each counterpart keeps
+ * the SAME number and slug as the root vector it mirrors; root vectors that
+ * are not mirrored leave gaps (negative/018 is the only intentional one:
+ * `forbidden` is illegal in 3.2). Root positive/001
* and positive/002 are both covered by the pre-existing hand-authored
* profile-3.2/positive/001-post-with-content-digest (in 3.2 a basic POST is a
* POST with content-digest), so they are not generated here.
@@ -31,6 +33,21 @@
* negatives keep the legacy 64-zero-byte placeholder so a verifier that runs
* crypto before the targeted check fails with `request_signature_invalid`
* (step-ordering canary), exactly like their 3.1 originals.
+ * - Step-0/1 mirrors (adcp#7733) are single-fault: covering `content-digest`
+ * removes the step-6 fault a `required` verifier would otherwise find first.
+ * Where the fault does not depend on the signature bytes (021–024, 026,
+ * 029–031) the Signature is real, so a signature the verifier can validate
+ * is not a second fault; 019 is a real Signature whose Signature-Input was
+ * stripped. 011 (unparseable Signature-Input, so no base exists) keeps the
+ * placeholder. Unsigned vectors (001, 027, 028) stay unsigned and carry only
+ * a correct Content-Digest. Duplicated members (021, 023, 029, 030) repeat the
+ * same correct value so that keeping either member finds no second fault.
+ * - Per-definition overrides: `paramsFrom` reads sig-params from another
+ * legacy vector (019 has no Signature-Input of its own), `keepHeaders`
+ * carries a legacy header such as Host, and `kind` selects unsigned /
+ * malformed-input / signature-only shapes. The test suite recomputes the
+ * base independently where a Signature-Input exists and otherwise checks
+ * the committed base.
*
* Ed25519 is deterministic. ES256 (ECDSA) is not, so an existing ES256
* signature is kept whenever it still verifies over the regenerated base;
@@ -57,6 +74,10 @@ const DIGEST_COMPONENTS = ['@method', '@target-uri', '@authority', 'content-type
const ZERO_SIGNATURE = Buffer.alloc(64).toString('base64');
const PROFILE_NOTE =
'AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest=\'required\'.';
+const UNSIGNED_PROFILE_NOTE =
+ 'AdCP 3.2 profile: the verifier advertises covers_content_digest=\'required\' and the request carries a correct Content-Digest, but no usable signature is presented, so the step-0 fault is the only fault.';
+const MALFORMED_PROFILE_NOTE =
+ 'AdCP 3.2 profile: the verifier advertises covers_content_digest=\'required\' and the request carries a correct Content-Digest.';
const PLACEHOLDER_NOTE =
'Signature is the 64-zero-byte placeholder (step-ordering canary): the targeted check runs before cryptographic verification, so a verifier that verifies first returns request_signature_invalid instead of the expected code.';
@@ -117,6 +138,31 @@ const DEFINITIONS = [
name: 'AdCP 3.2 IPv6 literal authority with explicit :443; port stripped, brackets preserved (content-digest covered)',
},
+ {
+ from: 'positive/013-two-signature-labels-distinct.json',
+ name: 'AdCP 3.2 two distinct labels on both Signature-Input and Signature — verifier processes sig1 and does not reject the dictionaries (content-digest covered)',
+ extraLabel: {
+ label: 'sig2',
+ components: ['@method', '@target-uri', '@authority'],
+ nonce: 'm4Fq2xYt9ZbCwLJd7sVn8g',
+ signatureFromLegacy: true,
+ },
+ expectedOutcome: { success: true, verified_label: 'sig1' },
+ comment: 'False-positive guard for negative/029 and 021. sig1 is a valid signature covering content-digest. sig2 has a different covered-components set, a different nonce, and a well-formed 64-byte value (the root vector\'s bytes, re-encoded as standard padded Base64) that does not verify. Verifiers MUST process exactly one label (conventionally sig1) and ignore the rest; attempting sig2 and rejecting is non-conformant.',
+ },
+ {
+ from: 'positive/014-content-digest-two-algorithms.json',
+ name: 'AdCP 3.2 Content-Digest carries sha-256 and sha-512, both correct — distinct algorithm keys are legal (content-digest covered)',
+ contentDigest: body => `${contentDigestFor(body)}, ${contentDigestFor(body, 'sha512')}`,
+ comment: 'False-positive guard for negative/023 and 030. Both members are the correct digest of the body in standard padded Base64, and the Signature is a real Ed25519 signature over expected_signature_base, which carries the Content-Digest value verbatim.',
+ },
+ {
+ from: 'positive/015-bracketed-ipv6-host-with-port.json',
+ name: 'AdCP 3.2 bracketed IPv6 literal with non-default port in both the URL and the Host header (content-digest covered)',
+ keepHeaders: ['Host'],
+ comment: 'False-positive guard for negative/031. The Host header byte-matches the authority of the canonical @target-uri, so @authority is [2001:db8::1]:8443 and the request verifies.',
+ },
+
// ── Negative (checklist steps 2–12) ─────────────────────────────────────
{
from: 'negative/002-wrong-tag.json',
@@ -223,6 +269,86 @@ const DEFINITIONS = [
name: 'AdCP 3.2 JWK declares alg=EdDSA but crv=P-256, parameter mismatch on presented key (content-digest covered)',
placeholder: true,
},
+ // ── Negative (pre-check 0 and checklist step 1, adcp#7733) ─────────────
+ // These are single-fault under `required`: content-digest is covered (where
+ // a Signature-Input exists), so the step-0/1 fault is the only one.
+ {
+ from: 'negative/001-no-signature-header.json',
+ name: 'AdCP 3.2 unsigned request to an operation in required_for (Content-Digest sent, nothing signed)',
+ kind: 'unsigned',
+ },
+ {
+ from: 'negative/011-malformed-header.json',
+ name: 'AdCP 3.2 Signature-Input present but syntactically invalid (downgrade protection; Content-Digest sent)',
+ kind: 'malformed-input',
+ comment: 'The Signature-Input value is not parseable, so there is no covered-components list in which content-digest could be covered and no signature base to sign.',
+ },
+ {
+ from: 'negative/019-signature-without-signature-input.json',
+ name: 'AdCP 3.2 Signature header present but Signature-Input header absent (downgrade loophole; content-digest covered in the stripped shape)',
+ kind: 'signature-only',
+ paramsFrom: 'positive/001-basic-post.json',
+ // Pre-check bullets are ordered in the spec (required_for with no credential, then the header pair), so an
+ // operation outside required_for keeps the header-pair rule the only rule that applies.
+ requiredFor: [],
+ comment: 'The operation is not in required_for, so the unpaired Signature is the only fault whatever order the pre-check bullets are read in. The request is a correctly signed 3.2 request (content-digest covered) whose Signature-Input a proxy stripped. The Signature is a real Ed25519 signature by test-ed25519-2026 over expected_signature_base, the base the stripped Signature-Input would have described; no other fault is present, so rejecting at step 1 is the only conformant outcome.',
+ },
+ {
+ from: 'negative/021-duplicate-signature-input-label.json',
+ name: 'AdCP 3.2 Signature-Input header declares label \'sig1\' twice (malformed structured dictionary, content-digest covered)',
+ dupLabel: true,
+ comment: 'The Signature-Input header repeats the same sig1 member twice, byte for byte; it covers content-digest and its Signature is a valid Ed25519 signature over expected_signature_base. A verifier that keeps either member therefore verifies the request, so the duplicate label is the only fault. (The root vector\'s second member is weaker; the 3.2 mirror repeats the first so that no second fault is reachable by keeping the last one.)',
+ },
+ {
+ from: 'negative/022-multi-valued-content-type.json',
+ name: 'AdCP 3.2 Content-Type header sent as multiple field values (malformed — covered field must be single-valued, content-digest covered)',
+ comment: 'The Signature is a valid Ed25519 signature over expected_signature_base, which carries the Content-Type value exactly as sent, so the multi-valued field is the only fault.',
+ },
+ {
+ from: 'negative/023-multi-valued-content-digest.json',
+ name: 'AdCP 3.2 Content-Digest header sent as multiple field values (malformed, content-digest covered)',
+ contentDigest: body => `${contentDigestFor(body)}, ${contentDigestFor(body)}`,
+ comment: 'Both Content-Digest members are the correct sha-256 of the body, so a verifier that keeps either one finds a matching digest. The Signature is a valid Ed25519 signature over expected_signature_base, which carries the Content-Digest value exactly as sent, so the repeated algorithm is the only fault.',
+ },
+ {
+ from: 'negative/024-unquoted-string-param.json',
+ name: 'AdCP 3.2 Signature-Input sig-param string value sent unquoted (keyid=foo instead of keyid="foo", content-digest covered)',
+ unquotedParams: ['keyid'],
+ comment: 'The Signature is a valid Ed25519 signature over expected_signature_base, which carries the sig-params exactly as sent (unquoted keyid), so the unquoted string is the only fault.',
+ },
+ {
+ from: 'negative/026-non-ascii-host.json',
+ name: 'AdCP 3.2 URL authority contains raw IDN U-label (non-ASCII bytes in host, content-digest covered)',
+ comment: 'The Signature is a valid Ed25519 signature over the base for the A-label form of the host (xn--bcher-kva.example.com), the base a signer that canonicalized correctly would produce. A verifier that silently re-normalizes the U-label would therefore verify the signature; docs/reference/url-canonicalization.mdx requires the comparer to reject a raw non-ASCII host instead, so the raw U-label on the wire is the only fault. The expected code follows root 026 (request_target_uri_malformed at step 10, per the maintainer decision on adcp#7905).',
+ },
+ {
+ from: 'negative/027-webhook-registration-authentication-unsigned.json',
+ name: 'AdCP 3.2 webhook registration with push_notification_config.authentication over bearer (unsigned); operation NOT in required_for (Content-Digest sent)',
+ kind: 'unsigned',
+ },
+ {
+ from: 'negative/028-unsigned-protocol-method-required.json',
+ name: 'AdCP 3.2 unsigned tasks/cancel JSON-RPC POST; method is in protocol_methods_required_for (Content-Digest sent)',
+ kind: 'unsigned',
+ },
+ {
+ from: 'negative/029-duplicate-signature-label.json',
+ name: 'AdCP 3.2 Signature header declares label \'sig1\' twice (malformed structured dictionary, content-digest covered)',
+ duplicateSignature: true,
+ comment: 'Signature-Input carries sig1 exactly once, covers content-digest, and is well formed; only the Signature header repeats the label. Both Signature members are the same valid Ed25519 signature over expected_signature_base, so a verifier that keeps either one verifies it and the repeated label is the only fault.',
+ },
+ {
+ from: 'negative/030-content-digest-key-case.json',
+ name: 'AdCP 3.2 Content-Digest carries SHA-256 and sha-256 (uppercase dictionary key is not a case-insensitive synonym, content-digest covered)',
+ contentDigest: body => `${contentDigestFor(body).replace(/^sha-256/, 'SHA-256')}, ${contentDigestFor(body)}`,
+ comment: 'Both members are the correct digest of the body in standard padded Base64, and the Signature is a valid Ed25519 signature over expected_signature_base, which carries the Content-Digest value exactly as sent, so the uppercase key is the only fault.',
+ },
+ {
+ from: 'negative/031-malformed-host-authority.json',
+ name: 'AdCP 3.2 Host header carries an unbracketed IPv6 literal (malformed authority) while the URL is clean (content-digest covered)',
+ keepHeaders: ['Host'],
+ comment: 'The URL is the valid bracketed form and the Signature is a real Ed25519 signature over the base computed from the URL authority [::1], so the Host header is the only fault. A verifier that derives @authority from the URL alone verifies it.',
+ },
];
function keyByKid(kid) {
@@ -253,8 +379,9 @@ function verifyBase(jwk, base, signature) {
return verify('sha256', data, { key: publicKeyFor(jwk), dsaEncoding: 'ieee-p1363' }, signature);
}
-function contentDigestFor(body) {
- return `sha-256=:${createHash('sha256').update(body, 'utf8').digest('base64')}:`;
+function contentDigestFor(body, algorithm = 'sha256') {
+ const label = algorithm === 'sha512' ? 'sha-512' : 'sha-256';
+ return `${label}=:${createHash(algorithm).update(body, 'utf8').digest('base64')}:`;
}
/** Parse the legacy sig1 parameters into an ordered map. */
@@ -267,17 +394,26 @@ function legacySigParams(legacy) {
const eq = part.indexOf('=');
const name = part.slice(0, eq);
const raw = part.slice(eq + 1);
- params.set(name, raw.startsWith('"') ? JSON.parse(raw) : Number(raw));
+ params.set(name, raw.startsWith('"') ? JSON.parse(raw) : Number.isNaN(Number(raw)) ? raw : Number(raw));
}
return params;
}
-function serializeParams(components, params) {
+/** Decode a legacy Base64URL (or Base64) sf-binary member of the Signature header. */
+function legacySignatureBytes(legacy, label) {
+ const token = new RegExp(`${label}=:([^:]+):`).exec(legacy.request.headers.Signature)?.[1];
+ if (!token) throw new Error(`${legacy.__file}: no ${label} Signature member`);
+ const bytes = Buffer.from(token.replace(/-/g, '+').replace(/_/g, '/'), 'base64');
+ if (bytes.length !== 64) throw new Error(`${legacy.__file}: ${label} is ${bytes.length} bytes, expected 64`);
+ return bytes;
+}
+
+function serializeParams(components, params, unquoted = []) {
const list = `(${components.map(c => `"${c}"`).join(' ')})`;
const parts = [];
for (const [name, value] of params) {
if (value === null || value === undefined) continue;
- parts.push(typeof value === 'number' ? `${name}=${value}` : `${name}="${value}"`);
+ parts.push(typeof value === 'number' || unquoted.includes(name) ? `${name}=${value}` : `${name}="${value}"`);
}
return `${list}${parts.length ? `;${parts.join(';')}` : ''}`;
}
@@ -344,61 +480,96 @@ function buildVector(def) {
}
const body = rekeyBody(legacy.request.body, def.from, def.out);
- const components = def.components ?? DIGEST_COMPONENTS;
- const params = legacySigParams(legacy);
- for (const [name, value] of Object.entries(def.params ?? {})) {
- if (!params.has(name) && value !== null) throw new Error(`${def.out}: unknown param ${name}`);
- params.set(name, value);
- }
- const serialized = serializeParams(components, params);
- const canonical = canonicalFromLegacy(legacy);
-
- const request = {
- method: legacy.request.method,
- url: legacy.request.url,
- headers: {
- 'Content-Type': legacy.request.headers['Content-Type'],
- 'Content-Digest': def.contentDigest ?? contentDigestFor(body),
- 'Signature-Input': `sig1=${serialized}`,
- Signature: '',
- },
- body,
- };
- const base = signatureBase(components, serialized, request, canonical);
+ const kind = def.kind ?? 'signed';
+ const contentDigest =
+ typeof def.contentDigest === 'function' ? def.contentDigest(body) : (def.contentDigest ?? contentDigestFor(body));
+ let request;
+ let base;
- let signature;
- if (def.placeholder) {
- signature = ZERO_SIGNATURE;
+ if (kind === 'unsigned' || kind === 'malformed-input') {
+ // Nothing is signed: the legacy headers are kept and a correct Content-Digest is added.
+ request = {
+ method: legacy.request.method,
+ url: legacy.request.url,
+ headers: { ...legacy.request.headers, 'Content-Digest': contentDigest },
+ body,
+ };
+ if (kind === 'malformed-input') {
+ // The legacy placeholder is 66 zero bytes; the 3.2 corpus uses the 64-byte Ed25519 placeholder everywhere.
+ request.headers.Signature = `sig1=:${ZERO_SIGNATURE}:`;
+ }
} else {
- const jwk = keyByKid(params.get('keyid'));
- const existing = readExisting(def.out);
- const existingSig = existing?.request?.headers?.Signature?.match(/^sig1=:([^:]+):/)?.[1];
- if (jwk.kty !== 'OKP' && existingSig && verifyBase(jwk, base, Buffer.from(existingSig, 'base64'))) {
- signature = existingSig; // keep a still-valid non-deterministic ECDSA signature
- } else {
- signature = signBase(jwk, base).toString('base64');
+ const components = def.components ?? DIGEST_COMPONENTS;
+ const paramsSource = def.paramsFrom
+ ? JSON.parse(readFileSync(join(VECTOR_DIR, def.paramsFrom), 'utf8'))
+ : legacy;
+ const params = legacySigParams(paramsSource);
+ for (const [name, value] of Object.entries(def.params ?? {})) {
+ if (!params.has(name) && value !== null) throw new Error(`${def.out}: unknown param ${name}`);
+ params.set(name, value);
}
- if (!verifyBase(jwk, base, Buffer.from(signature, 'base64'))) {
- throw new Error(`${def.out}: generated signature does not verify`);
+ const serialized = serializeParams(components, params, def.unquotedParams);
+ const canonical = canonicalFromLegacy(legacy);
+
+ request = {
+ method: legacy.request.method,
+ url: legacy.request.url,
+ headers: {
+ ...Object.fromEntries((def.keepHeaders ?? []).map(name => [name, legacy.request.headers[name]])),
+ 'Content-Type': legacy.request.headers['Content-Type'],
+ 'Content-Digest': contentDigest,
+ 'Signature-Input': `sig1=${serialized}`,
+ Signature: '',
+ },
+ body,
+ };
+ base = signatureBase(components, serialized, request, canonical);
+
+ let signature;
+ if (def.placeholder) {
+ signature = ZERO_SIGNATURE;
+ } else {
+ const jwk = keyByKid(params.get('keyid'));
+ const existing = readExisting(def.out);
+ const existingSig = existing?.request?.headers?.Signature?.match(/^sig1=:([^:]+):/)?.[1];
+ if (jwk.kty !== 'OKP' && existingSig && verifyBase(jwk, base, Buffer.from(existingSig, 'base64'))) {
+ signature = existingSig; // keep a still-valid non-deterministic ECDSA signature
+ } else {
+ signature = signBase(jwk, base).toString('base64');
+ }
+ if (!verifyBase(jwk, base, Buffer.from(signature, 'base64'))) {
+ throw new Error(`${def.out}: generated signature does not verify`);
+ }
}
- }
- request.headers.Signature = `sig1=:${signature}:`;
- if (def.extraLabel) {
- const extra = def.extraLabel;
- const extraParams = new Map(params);
- extraParams.set('nonce', extra.nonce);
- request.headers['Signature-Input'] += `, ${extra.label}=${serializeParams(extra.components, extraParams)}`;
- request.headers.Signature += `, ${extra.label}=:${ZERO_SIGNATURE}:`;
+ request.headers.Signature = `sig1=:${signature}:`;
+ if (def.extraLabel) {
+ const extra = def.extraLabel;
+ const extraParams = new Map(params);
+ extraParams.set('nonce', extra.nonce);
+ request.headers['Signature-Input'] += `, ${extra.label}=${serializeParams(extra.components, extraParams)}`;
+ const extraSignature = extra.signatureFromLegacy
+ ? legacySignatureBytes(legacy, extra.label).toString('base64')
+ : ZERO_SIGNATURE;
+ request.headers.Signature += `, ${extra.label}=:${extraSignature}:`;
+ }
+ if (def.duplicateSignature) request.headers.Signature += `, sig1=:${signature}:`;
+ if (def.dupLabel) {
+ // A second member under the SAME label, identical to the first; the Signature header carries one member.
+ request.headers['Signature-Input'] += `, sig1=${serialized}`;
+ }
+ if (kind === 'signature-only') delete request.headers['Signature-Input'];
}
+ const capability = { ...legacy.verifier_capability, covers_content_digest: 'required' };
+ if (def.requiredFor) capability.required_for = def.requiredFor;
const vector = {
name: def.name,
spec_reference: `${legacy.spec_reference}; AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding`,
signing_profile_version: '3.2',
reference_now: legacy.reference_now,
request,
- verifier_capability: { ...legacy.verifier_capability, covers_content_digest: 'required' },
+ verifier_capability: capability,
};
if (legacy.jwks_override) vector.jwks_override = legacy.jwks_override;
else vector.jwks_ref = legacy.jwks_ref;
@@ -406,7 +577,7 @@ function buildVector(def) {
vector.test_harness_state = { ...legacy.test_harness_state };
if (def.harnessComment) vector.test_harness_state.$comment = def.harnessComment;
}
- const includeBase = def.includeBase || !def.placeholder;
+ const includeBase = base !== undefined && (def.includeBase || !def.placeholder);
if (includeBase) vector.expected_signature_base = base;
vector.expected_outcome = def.expectedOutcome ?? legacy.expected_outcome;
if (legacy.requires_contract) vector.requires_contract = legacy.requires_contract;
@@ -414,9 +585,9 @@ function buildVector(def) {
const notes = [
`3.2-profile counterpart of ${def.from}.`,
- PROFILE_NOTE,
+ { unsigned: UNSIGNED_PROFILE_NOTE, 'malformed-input': MALFORMED_PROFILE_NOTE }[kind] ?? PROFILE_NOTE,
def.comment,
- def.placeholder && def.out !== 'negative/015-signature-invalid.json' ? PLACEHOLDER_NOTE : undefined,
+ (def.placeholder && def.out !== 'negative/015-signature-invalid.json') || kind === 'malformed-input' ? PLACEHOLDER_NOTE : undefined,
`Generated by ${SCRIPT} from the test keys in keys.json; do not hand-edit.`,
].filter(Boolean);
vector.$comment = notes.join(' ');
diff --git a/scripts/lint-storyboard-controller-requires.cjs b/scripts/lint-storyboard-controller-requires.cjs
new file mode 100644
index 00000000000..b55110b1cbe
--- /dev/null
+++ b/scripts/lint-storyboard-controller-requires.cjs
@@ -0,0 +1,99 @@
+#!/usr/bin/env node
+/**
+ * Reject storyboards that set `prerequisites.controller_seeding: true`
+ * without declaring `requires: [controller]`.
+ *
+ * Why this lint exists
+ * --------------------
+ * A storyboard that seeds fixtures through `comply_test_controller` cannot
+ * run against a seller that has no test controller. Without the
+ * storyboard-level `requires: [controller]` gate, the runner grades every
+ * seeded step `missing_test_controller` — dozens of identical lines per
+ * storyboard that bury real results. With the gate, the runner emits one
+ * `requirement_unmet` skip at load time. A controller that disappears
+ * mid-run still grades per step.
+ *
+ * Rules:
+ *
+ * controller_seeding_without_requires_controller
+ * `prerequisites.controller_seeding` is true but the top-level
+ * `requires` list does not include `controller`. Add `controller` to
+ * `requires` (append to the existing list if the storyboard already
+ * gates on other values, such as `multi_agent`).
+ */
+
+'use strict';
+
+const fs = require('node:fs');
+const path = require('node:path');
+const yaml = require('js-yaml');
+
+const ROOT = path.resolve(__dirname, '..');
+const SOURCE_DIR = path.join(ROOT, 'static', 'compliance', 'source');
+
+const RULE_MESSAGES = {
+ controller_seeding_without_requires_controller: () =>
+ 'prerequisites.controller_seeding is true but `requires` does not include ' +
+ '`controller`. A seller without a test controller would be graded ' +
+ '`missing_test_controller` on every seeded step instead of receiving one ' +
+ 'storyboard-level `requirement_unmet` skip. Add `requires: [controller]` ' +
+ '(append `controller` if `requires` already lists other values). See ' +
+ 'static/compliance/source/universal/storyboard-schema.yaml > "requires".',
+};
+
+function lint(sourceDir = SOURCE_DIR) {
+ const violations = [];
+
+ function lintFile(p) {
+ const rel = path.relative(sourceDir, p);
+ let doc;
+ try {
+ doc = yaml.load(fs.readFileSync(p, 'utf8'));
+ } catch {
+ return;
+ }
+ if (!doc || typeof doc !== 'object') return;
+ if (!doc.prerequisites || doc.prerequisites.controller_seeding !== true) return;
+ if (Array.isArray(doc.requires) && doc.requires.includes('controller')) return;
+ violations.push({
+ file: rel,
+ id: doc.id,
+ rule: 'controller_seeding_without_requires_controller',
+ });
+ }
+
+ function walk(d) {
+ for (const entry of fs.readdirSync(d, { withFileTypes: true })) {
+ const p = path.join(d, entry.name);
+ if (entry.isDirectory()) {
+ walk(p);
+ continue;
+ }
+ if (entry.name.endsWith('.yaml') || entry.name.endsWith('.yml')) {
+ lintFile(p);
+ }
+ }
+ }
+ walk(sourceDir);
+
+ return violations;
+}
+
+function main() {
+ const violations = lint();
+ if (violations.length === 0) {
+ console.log('✓ storyboard controller-requires lint: every controller_seeding storyboard declares requires: [controller]');
+ return;
+ }
+ console.error(`✗ storyboard controller-requires lint: ${violations.length} violation(s)\n`);
+ for (const v of violations) {
+ console.error(` ${v.file} (${v.rule})`);
+ console.error(` ${RULE_MESSAGES[v.rule]()}`);
+ console.error('');
+ }
+ process.exit(1);
+}
+
+if (require.main === module) main();
+
+module.exports = { RULE_MESSAGES, lint };
diff --git a/server/src/training-agent/source-schema.ts b/server/src/training-agent/source-schema.ts
index 387c063f856..0de56145635 100644
--- a/server/src/training-agent/source-schema.ts
+++ b/server/src/training-agent/source-schema.ts
@@ -12,6 +12,7 @@ function isRecord(value: unknown): value is Record {
}
const schemaRoot = join(process.cwd(), 'static/schemas/source');
+const VERSION_ENVELOPE_DEFINITION_REF = '#/$defs/core~1version-envelope';
const parsedSchemas = new Map();
const sourceValidators = new Map();
let sourceAjv: Ajv | undefined;
@@ -186,6 +187,23 @@ export function loadProductDiscoveryInputSchema(fileName: string): JsonSchema {
'x-mutates-state': _mutatesState,
...inputSchema
} = bundled;
+ // The version-envelope allOf arm is redundant in tools/list: the source
+ // schemas redeclare adcp_version/adcp_major_version in `properties` (draft-07
+ // strict roots need that), and MCP discovery projection inlines them anyway.
+ // Dropping the bare arm keeps the four-tool discovery surface within budget.
+ if (Array.isArray(inputSchema.allOf)) {
+ const allOf = inputSchema.allOf.filter(arm => !(
+ isRecord(arm)
+ && Object.keys(arm).length === 1
+ && arm.$ref === VERSION_ENVELOPE_DEFINITION_REF
+ ));
+ if (allOf.length > 0) inputSchema.allOf = allOf;
+ else delete inputSchema.allOf;
+ const defs = inputSchema.$defs;
+ if (isRecord(defs) && !JSON.stringify(inputSchema).includes(`"${VERSION_ENVELOPE_DEFINITION_REF}"`)) {
+ delete defs['core/version-envelope'];
+ }
+ }
return inputSchema;
}
diff --git a/server/tests/integration/addie/fixed-trace-component-smoke-private-ledger-migration.test.ts b/server/tests/integration/addie/fixed-trace-component-smoke-private-ledger-migration.test.ts
index 2f260ae61d6..087ccc6b6db 100644
--- a/server/tests/integration/addie/fixed-trace-component-smoke-private-ledger-migration.test.ts
+++ b/server/tests/integration/addie/fixed-trace-component-smoke-private-ledger-migration.test.ts
@@ -33,6 +33,11 @@ function reservationFor(digest: string) {
return { authorizationDigest: digest, reservationId: reservationIdFor(digest), entryCount: 168 as const, providerDispatchEntryCount: 126 as const, reservationMicrodollars: 2_819_484 as const };
}
function uniqueAttemptId() { return `attempt_${createHash('sha256').update(randomUUID()).digest('hex').slice(0, 32)}`; }
+function fixtureAttemptId(suffix: string, digest = authorizationDigest) {
+ // Some tests commit immutable attempts. A later run against the same DB
+ // must address its own authorization instead of colliding with old rows.
+ return `attempt_${createHash('sha256').update(`${digest}:${suffix}`).digest('hex').slice(0, 32)}`;
+}
function deferred() {
let resolve: (() => void) | undefined;
const promise = new Promise((done) => { resolve = done; });
@@ -137,12 +142,12 @@ function dispatchEntryFor(aggregateAdmissionFingerprint: string) {
.find((entry) => entry.disposition === 'provider_dispatch')!;
}
async function insertIntent(subject: Client, digest: string, entry = dispatchEntry(), suffix = 'e', ordinal = 1) {
- const token = suffix.length === 1 ? suffix.repeat(32) : suffix;
+ const attemptId = suffix.length === 1 ? fixtureAttemptId(suffix, digest) : `attempt_${suffix}`;
return subject.query(
`INSERT INTO addie_fixed_trace_component_smoke_attempts
(attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac)
VALUES ($1,$2,$3,$4,'intent_recorded',$5)`,
- [`attempt_${token}`, digest, entry.assignmentId, ordinal, 'f'.repeat(64)],
+ [attemptId, digest, entry.assignmentId, ordinal, 'f'.repeat(64)],
);
}
@@ -221,17 +226,17 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
});
it('permits only consumed intent insertion and rejects direct terminal insertion', async () => {
- await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac,response_hmac,returned_provider,returned_model,returned_effort,input_tokens,output_tokens,actual_cost_microdollars,latency_ms,terminal_at) VALUES ($1,$2,$3,1,'succeeded',$4,$5,$6,$7,$8,0,0,0,0,clock_timestamp())`, [`attempt_${'d'.repeat(32)}`, authorizationDigest, dispatchEntry().assignmentId, 'f'.repeat(64), '1'.repeat(64), dispatchEntry().provider, dispatchEntry().model, dispatchEntry().effort])).resolves.toBeInstanceOf(Error);
+ await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac,response_hmac,returned_provider,returned_model,returned_effort,input_tokens,output_tokens,actual_cost_microdollars,latency_ms,terminal_at) VALUES ($1,$2,$3,1,'succeeded',$4,$5,$6,$7,$8,0,0,0,0,clock_timestamp())`, [fixtureAttemptId('d'), authorizationDigest, dispatchEntry().assignmentId, 'f'.repeat(64), '1'.repeat(64), dispatchEntry().provider, dispatchEntry().model, dispatchEntry().effort])).resolves.toBeInstanceOf(Error);
await client!.query("UPDATE addie_fixed_trace_component_smoke_authorizations SET status = 'halted' WHERE authorization_digest = $1", [authorizationDigest]);
- await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,1,'intent_recorded',$4)`, [`attempt_${'a'.repeat(32)}`, authorizationDigest, dispatchEntry().assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,1,'intent_recorded',$4)`, [fixtureAttemptId('a'), authorizationDigest, dispatchEntry().assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
const unknown = await seedExactPlan();
await client!.query("UPDATE addie_fixed_trace_component_smoke_authorizations SET status = 'unknown_exposure', unknown_exposure_at = clock_timestamp() WHERE authorization_digest = $1", [unknown]);
- await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,1,'intent_recorded',$4)`, [`attempt_${'b'.repeat(32)}`, unknown, dispatchEntry().assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,1,'intent_recorded',$4)`, [fixtureAttemptId('b', unknown), unknown, dispatchEntry().assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
});
it('enforces ordinal reservation and immutable direct SQL state', async () => {
await insertIntent(client!, authorizationDigest);
- const attemptId = `attempt_${'e'.repeat(32)}`;
+ const attemptId = fixtureAttemptId('e');
await expect(rejects('UPDATE addie_fixed_trace_component_smoke_attempts SET actual_cost_microdollars = 99999999 WHERE attempt_id = $1', [attemptId])).resolves.toBeInstanceOf(Error);
await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'intent_recorded' WHERE attempt_id = $1", [attemptId])).resolves.toBeInstanceOf(Error);
await expect(rejects('DELETE FROM addie_fixed_trace_component_smoke_attempts WHERE attempt_id = $1', [attemptId])).resolves.toBeInstanceOf(Error);
@@ -240,29 +245,29 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
it('enforces contiguous ordinal sequencing and refuses a concurrent second open intent', async () => {
const generation = plan.find((entry) => entry.disposition === 'provider_dispatch' && entry.maximumProviderInvocations === 2)!;
- await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,2,'intent_recorded',$4)`, [`attempt_${'1'.repeat(32)}`, authorizationDigest, generation.assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,2,'intent_recorded',$4)`, [fixtureAttemptId('1'), authorizationDigest, generation.assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
await insertIntent(client!, authorizationDigest, generation, '2');
- await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,2,'intent_recorded',$4)`, [`attempt_${'3'.repeat(32)}`, authorizationDigest, generation.assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
- await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'2'.repeat(32)}`, '2'.repeat(64), generation.provider, generation.model, generation.effort]);
- await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,2,'intent_recorded',$4)`, [`attempt_${'4'.repeat(32)}`, authorizationDigest, generation.assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
- await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = 'wrong', returned_model = 'wrong', returned_effort = 'wrong', input_tokens = 0, output_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'2'.repeat(32)}`, '2'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,2,'intent_recorded',$4)`, [fixtureAttemptId('3'), authorizationDigest, generation.assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('2'), '2'.repeat(64), generation.provider, generation.model, generation.effort]);
+ await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,2,'intent_recorded',$4)`, [fixtureAttemptId('4'), authorizationDigest, generation.assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = 'wrong', returned_model = 'wrong', returned_effort = 'wrong', input_tokens = 0, output_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('2'), '2'.repeat(64)])).resolves.toBeInstanceOf(Error);
});
it('rejects mismatched identity and mismatched actual-cost settlement while each attempt is still open', async () => {
const first = dispatchEntry(4);
await insertIntent(client!, authorizationDigest, first, 'a');
- await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = 'wrong', returned_model = 'wrong', returned_effort = 'wrong', input_tokens = 0, output_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'a'.repeat(32)}`, 'a'.repeat(64)])).resolves.toBeInstanceOf(Error);
- expect((await client!.query('SELECT status FROM addie_fixed_trace_component_smoke_attempts WHERE attempt_id = $1', [`attempt_${'a'.repeat(32)}`])).rows).toEqual([{ status: 'intent_recorded' }]);
- await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'a'.repeat(32)}`, 'a'.repeat(64), first.provider, first.model, first.effort]);
+ await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = 'wrong', returned_model = 'wrong', returned_effort = 'wrong', input_tokens = 0, output_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('a'), 'a'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ expect((await client!.query('SELECT status FROM addie_fixed_trace_component_smoke_attempts WHERE attempt_id = $1', [fixtureAttemptId('a')])).rows).toEqual([{ status: 'intent_recorded' }]);
+ await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('a'), 'a'.repeat(64), first.provider, first.model, first.effort]);
const second = dispatchEntry(5);
await insertIntent(client!, authorizationDigest, second, 'b');
- await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'provider_failed', response_hmac = $2, returned_provider = 'wrong', returned_model = 'wrong', returned_effort = 'wrong', input_tokens = 0, output_tokens = 0, actual_cost_microdollars = 1, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'b'.repeat(32)}`, 'b'.repeat(64)])).resolves.toBeInstanceOf(Error);
- expect((await client!.query('SELECT status FROM addie_fixed_trace_component_smoke_attempts WHERE attempt_id = $1', [`attempt_${'b'.repeat(32)}`])).rows).toEqual([{ status: 'intent_recorded' }]);
+ await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'provider_failed', response_hmac = $2, returned_provider = 'wrong', returned_model = 'wrong', returned_effort = 'wrong', input_tokens = 0, output_tokens = 0, actual_cost_microdollars = 1, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('b'), 'b'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ expect((await client!.query('SELECT status FROM addie_fixed_trace_component_smoke_attempts WHERE attempt_id = $1', [fixtureAttemptId('b')])).rows).toEqual([{ status: 'intent_recorded' }]);
});
it('rejects contradictory terminal receipt accounting evidence at the database boundary', async () => {
const entry = dispatchEntry(7);
- const attemptId = `attempt_${'d'.repeat(32)}`;
+ const attemptId = fixtureAttemptId('d');
await insertIntent(client!, authorizationDigest, entry, 'd');
await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'identity_mismatch', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [attemptId, 'd'.repeat(64), entry.provider, entry.model, entry.effort])).resolves.toBeInstanceOf(Error);
await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, observed_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [attemptId, 'd'.repeat(64), entry.provider, entry.model, entry.effort])).resolves.toBeInstanceOf(Error);
@@ -280,14 +285,14 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
for (const [index, [profileId, input, output, cacheRead, cacheWrite, expectedCost]] of vectors.entries()) {
const entry = plan.find((candidate) => candidate.disposition === 'provider_dispatch' && candidate.pricingProfileId === profileId)!;
const suffix = (index + 1).toString(16);
- const attemptId = `attempt_${suffix.repeat(32)}`;
+ const attemptId = fixtureAttemptId(suffix);
await insertIntent(client!, authorizationDigest, entry, suffix);
await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = $6, output_tokens = $7, cache_read_tokens = $8, cache_write_tokens = $9, actual_cost_microdollars = $10, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [attemptId, suffix.repeat(64), entry.provider, entry.model, entry.effort, input, output, cacheRead, cacheWrite, expectedCost + 1])).resolves.toBeInstanceOf(Error);
await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = $6, output_tokens = $7, cache_read_tokens = $8, cache_write_tokens = $9, actual_cost_microdollars = $10, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [attemptId, suffix.repeat(64), entry.provider, entry.model, entry.effort, input, output, cacheRead, cacheWrite, expectedCost]);
}
const entry = dispatchEntry(10);
await insertIntent(client!, authorizationDigest, entry, 'f');
- await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'invalid_limits', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, observed_cost_microdollars = NULL, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'f'.repeat(32)}`, 'f'.repeat(64), entry.provider, entry.model, entry.effort])).resolves.toBeInstanceOf(Error);
+ await expect(rejects("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'invalid_limits', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, observed_cost_microdollars = NULL, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('f'), 'f'.repeat(64), entry.provider, entry.model, entry.effort])).resolves.toBeInstanceOf(Error);
});
it('application terminalization uses the locked aggregate CTE on PostgreSQL', async () => {
@@ -386,16 +391,67 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
await insertIntent(client!, authorizationDigest, open, openId.slice('attempt_'.length));
await client!.query('COMMIT');
const pool = new Pool({ connectionString: databaseUrl, max: 2 });
+ const recoveryAtGate = deferred();
+ const releaseRecovery = deferred();
+ const intentRecoveryAtGate = deferred();
+ let recoveryPid = 0;
+ let intentRecoveryPid = 0;
+ const ledgerPool = (standalone: boolean) => ({
+ connect: async () => {
+ const connection = await pool.connect();
+ const pid = (await connection.query<{ pid: number }>('SELECT pg_backend_pid() AS pid')).rows[0]!.pid;
+ return {
+ query: async (sql: string, values?: unknown[]) => {
+ // This test proves concurrent recovery ordering, including deferred
+ // COMMIT checks. The separate lock-failure test keeps production
+ // bounds; leave headroom beyond the 5s DB observation window.
+ if (sql.startsWith('SET LOCAL lock_timeout =')) return connection.query("SET LOCAL lock_timeout = '15s'");
+ if (sql.startsWith('SET LOCAL statement_timeout =')) return connection.query("SET LOCAL statement_timeout = '15s'");
+ if (sql === 'LOCK TABLE addie_fixed_trace_component_smoke_run_plan IN SHARE ROW EXCLUSIVE MODE') {
+ if (!standalone) {
+ intentRecoveryPid = pid;
+ intentRecoveryAtGate.resolve();
+ }
+ const output = await connection.query(sql, values);
+ if (standalone) {
+ recoveryPid = pid;
+ recoveryAtGate.resolve();
+ await waitForBarrier(releaseRecovery.promise, 'standalone recovery release');
+ }
+ return output;
+ }
+ return connection.query(sql, values);
+ },
+ release: () => connection.release(),
+ };
+ },
+ });
+ let pendingIntent: ReturnType | undefined;
+ let pendingRecovery: ReturnType | undefined;
try {
- const ledger = new PostgresFixedTraceComponentSmokePrivateLedger(pool);
- const [intent, recovery] = await Promise.all([
- ledger.recordProviderIntent({ reservation: reservationFor(authorizationDigest), attemptId: uniqueAttemptId(), assignmentId: target.assignmentId, invocationOrdinal: 1, preparedRequestHmac: 'c'.repeat(64) }),
- ledger.recordUnknownExposure(reservationFor(authorizationDigest)),
- ]);
+ const recoveryLedger = new PostgresFixedTraceComponentSmokePrivateLedger(ledgerPool(true) as never);
+ const intentLedger = new PostgresFixedTraceComponentSmokePrivateLedger(ledgerPool(false) as never);
+ pendingRecovery = recoveryLedger.recordUnknownExposure(reservationFor(authorizationDigest));
+ await waitForBarrier(recoveryAtGate.promise, 'standalone recovery table lock');
+ pendingIntent = intentLedger.recordProviderIntent({ reservation: reservationFor(authorizationDigest), attemptId: uniqueAttemptId(), assignmentId: target.assignmentId, invocationOrdinal: 1, preparedRequestHmac: 'c'.repeat(64) });
+ await waitForBarrier(intentRecoveryAtGate.promise, 'provider-intent standalone recovery');
+ expect(intentRecoveryPid).not.toBe(recoveryPid);
+ await expect.poll(async () => (await client!.query(
+ 'SELECT wait_event_type, pg_blocking_pids(pid) AS blockers FROM pg_stat_activity WHERE pid = $1',
+ [intentRecoveryPid],
+ )).rows, { timeout: 5_000, interval: 10 }).toEqual([{
+ wait_event_type: 'Lock', blockers: expect.arrayContaining([recoveryPid]),
+ }]);
+ releaseRecovery.resolve();
+ const [intent, recovery] = await Promise.all([pendingIntent, pendingRecovery]);
expect(intent).toEqual({ status: 'refused', reason: 'unknown_exposure' });
expect(recovery).toEqual({ status: 'recorded' });
expect((await client!.query("SELECT a.status, count(*) FILTER (WHERE t.status = 'intent_recorded')::int AS open FROM addie_fixed_trace_component_smoke_authorizations a JOIN addie_fixed_trace_component_smoke_attempts t USING (authorization_digest) WHERE a.authorization_digest = $1 GROUP BY a.status", [authorizationDigest])).rows).toEqual([{ status: 'unknown_exposure', open: 0 }]);
- } finally { await pool.end(); await client!.query('BEGIN'); }
+ } finally {
+ releaseRecovery.resolve();
+ await Promise.allSettled([pendingIntent, pendingRecovery]);
+ await pool.end(); await client!.query('BEGIN');
+ }
});
it('releases provider-intent target locking before standalone recovery after the precheck race', async () => {
@@ -699,7 +755,7 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
const digest = await seedExactPlan(client!);
const entry = dispatchEntry(12);
const suffix = `${({ provider_failed: '1', malformed_response: '2', identity_mismatch: '3', missing_usage: '4', timeout_after_dispatch: '5', invalid_limits: '6', pricing_unavailable: '7', unknown_exposure: '8' } as Record)[status]}`;
- const attemptId = `attempt_${suffix.repeat(32)}`;
+ const attemptId = fixtureAttemptId(suffix, digest);
await insertIntent(client!, digest, entry, suffix);
const values: unknown[] = [attemptId];
if (assignment.includes('$2')) values.push('e'.repeat(64));
@@ -708,7 +764,7 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
if (assignment.includes('$5')) values.push(entry.effort);
await client!.query(`UPDATE addie_fixed_trace_component_smoke_attempts SET ${assignment}, terminal_at = clock_timestamp() WHERE attempt_id = $1`, values);
expect((await client!.query('SELECT status FROM addie_fixed_trace_component_smoke_authorizations WHERE authorization_digest = $1', [digest])).rows).toEqual([{ status: expectedAuthorizationStatus }]);
- await expect(rejects("INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,1,'intent_recorded',$4)", [`attempt_${'f'.repeat(32)}`, digest, dispatchEntry(13).assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ await expect(rejects("INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,1,'intent_recorded',$4)", [fixtureAttemptId('f', digest), digest, dispatchEntry(13).assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
if (status === 'provider_failed') {
await client!.query("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_failed', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 1 WHERE authorization_digest = $1 AND assignment_id = $2", [digest, entry.assignmentId]);
expect((await client!.query('SELECT assignment_outcome FROM addie_fixed_trace_component_smoke_run_plan WHERE authorization_digest = $1 AND assignment_id = $2', [digest, entry.assignmentId])).rows).toEqual([{ assignment_outcome: 'provider_failed' }]);
@@ -718,7 +774,7 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
it('idempotently recovers a committed provider failure after unknown exposure has already committed', async () => {
const entry = dispatchEntry(6);
await insertIntent(client!, authorizationDigest, entry, 'c');
- await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'provider_failed', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'c'.repeat(32)}`, 'c'.repeat(64), entry.provider, entry.model, entry.effort]);
+ await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'provider_failed', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('c'), 'c'.repeat(64), entry.provider, entry.model, entry.effort]);
await client!.query('COMMIT');
const pool = new Pool({ connectionString: databaseUrl });
try {
@@ -735,8 +791,8 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
it('settles an admitted maximum-ordinal continuation as a halt with observed cost', async () => {
const router = dispatchEntry();
await insertIntent(client!, authorizationDigest, router, '5');
- await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'tool_continuation_required', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'5'.repeat(32)}`, '5'.repeat(64), router.provider, router.model, router.effort]);
- expect((await client!.query('SELECT status, actual_cost_microdollars, observed_cost_microdollars FROM addie_fixed_trace_component_smoke_attempts WHERE attempt_id = $1', [`attempt_${'5'.repeat(32)}`])).rows).toEqual([{ status: 'invalid_limits', actual_cost_microdollars: null, observed_cost_microdollars: '0' }]);
+ await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'tool_continuation_required', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('5'), '5'.repeat(64), router.provider, router.model, router.effort]);
+ expect((await client!.query('SELECT status, actual_cost_microdollars, observed_cost_microdollars FROM addie_fixed_trace_component_smoke_attempts WHERE attempt_id = $1', [fixtureAttemptId('5')])).rows).toEqual([{ status: 'invalid_limits', actual_cost_microdollars: null, observed_cost_microdollars: '0' }]);
expect((await client!.query('SELECT status FROM addie_fixed_trace_component_smoke_authorizations WHERE authorization_digest = $1', [authorizationDigest])).rows).toEqual([{ status: 'halted' }]);
await client!.query("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_failed', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 1 WHERE authorization_digest = $1 AND assignment_id = $2", [authorizationDigest, router.assignmentId]);
});
@@ -758,7 +814,7 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
expect(settled).toBe(true);
await client!.query('BEGIN');
await client!.query("UPDATE addie_fixed_trace_component_smoke_authorizations SET status = 'unknown_exposure', unknown_exposure_at = clock_timestamp() WHERE authorization_digest = $1", [authorizationDigest]);
- await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'unknown_exposure', terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'6'.repeat(32)}`]);
+ await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'unknown_exposure', terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('6')]);
await client!.query("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_unknown_exposure', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 1 WHERE authorization_digest = $1 AND assignment_id = $2", [authorizationDigest, started.assignmentId]);
expect((await client!.query('SELECT status, assignment_outcome FROM addie_fixed_trace_component_smoke_authorizations a JOIN addie_fixed_trace_component_smoke_run_plan p USING (authorization_digest) WHERE a.authorization_digest = $1 AND p.assignment_id = $2', [authorizationDigest, started.assignmentId])).rows).toEqual([{ status: 'unknown_exposure', assignment_outcome: 'provider_unknown_exposure' }]);
for (const entry of plan.filter((entry) => entry.assignmentId !== started.assignmentId)) {
@@ -772,21 +828,21 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
const generation = plan.find((entry) => entry.disposition === 'provider_dispatch' && entry.maximumProviderInvocations === 2)!;
await expect(rejects("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_completed', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 1 WHERE authorization_digest = $1 AND assignment_id = $2", [authorizationDigest, generation.assignmentId])).resolves.toBeInstanceOf(Error);
await insertIntent(client!, authorizationDigest, generation);
- await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'tool_continuation_required', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'e'.repeat(32)}`, '1'.repeat(64), generation.provider, generation.model, generation.effort]);
+ await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'tool_continuation_required', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('e'), '1'.repeat(64), generation.provider, generation.model, generation.effort]);
await expect(rejects("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_completed', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 1 WHERE authorization_digest = $1 AND assignment_id = $2", [authorizationDigest, generation.assignmentId])).resolves.toBeInstanceOf(Error);
await insertIntent(client!, authorizationDigest, generation, '8', 2);
- await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'8'.repeat(32)}`, '3'.repeat(64), generation.provider, generation.model, generation.effort]);
+ await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('8'), '3'.repeat(64), generation.provider, generation.model, generation.effort]);
await client!.query("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_completed', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 2 WHERE authorization_digest = $1 AND assignment_id = $2", [authorizationDigest, generation.assignmentId]);
const router = dispatchEntry();
await insertIntent(client!, authorizationDigest, router, '7');
- await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'7'.repeat(32)}`, '2'.repeat(64), router.provider, router.model, router.effort]);
+ await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('7'), '2'.repeat(64), router.provider, router.model, router.effort]);
await client!.query("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_completed', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 1 WHERE authorization_digest = $1 AND assignment_id = $2", [authorizationDigest, router.assignmentId]);
await expect(rejects("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_completed', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 1 WHERE authorization_digest = $1 AND assignment_id = $2", [authorizationDigest, router.assignmentId])).resolves.toBeInstanceOf(Error);
const finalFirst = plan.filter((entry) => entry.disposition === 'provider_dispatch' && entry.maximumProviderInvocations === 2)[1]!;
await insertIntent(client!, authorizationDigest, finalFirst, '9');
- await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${'9'.repeat(32)}`, '4'.repeat(64), finalFirst.provider, finalFirst.model, finalFirst.effort]);
+ await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [fixtureAttemptId('9'), '4'.repeat(64), finalFirst.provider, finalFirst.model, finalFirst.effort]);
await client!.query("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_completed', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 1 WHERE authorization_digest = $1 AND assignment_id = $2", [authorizationDigest, finalFirst.assignmentId]);
- await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,2,'intent_recorded',$4)`, [`attempt_${'0'.repeat(32)}`, authorizationDigest, finalFirst.assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,2,'intent_recorded',$4)`, [fixtureAttemptId('0'), authorizationDigest, finalFirst.assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
await client!.query("UPDATE addie_fixed_trace_component_smoke_authorizations SET status = 'halted' WHERE authorization_digest = $1", [authorizationDigest]);
const local = plan.find((entry) => entry.disposition === 'local_terminal')!;
const untouchedProvider = dispatchEntry(2);
@@ -822,7 +878,7 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
for (const entry of plan) {
if (finalTwo.some((remaining) => remaining.assignmentId === entry.assignmentId)) continue;
if (entry.disposition === 'provider_dispatch') {
- const token = (++index).toString(16).padStart(32, '0');
+ const token = createHash('sha256').update(`${authorizationDigest}:${++index}`).digest('hex').slice(0, 32);
await insertIntent(client!, authorizationDigest, entry, token);
await client!.query("UPDATE addie_fixed_trace_component_smoke_attempts SET status = 'succeeded', response_disposition = 'final_response', response_hmac = $2, returned_provider = $3, returned_model = $4, returned_effort = $5, input_tokens = 0, output_tokens = 0, cache_read_tokens = 0, cache_write_tokens = 0, actual_cost_microdollars = 0, latency_ms = 0, terminal_at = clock_timestamp() WHERE attempt_id = $1", [`attempt_${token}`, 'a'.repeat(64), entry.provider, entry.model, entry.effort]);
await client!.query("UPDATE addie_fixed_trace_component_smoke_run_plan SET assignment_outcome = 'provider_completed', assignment_terminal_at = clock_timestamp(), assignment_final_invocation_ordinal = 1 WHERE authorization_digest = $1 AND assignment_id = $2", [authorizationDigest, entry.assignmentId]);
@@ -848,6 +904,6 @@ describe.skipIf(!databaseUrl)('private ledger migration on PostgreSQL', () => {
await first.end(); await second.end(); await client!.query('BEGIN');
}
expect((await client!.query('SELECT status FROM addie_fixed_trace_component_smoke_authorizations WHERE authorization_digest = $1', [authorizationDigest])).rows).toEqual([{ status: 'completed' }]);
- await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,1,'intent_recorded',$4)`, [`attempt_${'f'.repeat(32)}`, authorizationDigest, dispatchEntry().assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
+ await expect(rejects(`INSERT INTO addie_fixed_trace_component_smoke_attempts (attempt_id,authorization_digest,assignment_id,invocation_ordinal,status,prepared_request_hmac) VALUES ($1,$2,$3,1,'intent_recorded',$4)`, [fixtureAttemptId('f'), authorizationDigest, dispatchEntry().assignmentId, 'f'.repeat(64)])).resolves.toBeInstanceOf(Error);
});
});
diff --git a/static/compliance/source/protocols/creative/index.yaml b/static/compliance/source/protocols/creative/index.yaml
index eaf1cbb9c2b..d5de181235a 100644
--- a/static/compliance/source/protocols/creative/index.yaml
+++ b/static/compliance/source/protocols/creative/index.yaml
@@ -4,6 +4,9 @@ title: "Creative lifecycle"
category: creative_lifecycle
summary: "Baseline creative lifecycle on a stateful platform: sync display creatives, list with filtering, and preview renderings."
track: creative
+requires:
+ - controller
+
required_tools:
- get_adcp_capabilities
diff --git a/static/compliance/source/protocols/creative/scenarios/billing_out_of_band.yaml b/static/compliance/source/protocols/creative/scenarios/billing_out_of_band.yaml
index 502ef296947..b57eca4acbf 100644
--- a/static/compliance/source/protocols/creative/scenarios/billing_out_of_band.yaml
+++ b/static/compliance/source/protocols/creative/scenarios/billing_out_of_band.yaml
@@ -4,6 +4,9 @@ title: "Creative report_usage rejects out-of-band billing"
category: creative
summary: "Verifies that a creative agent declaring bills_through_adcp: false rejects report_usage records with accepted: 0 and BILLING_OUT_OF_BAND."
track: creative
+requires:
+ - controller
+
introduced_in: "3.1"
required_tools:
- report_usage
diff --git a/static/compliance/source/protocols/creative/scenarios/canonical_supported_formats.yaml b/static/compliance/source/protocols/creative/scenarios/canonical_supported_formats.yaml
index 23d2ff392fe..cb85db48898 100644
--- a/static/compliance/source/protocols/creative/scenarios/canonical_supported_formats.yaml
+++ b/static/compliance/source/protocols/creative/scenarios/canonical_supported_formats.yaml
@@ -4,6 +4,9 @@ title: "Creative canonical supported formats"
category: creative
summary: "Verifies the 3.2 creative-agent canonical path: targetable supported_formats capability IDs, build_creative routing, and unsupported target rejection."
track: creative
+requires:
+ - controller
+
introduced_in: "3.1"
required_tools:
- build_creative
diff --git a/static/compliance/source/protocols/creative/scenarios/creative_features_idempotency.yaml b/static/compliance/source/protocols/creative/scenarios/creative_features_idempotency.yaml
index 47a5eb55530..d7b36dc220e 100644
--- a/static/compliance/source/protocols/creative/scenarios/creative_features_idempotency.yaml
+++ b/static/compliance/source/protocols/creative/scenarios/creative_features_idempotency.yaml
@@ -5,6 +5,9 @@ title: "Creative feature evaluations are retry-safe and reconcilable"
category: creative
summary: "Proves exact sync and async replay, payload conflicts, concurrent deduplication, submitted acknowledgement validity, and stable provider evaluation economics through polling."
track: creative
+requires:
+ - controller
+
# Applicability gate: required_tools is any-of, so it lists only the tool
# that makes this scenario apply. get_adcp_capabilities, get_task_status, and
# comply_test_controller are advertised by nearly every agent; listing them
diff --git a/static/compliance/source/protocols/creative/scenarios/creative_revision_identity.yaml b/static/compliance/source/protocols/creative/scenarios/creative_revision_identity.yaml
index 203db195f56..ad71a57bed9 100644
--- a/static/compliance/source/protocols/creative/scenarios/creative_revision_identity.yaml
+++ b/static/compliance/source/protocols/creative/scenarios/creative_revision_identity.yaml
@@ -5,6 +5,8 @@ title: "Creative revision identity is immutable and reads back exactly"
category: creative
summary: "Verifies capability-gated revision echo, immutable content reuse, non-mutation on mismatch, and current library readback."
track: creative
+requires:
+ - controller
required_tools:
- get_adcp_capabilities
diff --git a/static/compliance/source/protocols/creative/scenarios/evaluator_auth.yaml b/static/compliance/source/protocols/creative/scenarios/evaluator_auth.yaml
index deb3304fccc..1380c76977a 100644
--- a/static/compliance/source/protocols/creative/scenarios/evaluator_auth.yaml
+++ b/static/compliance/source/protocols/creative/scenarios/evaluator_auth.yaml
@@ -4,6 +4,9 @@ title: "Creative evaluator authentication boundary"
category: creative
summary: "Verifies that build_creative evaluator pointers use the verifier allowlist, keep credentials out of payloads, and invoke accepted evaluator agents through get_creative_features."
track: creative
+requires:
+ - controller
+
introduced_in: "3.1"
required_tools:
- build_creative
diff --git a/static/compliance/source/protocols/creative/scenarios/list_creatives_filter_behavior.yaml b/static/compliance/source/protocols/creative/scenarios/list_creatives_filter_behavior.yaml
index 61f0fc51cbe..a94c08463f1 100644
--- a/static/compliance/source/protocols/creative/scenarios/list_creatives_filter_behavior.yaml
+++ b/static/compliance/source/protocols/creative/scenarios/list_creatives_filter_behavior.yaml
@@ -5,6 +5,8 @@ title: "Sales agent applies deterministic creative filters"
category: media_buy_seller
summary: "Verifies a sales agent applies creative-status and media-buy-assignment filters conjunctively."
track: creative
+requires:
+ - controller
required_tools:
- list_creatives
diff --git a/static/compliance/source/protocols/creative/scenarios/native_in_feed.yaml b/static/compliance/source/protocols/creative/scenarios/native_in_feed.yaml
index 6c7a4e2e7a5..fd82c048c5b 100644
--- a/static/compliance/source/protocols/creative/scenarios/native_in_feed.yaml
+++ b/static/compliance/source/protocols/creative/scenarios/native_in_feed.yaml
@@ -4,6 +4,9 @@ title: "Native in-feed creative lifecycle"
category: creative
summary: "End-to-end native_in_feed conformance: format discovery, full 12-slot asset bundle submission with pixel trackers, per-constraint validation rejection paths, and feed-rendered preview."
track: creative
+requires:
+ - controller
+
required_tools:
- sync_creatives
diff --git a/static/compliance/source/protocols/creative/scenarios/native_localization.yaml b/static/compliance/source/protocols/creative/scenarios/native_localization.yaml
index 30176074b87..4c78ccd863d 100644
--- a/static/compliance/source/protocols/creative/scenarios/native_localization.yaml
+++ b/static/compliance/source/protocols/creative/scenarios/native_localization.yaml
@@ -4,6 +4,9 @@ title: "Creative materialized localization"
category: creative
summary: "Verifies capability discovery, materialized localized sync, explicit default/unmatched behavior, and exact list readback."
track: creative
+requires:
+ - controller
+
introduced_in: "3.2"
required_tools:
- sync_creatives
diff --git a/static/compliance/source/protocols/governance/index.yaml b/static/compliance/source/protocols/governance/index.yaml
index c26aa3e30c9..6ae039337ee 100644
--- a/static/compliance/source/protocols/governance/index.yaml
+++ b/static/compliance/source/protocols/governance/index.yaml
@@ -4,6 +4,9 @@ title: "Governance denial and human escalation"
category: media_buy_governance_escalation
summary: "Buyer's governance agent denies a media buy that exceeds spending authority, escalates to a human who approves with conditions."
track: campaign_governance
+requires:
+ - controller
+
required_tools:
- sync_plans
- check_governance
diff --git a/static/compliance/source/protocols/governance/scenarios/property_list_change_webhook_signing.yaml b/static/compliance/source/protocols/governance/scenarios/property_list_change_webhook_signing.yaml
index 88014c33a7e..74675d9ac30 100644
--- a/static/compliance/source/protocols/governance/scenarios/property_list_change_webhook_signing.yaml
+++ b/static/compliance/source/protocols/governance/scenarios/property_list_change_webhook_signing.yaml
@@ -5,6 +5,9 @@ title: "Property-list change webhook signing"
category: governance
summary: "Property-list change notifications use the RFC 9421 webhook profile and match the published payload contract."
track: governance
+requires:
+ - controller
+
required_tools:
- create_property_list
- update_property_list
diff --git a/static/compliance/source/protocols/media-buy/index.yaml b/static/compliance/source/protocols/media-buy/index.yaml
index 0a0324adc2d..23247a23181 100644
--- a/static/compliance/source/protocols/media-buy/index.yaml
+++ b/static/compliance/source/protocols/media-buy/index.yaml
@@ -4,6 +4,9 @@ title: "Media buy seller agent"
category: media_buy_seller
summary: "Seller agent that receives briefs, returns products, accepts media buys, and reports delivery."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/advanced_delivery_reporting.yaml b/static/compliance/source/protocols/media-buy/scenarios/advanced_delivery_reporting.yaml
index bdc35194be6..3ef034730b1 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/advanced_delivery_reporting.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/advanced_delivery_reporting.yaml
@@ -1,10 +1,12 @@
id: media_buy_seller/advanced_delivery_reporting
-version: "1.0.2"
+version: "1.0.3"
introduced_in: "3.2"
title: "Seller narrows metrics and reports delivery by canonical format"
category: media_buy_seller
summary: "Verifies requested-metric narrowing, time-threshold video views, negotiated format breakdowns, truncation disclosure, and applied-sort echoes."
track: reporting
+requires:
+ - controller
required_tools:
- get_products
@@ -101,6 +103,8 @@ phases:
- brand:
domain: "acmeoutdoor.example"
operator: "pinnacle-agency.example"
+ operator_unit:
+ id: "compliance-media_buy_seller_advanced_delivery_r-a37f01cb"
billing: "operator"
payment_terms: "net_30"
idempotency_key: "$generate:uuid_v4#advanced_delivery_reporting_sync_account"
@@ -127,6 +131,8 @@ phases:
brand:
domain: "acmeoutdoor.example"
operator: "pinnacle-agency.example"
+ operator_unit:
+ id: "compliance-media_buy_seller_advanced_delivery_r-a37f01cb"
context_outputs:
- name: advanced_product_id
path: "products[0].product_id"
@@ -158,6 +164,8 @@ phases:
brand:
domain: "acmeoutdoor.example"
operator: "pinnacle-agency.example"
+ operator_unit:
+ id: "compliance-media_buy_seller_advanced_delivery_r-a37f01cb"
start_time: "asap"
end_time: "2099-06-30T23:59:59Z"
packages:
@@ -214,6 +222,8 @@ phases:
brand:
domain: "acmeoutdoor.example"
operator: "pinnacle-agency.example"
+ operator_unit:
+ id: "compliance-media_buy_seller_advanced_delivery_r-a37f01cb"
media_buy_ids: ["$context.advanced_media_buy_id"]
requested_metrics: ["time_based_views"]
reporting_dimensions:
diff --git a/static/compliance/source/protocols/media-buy/scenarios/audience_activation_discovery.yaml b/static/compliance/source/protocols/media-buy/scenarios/audience_activation_discovery.yaml
index 40f5064da56..bc2b377531a 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/audience_activation_discovery.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/audience_activation_discovery.yaml
@@ -5,6 +5,8 @@ title: "Seller discovers audience activation paths honestly"
category: media_buy_seller
summary: "Verifies capability and product declarations, vendor-constrained matching, OR semantics, omitted-field wildcards, and exclusion of undeclared products."
track: media_buy
+requires:
+ - controller
requires_capability:
path: experimental_features
diff --git a/static/compliance/source/protocols/media-buy/scenarios/audience_buy_flow.yaml b/static/compliance/source/protocols/media-buy/scenarios/audience_buy_flow.yaml
index ebfa2bd5440..cb8a43482c3 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/audience_buy_flow.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/audience_buy_flow.yaml
@@ -4,6 +4,8 @@ title: "Seller fulfills a media buy with audience targeting from a synced CRM au
category: media_buy_seller
summary: "Verifies that a seller advertising audience_targeting can ingest a CRM audience via sync_audiences, accept a media buy whose targeting_overlay references the bound audience_id, reject malformed audience references, and report delivery for the audience-targeted buy. Sibling to media_buy_seller/performance_buy_flow on the audience side: the unbound-id rejection is the discriminating assertion."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares audience_targeting.
# Sellers without it (broadcast TV, signal-only, pure brand-suitability) grade
diff --git a/static/compliance/source/protocols/media-buy/scenarios/availability_windows.yaml b/static/compliance/source/protocols/media-buy/scenarios/availability_windows.yaml
index 01dcc349b6c..e59b009a422 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/availability_windows.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/availability_windows.yaml
@@ -4,6 +4,9 @@ title: "Seller answers flexible-window availability with eligibility-aware statu
category: media_buy_seller
summary: "Verifies offer_filters.availability_horizon discovery: time-dimensioned forecast points that partition the horizon, availability_status computed from booking eligibility (not only holds), forecast excluded from conditional reads, and PRODUCT_UNAVAILABLE on buys against closed or too-short windows."
track: media_buy
+requires:
+ - controller
+
required_tools:
- list_products
- buy_products
diff --git a/static/compliance/source/protocols/media-buy/scenarios/available_actions.yaml b/static/compliance/source/protocols/media-buy/scenarios/available_actions.yaml
index 778fd8c402b..0801b0a7a47 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/available_actions.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/available_actions.yaml
@@ -4,6 +4,9 @@ title: "Seller carries product allowed actions into per-buy available actions"
category: media_buy_seller
summary: "Validates the AdCP 3.1 media-buy action-discovery flow: product allowed_actions[], buy available_actions[], SLAWindow duration fields, self-serve mutation, and ACTION_NOT_ALLOWED enforcement."
track: media_buy
+requires:
+ - controller
+
default_agent: sales
# This scenario drives a synced creative straight into an active media buy so
diff --git a/static/compliance/source/protocols/media-buy/scenarios/bidding_cost_binding.yaml b/static/compliance/source/protocols/media-buy/scenarios/bidding_cost_binding.yaml
index 74a27844969..4fa97289357 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/bidding_cost_binding.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/bidding_cost_binding.yaml
@@ -4,6 +4,8 @@ title: "Seller rejects ambiguous fixed cost-control binding"
category: media_buy_seller
summary: "Verifies that fixed media-buy cost caps bind deterministically and cannot mean different result units across inheriting packages."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.features.bidding_policy.media_buy.fixed.cost_per_strengths
diff --git a/static/compliance/source/protocols/media-buy/scenarios/bidding_policy_placement.yaml b/static/compliance/source/protocols/media-buy/scenarios/bidding_policy_placement.yaml
index 9a9db70acff..025f7a91f78 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/bidding_policy_placement.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/bidding_policy_placement.yaml
@@ -4,6 +4,8 @@ title: "Seller preserves bidding scope and explicit automatic overrides"
category: media_buy_seller
summary: "Verifies that a seller advertising fixed media-buy max_bid support accepts an inherited default, echoes it once, and does not materialize package copies. When package automatic support is also advertised, it verifies an explicit automatic override."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.features.bidding_policy.media_buy.fixed.modes
diff --git a/static/compliance/source/protocols/media-buy/scenarios/billing_finality_delivery.yaml b/static/compliance/source/protocols/media-buy/scenarios/billing_finality_delivery.yaml
index 2cdf1af71db..d3e84976a57 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/billing_finality_delivery.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/billing_finality_delivery.yaml
@@ -4,6 +4,9 @@ title: "Billing finality delivery and usage reporting"
category: media_buy_seller
summary: "Verifies that 3.1 billing-grade delivery rows distinguish provisional from final numbers and that report_usage accepts final usage records with finality metadata."
track: reporting
+requires:
+ - controller
+
introduced_in: "3.1"
required_tools:
- sync_accounts
diff --git a/static/compliance/source/protocols/media-buy/scenarios/canonical_formats.yaml b/static/compliance/source/protocols/media-buy/scenarios/canonical_formats.yaml
index e4cfa3220fd..c31126eddcd 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/canonical_formats.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/canonical_formats.yaml
@@ -4,6 +4,9 @@ title: "Canonical formats and deprecated named-format compatibility"
category: media_buy_seller
summary: "Validates canonical product formats and the optional, explicitly deprecated named-format compatibility projection."
track: products
+requires:
+ - controller
+
introduced_in: "3.1"
required_tools:
- get_products
diff --git a/static/compliance/source/protocols/media-buy/scenarios/catalog_item_availability_updates.yaml b/static/compliance/source/protocols/media-buy/scenarios/catalog_item_availability_updates.yaml
index b843633d5f8..abd5bc53eab 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/catalog_item_availability_updates.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/catalog_item_availability_updates.yaml
@@ -4,6 +4,9 @@ title: "Buyer-managed catalog items support immediate availability updates"
category: media_buy_seller
summary: "Verifies capability-gated, atomic, synchronous suppression and restoration of buyer-managed catalog items."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.2"
requires_capability:
diff --git a/static/compliance/source/protocols/media-buy/scenarios/clicks_buy_flow.yaml b/static/compliance/source/protocols/media-buy/scenarios/clicks_buy_flow.yaml
index 34cbe395100..3caa53ef772 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/clicks_buy_flow.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/clicks_buy_flow.yaml
@@ -4,6 +4,8 @@ title: "Seller fulfills a media buy with a clicks optimization goal (target CPC)
category: media_buy_seller
summary: "Verifies that a seller advertising clicks in supported_optimization_metrics can accept a media buy whose metric-kind optimization_goal targets cost-per-click and reports clicks + cost_per_click on delivery. Lightweight sibling to the performance scenarios on the click-optimization side: sellers that don't advertise clicks as an optimization metric (rare — most do; pure brand sellers like broadcast TV upper-funnel video are the not_applicable population) grade not_applicable."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares clicks in
# media_buy.supported_optimization_metrics (proposed in #4669). Most
diff --git a/static/compliance/source/protocols/media-buy/scenarios/collection_selection.yaml b/static/compliance/source/protocols/media-buy/scenarios/collection_selection.yaml
index aa2ecd61482..7c7b247264b 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/collection_selection.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/collection_selection.yaml
@@ -5,6 +5,8 @@ title: "Buyer commits collection selection and the seller echoes it as concrete
category: media_buy_seller
summary: "Verifies mode: selected accepts an explicit domain-qualified subset, mode: default materializes the product's full bundle on readback, package readback always echoes committed collection_selection as concrete selectors, and a fixed (non-selectable) bundle rejects partial selection while accepting an exact restatement."
track: media_buy
+requires:
+ - controller
required_tools:
- get_products
diff --git a/static/compliance/source/protocols/media-buy/scenarios/completed_views_buy_flow.yaml b/static/compliance/source/protocols/media-buy/scenarios/completed_views_buy_flow.yaml
index 99b9081dd1f..32654d7beff 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/completed_views_buy_flow.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/completed_views_buy_flow.yaml
@@ -4,6 +4,8 @@ title: "Seller fulfills a video media buy with a completed_views optimization go
category: media_buy_seller
summary: "Verifies that a seller advertising completed_views in supported_optimization_metrics can accept a media buy whose metric-kind optimization_goal targets completed views at a buyer-supplied view_duration_seconds, reject view_duration_seconds values not in the product's metric_optimization.supported_view_durations, and report completed_views + completion_rate on delivery. Sibling to reach_buy_flow on the video-completion side: sellers without video inventory (display-only DSPs, retail-media networks, audio-only sellers without video products) grade not_applicable."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares completed_views in
# media_buy.supported_optimization_metrics (proposed in #4669). Sellers
diff --git a/static/compliance/source/protocols/media-buy/scenarios/create_media_buy_async.yaml b/static/compliance/source/protocols/media-buy/scenarios/create_media_buy_async.yaml
index 779b0e2c342..d7e93bbf78a 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/create_media_buy_async.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/create_media_buy_async.yaml
@@ -4,6 +4,8 @@ title: "Seller returns submitted task envelope when create_media_buy goes async"
category: media_buy_seller
summary: "Verifies the AdCP-payload wire shape of the submitted-arm response from create_media_buy: status='submitted', task_id present, no media_buy_id and no packages on the envelope."
track: media_buy
+requires:
+ - controller
# The submitted response arm is a production protocol path, but forcing a
# seller into it is a sandbox-only compliance capability. Gate the entire
diff --git a/static/compliance/source/protocols/media-buy/scenarios/create_media_buy_async_lifecycle.yaml b/static/compliance/source/protocols/media-buy/scenarios/create_media_buy_async_lifecycle.yaml
index 28df0f7affb..04167d131ae 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/create_media_buy_async_lifecycle.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/create_media_buy_async_lifecycle.yaml
@@ -5,6 +5,8 @@ title: "Seller exposes create_media_buy tasks through read and list lifecycle to
category: media_buy_seller
summary: "Forces create_media_buy into the submitted arm, reconciles the task through get_task_status and list_tasks, completes it deterministically, and verifies the terminal media-buy result."
track: media_buy
+requires:
+ - controller
# The async arm is optional. Sellers that cannot deterministically exercise it
# skip this scenario before any state is created.
diff --git a/static/compliance/source/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml b/static/compliance/source/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml
index b53f74b8edc..fc4c2835308 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml
@@ -4,6 +4,9 @@ title: "Creative lifecycle is decoupled from media buy lifecycle"
category: media_buy_seller
summary: "Validates that canceling a media buy releases package-creative assignments but leaves the underlying creatives in the library with their review state intact, and that buyers can reuse released creatives on a new buy."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/creative_reception.yaml b/static/compliance/source/protocols/media-buy/scenarios/creative_reception.yaml
index 3e5fcf5e1d4..413d10d38f0 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/creative_reception.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/creative_reception.yaml
@@ -4,6 +4,9 @@ title: "Sales agent with creative capabilities"
category: media_buy_seller
summary: "Stateful sales agent that accepts pushed creative assets and renders them in its environment."
track: creative
+requires:
+ - controller
+
required_tools:
- sync_creatives
diff --git a/static/compliance/source/protocols/media-buy/scenarios/cross_path_targeting_provenance.yaml b/static/compliance/source/protocols/media-buy/scenarios/cross_path_targeting_provenance.yaml
index a411bec5396..73ae92ff524 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/cross_path_targeting_provenance.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/cross_path_targeting_provenance.yaml
@@ -4,6 +4,8 @@ title: "Seller preserves synced-audience and seller-signal targeting provenance"
category: media_buy_seller
summary: "Verifies that a seller keeps buyer-managed sync_audiences resources on audience_include/audience_exclude, keeps get_signals results on signal_targeting_groups, rejects cross-path substitutions, and preserves exact signal identity and pricing on readback."
track: media_buy
+requires:
+ - controller
# A scenario-level signal gate plus phase-level audience gates forms the
# conjunction without extending the runner's single requires_capability shape.
diff --git a/static/compliance/source/protocols/media-buy/scenarios/delivery_reporting.yaml b/static/compliance/source/protocols/media-buy/scenarios/delivery_reporting.yaml
index 2e8edcd4870..3f9fbf5b285 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/delivery_reporting.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/delivery_reporting.yaml
@@ -4,6 +4,9 @@ title: "Seller returns valid delivery reporting"
category: media_buy_seller
summary: "Verifies that get_media_buy_delivery returns schema-compliant delivery data after simulated delivery via the test controller."
track: reporting
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/demographic_targeting.yaml b/static/compliance/source/protocols/media-buy/scenarios/demographic_targeting.yaml
index e1c9875a1e6..4cc3970a7e1 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/demographic_targeting.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/demographic_targeting.yaml
@@ -4,6 +4,8 @@ title: "Seller compiles portable age intent exactly and exposes lossless readbac
category: media_buy_seller
summary: "Verifies product-scoped continuous, interval, and signal-backed demographic execution; explicit open-bound and unknown-age handling; exact bucket unions; direct-create rejection of inexact predicates; and exact package readback."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.execution.targeting.demographics.supported
diff --git a/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment.yaml b/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment.yaml
index d0db6db0e98..0e59236e1da 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment.yaml
@@ -4,6 +4,9 @@ title: "Dependency impairment end-to-end — resource transition propagates to m
category: media_buy_seller
summary: "Forces a creative from approved → rejected on a non-terminal media buy, verifies the buy reflects health: impaired with a matching impairments[] entry, and recovers via assignment swap to a different creative (canonical recovery vector — re-approval of the same creative_id is uncommon in production)."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment_audience.yaml b/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment_audience.yaml
index 58fb207bab1..4af2cf3bb32 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment_audience.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment_audience.yaml
@@ -4,6 +4,8 @@ title: "Audience dependency impairment — suspension propagates to media buy he
category: media_buy_seller
summary: "Syncs an audience, targets it from a package, forces ready → suspended, verifies an audience impairment, then restores ready and verifies recovery."
track: media_buy
+requires:
+ - controller
required_tools:
- sync_audiences
diff --git a/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml b/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml
index 2fad5851634..37c7ec9f816 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml
@@ -4,6 +4,9 @@ title: "Dependency impairment cardinality — impairments[] tracks each offline
category: media_buy_seller
summary: "Two creatives on two packages of the same buy. Rejects them sequentially and verifies impairments[] grows 0 → 1 → 2; recovers them sequentially via swap-assignment and verifies impairments[] shrinks 2 → 1 → 0. Pressure-tests the inverse rule under cardinality — a seller emitting any impairment entry rather than the right one fails."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/event_dedup_flow.yaml b/static/compliance/source/protocols/media-buy/scenarios/event_dedup_flow.yaml
index f17044975de..d40e504db54 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/event_dedup_flow.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/event_dedup_flow.yaml
@@ -4,6 +4,8 @@ title: "Seller deduplicates the same event across multiple registered event sour
category: media_buy_seller
summary: "Verifies that a seller advertising conversion_tracking.multi_source_event_dedup can register multiple event sources for the same buy and deduplicate inbound events by event_id so the same conversion from a pixel and a CAPI source counts once, not twice. Sibling to media_buy_seller/performance_buy_flow gated on the dedup sub-capability bit: sellers that don't advertise multi-source dedup grade not_applicable."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares
# conversion_tracking.multi_source_event_dedup equals true. Sellers that
diff --git a/static/compliance/source/protocols/media-buy/scenarios/external_audience_source_binding.yaml b/static/compliance/source/protocols/media-buy/scenarios/external_audience_source_binding.yaml
index 8a546632af3..cc5fae4caa0 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/external_audience_source_binding.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/external_audience_source_binding.yaml
@@ -5,6 +5,8 @@ title: "Seller binds an external audience source into a targetable audience"
category: media_buy_seller
summary: "Verifies dataset-source ingestion, discovery echo, media-buy targeting, unsupported-rail rejection, and transport immutability."
track: media_buy
+requires:
+ - controller
requires_all_capabilities:
- path: experimental_features
diff --git a/static/compliance/source/protocols/media-buy/scenarios/frequency_cap_capability_updates.yaml b/static/compliance/source/protocols/media-buy/scenarios/frequency_cap_capability_updates.yaml
index 1e7d825505b..bfc12b720b1 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/frequency_cap_capability_updates.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/frequency_cap_capability_updates.yaml
@@ -4,6 +4,8 @@ title: "Package frequency-cap capability and update boundaries"
category: media_buy_seller
summary: "Verifies constrained discovery with seller-wide unit inheritance, create-only rejection, out-of-range rejection, mutable update, package-qualified actions, and exact readback."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.frequency_capping
diff --git a/static/compliance/source/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml b/static/compliance/source/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml
index 6ca96d77480..9b223028aa3 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml
@@ -4,6 +4,8 @@ title: "Seller honors a package-level frequency cap and reports observed frequen
category: media_buy_seller
summary: "Verifies that a seller advertising frequency_capping accepts a package-level frequency_cap (max_impressions + per + window form) on create_media_buy and, after simulated delivery, reports observed reach and frequency on get_media_buy_delivery with the observed frequency at-or-below the requested cap. Runtime-enforcement scenario — no rejection arm. Sellers without frequency_capping grade not_applicable."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares frequency_capping (object
# presence indicates the seller honors targeting.frequency_cap and rejects
diff --git a/static/compliance/source/protocols/media-buy/scenarios/geo_place_targeting.yaml b/static/compliance/source/protocols/media-buy/scenarios/geo_place_targeting.yaml
index 9c6314e6ea7..b7ff0aee5ea 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/geo_place_targeting.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/geo_place_targeting.yaml
@@ -4,6 +4,8 @@ title: "Seller resolves, validates, and echoes identifier-based place targeting"
category: media_buy_seller
summary: "Verifies known-now place discovery, declared-later place permission, create/update persistence, package-state echo, and deterministic semantic rejection cases."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.execution.targeting.geo_places.geonames.countries.NL
diff --git a/static/compliance/source/protocols/media-buy/scenarios/geo_region_all_values_support.yaml b/static/compliance/source/protocols/media-buy/scenarios/geo_region_all_values_support.yaml
index 779681af798..4f8ccf3c8a5 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/geo_region_all_values_support.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/geo_region_all_values_support.yaml
@@ -4,6 +4,8 @@ title: "Seller proves exhaustive country-level ISO subdivision support"
category: media_buy_seller
summary: "Verifies that all_values is an exhaustive country claim that contains finite future region requirements."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.execution.targeting.geo_regions.countries.FR.all_values
diff --git a/static/compliance/source/protocols/media-buy/scenarios/geo_region_exclusion_support.yaml b/static/compliance/source/protocols/media-buy/scenarios/geo_region_exclusion_support.yaml
index 5ceb540f774..f6672f27b2b 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/geo_region_exclusion_support.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/geo_region_exclusion_support.yaml
@@ -4,6 +4,8 @@ title: "Seller proves independent ISO subdivision exclusion support"
category: media_buy_seller
summary: "Verifies that finite subdivision exclusion support can be discovered and executed without inclusion support."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.execution.targeting.geo_regions_exclude.countries.FR.values
diff --git a/static/compliance/source/protocols/media-buy/scenarios/geo_region_targeting.yaml b/static/compliance/source/protocols/media-buy/scenarios/geo_region_targeting.yaml
index 363caa5e8e1..b4aae30d126 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/geo_region_targeting.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/geo_region_targeting.yaml
@@ -4,6 +4,8 @@ title: "Seller validates and persists value-aware ISO subdivision targeting"
category: media_buy_seller
summary: "Verifies exact known-region discovery, country/value future support, independent exclusion, package readback, and deterministic rejection semantics."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.execution.targeting.geo_regions.countries.FR.values
diff --git a/static/compliance/source/protocols/media-buy/scenarios/get_products_async.yaml b/static/compliance/source/protocols/media-buy/scenarios/get_products_async.yaml
index 3645be1f7c3..409a612b891 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/get_products_async.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/get_products_async.yaml
@@ -5,6 +5,9 @@ title: "Seller returns and completes async get_products discovery tasks"
category: media_buy_seller
summary: "Forces curated get_products discovery into the submitted arm, verifies idempotent replay and conflict handling, confirms the task through task APIs, completes it deterministically, and observes the terminal webhook result."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- get_task_status
diff --git a/static/compliance/source/protocols/media-buy/scenarios/get_products_rejected.yaml b/static/compliance/source/protocols/media-buy/scenarios/get_products_rejected.yaml
index 5f67e26a8db..3114d460644 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/get_products_rejected.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/get_products_rejected.yaml
@@ -5,6 +5,9 @@ title: "Seller returns a structured business rejection for a declined brief"
category: media_buy_seller
summary: "Forces get_products into the rejected arm and verifies its required fields, transport-success semantics, and mutual exclusion from success, partial-result, and error fields."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- comply_test_controller
diff --git a/static/compliance/source/protocols/media-buy/scenarios/governance_approved.yaml b/static/compliance/source/protocols/media-buy/scenarios/governance_approved.yaml
index dfd315c3a50..66e6a3d2b96 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/governance_approved.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/governance_approved.yaml
@@ -6,6 +6,7 @@ summary: "Verifies signed intent authorization, durable media-buy commit, and au
track: media_buy
requires:
- multi_agent
+ - controller
default_agent: sales
required_tools:
- sync_plans
diff --git a/static/compliance/source/protocols/media-buy/scenarios/governance_conditions.yaml b/static/compliance/source/protocols/media-buy/scenarios/governance_conditions.yaml
index 347b4b0a59a..e4f0a6e7d47 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/governance_conditions.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/governance_conditions.yaml
@@ -6,6 +6,7 @@ summary: "Verifies that conditions are a non-authorizing intent counterproposal
track: media_buy
requires:
- multi_agent
+ - controller
default_agent: sales
required_tools:
- sync_plans
diff --git a/static/compliance/source/protocols/media-buy/scenarios/governance_denied.yaml b/static/compliance/source/protocols/media-buy/scenarios/governance_denied.yaml
index ec5b52066bc..6b100ac60f5 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/governance_denied.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/governance_denied.yaml
@@ -6,6 +6,7 @@ summary: "Verifies that the seller's own execution check blocks an intent-approv
track: media_buy
requires:
- multi_agent
+ - controller
default_agent: sales
required_tools:
- sync_plans
diff --git a/static/compliance/source/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml b/static/compliance/source/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml
index 9a71c64b8cd..8a24c1bd699 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml
@@ -4,6 +4,8 @@ title: "Inline media-buy creatives without sync_creatives"
category: media_buy_seller
summary: "Verifies that a seller advertising inline_creative_management accepts package creatives on create_media_buy and update_media_buy without requiring the Creative Protocol or sync_creatives."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares inline creative handling on
# the media-buy feature surface. Sellers that do not advertise the flag grade
diff --git a/static/compliance/source/protocols/media-buy/scenarios/invalid_transitions.yaml b/static/compliance/source/protocols/media-buy/scenarios/invalid_transitions.yaml
index 9b113c55142..172a8d25009 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/invalid_transitions.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/invalid_transitions.yaml
@@ -4,6 +4,9 @@ title: "Seller rejects illegal state transitions and unknown references"
category: media_buy_seller
summary: "Validates that the seller returns structured AdCP errors (MEDIA_BUY_NOT_FOUND, PACKAGE_NOT_FOUND, NOT_CANCELLABLE) rather than 500s or undefined behavior when the buyer references missing entities or attempts forbidden state transitions."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/inventory_list_no_match.yaml b/static/compliance/source/protocols/media-buy/scenarios/inventory_list_no_match.yaml
index 3a6d307e763..84e94157ae8 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/inventory_list_no_match.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/inventory_list_no_match.yaml
@@ -4,6 +4,9 @@ title: "Seller handles a property_list reference that matches zero inventory"
category: media_buy_seller
summary: "Verifies a seller returns a clear unavailable-product error — not a crash — when a buyer references a property list that resolves to nothing in the seller's catalog."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/inventory_list_targeting.yaml b/static/compliance/source/protocols/media-buy/scenarios/inventory_list_targeting.yaml
index edbb8b20ea9..b0c21f69995 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/inventory_list_targeting.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/inventory_list_targeting.yaml
@@ -4,6 +4,9 @@ title: "Seller honors property_list targeting on create and update"
category: media_buy_seller
summary: "Verifies that a seller accepts PropertyListReference in package targeting on create_media_buy AND update_media_buy, with parity between both paths."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/measurement_accountability.yaml b/static/compliance/source/protocols/media-buy/scenarios/measurement_accountability.yaml
index c4f6d281191..ec48132c593 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/measurement_accountability.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/measurement_accountability.yaml
@@ -4,6 +4,9 @@ title: "End-to-end metric accountability through the media buy lifecycle"
category: media_buy_seller
summary: "Buyer requires specific reporting metrics at discovery; seller filters products to those that can deliver; delivery report exposes any gaps via missing_metrics."
track: reporting
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/measurement_terms_accepted.yaml b/static/compliance/source/protocols/media-buy/scenarios/measurement_terms_accepted.yaml
index 2ebdd419f11..ef21d4d30a8 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/measurement_terms_accepted.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/measurement_terms_accepted.yaml
@@ -4,6 +4,9 @@ title: "Seller accepts supported measurement_terms"
category: media_buy_seller
summary: "A seller that advertises measurement-term acceptance accepts a supported configuration and returns the confirmed terms."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/measurement_terms_rejected.yaml b/static/compliance/source/protocols/media-buy/scenarios/measurement_terms_rejected.yaml
index 48d67424275..c5ee0388705 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/measurement_terms_rejected.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/measurement_terms_rejected.yaml
@@ -4,6 +4,9 @@ title: "Seller rejects unworkable measurement_terms"
category: media_buy_seller
summary: "Buyer proposes measurement_terms the seller will not accept; seller returns TERMS_REJECTED without being required to accept a different configuration."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/protocols/media-buy/scenarios/media_buy_frequency_cap_readback.yaml b/static/compliance/source/protocols/media-buy/scenarios/media_buy_frequency_cap_readback.yaml
index 859851b99ea..e7282b693c6 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/media_buy_frequency_cap_readback.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/media_buy_frequency_cap_readback.yaml
@@ -4,6 +4,8 @@ title: "Seller accepts and reads back a MediaBuy frequency cap"
category: media_buy_seller
summary: "Verifies participation-gated discovery, incompatible-mix rejection, exact acceptance, and readback of a root cap across a two-product buy."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.aggregate_frequency_capping
diff --git a/static/compliance/source/protocols/media-buy/scenarios/media_buy_frequency_cap_updates.yaml b/static/compliance/source/protocols/media-buy/scenarios/media_buy_frequency_cap_updates.yaml
index 6d876419935..3e4d61c359a 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/media_buy_frequency_cap_updates.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/media_buy_frequency_cap_updates.yaml
@@ -4,6 +4,8 @@ title: "Seller replaces, clears, and guards a MediaBuy frequency cap after creat
category: media_buy_seller
summary: "Verifies update_media_buy_frequency_cap availability, root-cap replacement and null clearing without touching package caps, atomic rejection of new_packages that cannot join the shared counter, the resulting-state rule for clearing a cap while adding packages, and ACTION_NOT_ALLOWED once the package mix can no longer change the root cap."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.aggregate_frequency_capping
diff --git a/static/compliance/source/protocols/media-buy/scenarios/metric_container_subsumption.yaml b/static/compliance/source/protocols/media-buy/scenarios/metric_container_subsumption.yaml
index 4e2bfa139ba..0b4f40e97ea 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/metric_container_subsumption.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/metric_container_subsumption.yaml
@@ -5,6 +5,8 @@ title: "Container-subsumption evaluation for metric set operations"
category: media_buy_seller
summary: "Verifies a container token (e.g. viewability) subsumes its leaf identities (e.g. viewable_rate) for required_metrics filtering and requested_metrics carrier selection, and that a leaf never subsumes a sibling leaf."
track: reporting
+requires:
+ - controller
required_tools:
- get_products
diff --git a/static/compliance/source/protocols/media-buy/scenarios/outcome_target.yaml b/static/compliance/source/protocols/media-buy/scenarios/outcome_target.yaml
index b170c61659b..8e6af27e771 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/outcome_target.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/outcome_target.yaml
@@ -4,6 +4,9 @@ title: "Seller solves for budget from a structured outcome target"
category: media_buy_seller
summary: "Verifies criteria.outcome_target reverse forecasting: a metric or event goal plus desired volume answered with total_budget_guidance and a forecast whose points carry the goal's key in metrics, and a cost_per target answered in commercial_terms.bidding.cost_per with the buyer's strength and currency, or rejected when the products are not priced in that currency."
track: media_buy
+requires:
+ - controller
+
required_tools:
- request_proposals
diff --git a/static/compliance/source/protocols/media-buy/scenarios/outcome_target_list_products_inert.yaml b/static/compliance/source/protocols/media-buy/scenarios/outcome_target_list_products_inert.yaml
index ff514d73d21..00a9adb14bf 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/outcome_target_list_products_inert.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/outcome_target_list_products_inert.yaml
@@ -4,6 +4,9 @@ title: "list_products ignores criteria.outcome_target for every seller"
category: media_buy_seller
summary: "Verifies that a list_products request carrying criteria.outcome_target is answered with a product page rather than rejected, whether or not the seller declares media_buy.outcome_target."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.2"
required_tools:
diff --git a/static/compliance/source/protocols/media-buy/scenarios/owner_sold_channel_carriage.yaml b/static/compliance/source/protocols/media-buy/scenarios/owner_sold_channel_carriage.yaml
index 1d2b6cac2ee..f253629c35c 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/owner_sold_channel_carriage.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/owner_sold_channel_carriage.yaml
@@ -5,6 +5,8 @@ title: "Seller declares owner-sold channel carriage and enforces collection sele
category: media_buy_seller
summary: "Verifies an owner-sold channel product combines host property scope with the owner's canonical collection selector, that buyer collection selection requires explicit collection_ids, and that unknown or mismatched collection selectors are rejected rather than silently substituted."
track: media_buy
+requires:
+ - controller
required_tools:
- get_products
diff --git a/static/compliance/source/protocols/media-buy/scenarios/package_automatic_bidding.yaml b/static/compliance/source/protocols/media-buy/scenarios/package_automatic_bidding.yaml
index 73c5d1e4898..9765ffd2dd0 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/package_automatic_bidding.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/package_automatic_bidding.yaml
@@ -4,6 +4,8 @@ title: "Seller preserves explicit package automatic bidding"
category: media_buy_seller
summary: "Verifies package-scoped automatic bidding independently of media-buy bidding support."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.features.bidding_policy.package.fixed.modes
diff --git a/static/compliance/source/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml b/static/compliance/source/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml
index 8e0174a1a75..979b328db7a 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml
@@ -4,6 +4,9 @@ title: "Legacy package correlation fallback without product_id"
category: media_buy_seller
summary: "Models the mixed-seller compatibility path where a legacy package response omits product_id and buyers correlate by package context.buyer_ref."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_media_buys
diff --git a/static/compliance/source/protocols/media-buy/scenarios/pending_creatives_to_start.yaml b/static/compliance/source/protocols/media-buy/scenarios/pending_creatives_to_start.yaml
index fef50bf99b0..f2b87baf6b4 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/pending_creatives_to_start.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/pending_creatives_to_start.yaml
@@ -4,6 +4,8 @@ title: "Creative sync unblocks pending_creatives → pending_start"
category: media_buy_seller
summary: "Verifies that a media buy created without creatives sits in pending_creatives until sync_creatives completes, then transitions to pending_start."
track: media_buy
+requires:
+ - controller
# This scenario requires both a creative library and an explicit auto-approval
# declaration. Sellers that lack either capability grade not_applicable rather
diff --git a/static/compliance/source/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml b/static/compliance/source/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml
index 13b860af48b..ad2721a1409 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml
@@ -4,6 +4,8 @@ title: "Seller surfaces per-creative conversion attribution in delivery reportin
category: media_buy_seller
summary: "Verifies that a seller advertising conversion_tracking.per_creative_attribution can register two creatives on a single package, accept a media buy with a CPA event-kind goal, ingest conversion events, and surface a populated by_package[].by_creative[] breakdown carrying conversions per creative in get_media_buy_delivery. Sibling to media_buy_seller/performance_buy_flow gated on the per_creative_attribution sub-capability: sellers that report attribution only at the line / package / placement / campaign granularity (retail-media, MMP-mediated mobile, CTV performance) grade not_applicable, not failing."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares
# conversion_tracking.per_creative_attribution equals true. Sellers that
diff --git a/static/compliance/source/protocols/media-buy/scenarios/performance_buy_flow.yaml b/static/compliance/source/protocols/media-buy/scenarios/performance_buy_flow.yaml
index a924c62ee59..b7338e5ca22 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/performance_buy_flow.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/performance_buy_flow.yaml
@@ -4,6 +4,8 @@ title: "Seller fulfills a performance (event-kind goal) media buy with a CPA tar
category: media_buy_seller
summary: "Verifies that a seller advertising conversion_tracking can bind an event source, accept a media buy with an event-kind optimization_goal targeting CPA, reject malformed performance briefs, ingest conversion events, and report conversion-attributed delivery including per-creative breakdown. ROAS / maximize_value goals are out of scope — see media_buy_seller/performance_buy_flow_roas (separate scenario, gated on the supported_target_kinds capability bit from #4639)."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares conversion_tracking.
# Sellers without it (pure brand/audience sellers — broadcast TV, signal-only)
diff --git a/static/compliance/source/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml b/static/compliance/source/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml
index a032d119009..a88d320a033 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml
@@ -4,6 +4,8 @@ title: "Seller fulfills a performance (event-kind goal) media buy with a ROAS ta
category: media_buy_seller
summary: "Verifies that a seller advertising conversion_tracking with per_ad_spend in supported_targets can accept a media buy whose event-kind optimization_goal carries a ROAS (per_ad_spend) target bound to an event source with value_field, reject ROAS goals that omit value_field on every event-source entry, ingest valued purchase events, and report conversion_value + roas alongside conversions and cost_per_acquisition. Sibling to media_buy_seller/performance_buy_flow gated on the supported_targets sub-capability: sellers that don't advertise per_ad_spend (most broadcast TV, upper-funnel video, signal-only) grade not_applicable."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares per_ad_spend in
# conversion_tracking.supported_targets. Sellers that compute conversions
diff --git a/static/compliance/source/protocols/media-buy/scenarios/portfolio_routing_scope.yaml b/static/compliance/source/protocols/media-buy/scenarios/portfolio_routing_scope.yaml
index 881fbf11c25..51c65d38b06 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/portfolio_routing_scope.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/portfolio_routing_scope.yaml
@@ -4,6 +4,9 @@ title: "Seller declares brief-routing portfolio scope"
category: media_buy_seller
summary: "Advises when a media-buy seller omits its complete country or channel routing allowlist."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.2"
required_tools:
diff --git a/static/compliance/source/protocols/media-buy/scenarios/pricing_currency_filter.yaml b/static/compliance/source/protocols/media-buy/scenarios/pricing_currency_filter.yaml
index 3be1e4e2097..8bc444c959f 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/pricing_currency_filter.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/pricing_currency_filter.yaml
@@ -4,6 +4,9 @@ title: "Seller filters products by accepted pricing currencies"
category: media_buy_seller
summary: "Verifies that get_products filters.pricing_currencies returns only products buyable in the requested media pricing currency and prunes returned product pricing_options."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- comply_test_controller
diff --git a/static/compliance/source/protocols/media-buy/scenarios/product_coverage_filters.yaml b/static/compliance/source/protocols/media-buy/scenarios/product_coverage_filters.yaml
index f738ab847c8..9f6c3dfbc6a 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/product_coverage_filters.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/product_coverage_filters.yaml
@@ -4,6 +4,9 @@ title: "Product coverage is preserved across discovery surfaces"
category: media_buy_seller
summary: "Checks legacy and compact coverage predicates against independent negative controls without configuring delivery targeting."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.2"
required_tools: [get_products, list_products, comply_test_controller]
diff --git a/static/compliance/source/protocols/media-buy/scenarios/product_filter_behavior.yaml b/static/compliance/source/protocols/media-buy/scenarios/product_filter_behavior.yaml
index 356d34b982c..abe9b86ca12 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/product_filter_behavior.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/product_filter_behavior.yaml
@@ -4,6 +4,8 @@ title: "Seller applies deterministic product filters in every buying mode"
category: media_buy_seller
summary: "Verifies schema-valid get_products filters affect brief curation, wholesale feeds, and refinement instead of silently no-oping."
track: media_buy
+requires:
+ - controller
required_tools:
- get_products
diff --git a/static/compliance/source/protocols/media-buy/scenarios/product_signal_targeting.yaml b/static/compliance/source/protocols/media-buy/scenarios/product_signal_targeting.yaml
index c49de08947c..cbe6cac96b3 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/product_signal_targeting.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/product_signal_targeting.yaml
@@ -4,6 +4,8 @@ title: "Seller exposes wholesale signal options and honors package-level signal_
category: media_buy_seller
summary: "Verifies that a seller with wholesale products and wholesale get_signals can expose signal targeting eligibility, accept package-level signal_targeting_groups with pricing, reject unknown signals, and echo the applied grouped expression on readback."
track: media_buy
+requires:
+ - controller
# Gate: this scenario is for sellers that expose the selectable signal menu
# through the wholesale signals feed. Product-specific inline menus are covered
diff --git a/static/compliance/source/protocols/media-buy/scenarios/provenance_audit_observation.yaml b/static/compliance/source/protocols/media-buy/scenarios/provenance_audit_observation.yaml
index 6862bea5d6a..2cd45d21f49 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/provenance_audit_observation.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/provenance_audit_observation.yaml
@@ -4,6 +4,9 @@ title: "Seller accepts a provenance carve-out claim surfaced as an audit observa
category: media_buy_seller
summary: "Buyer submits AI-assisted creatives with human_oversight directed/edited and disclosure.required false. Seller invokes an on-list verifier, records OVERSIGHT_DISCLOSURE_CARVEOUT_CLAIMED audit observations, and accepts the creatives rather than treating the observations as rejections."
track: creative
+requires:
+ - controller
+
required_tools:
- get_products
- sync_creatives
diff --git a/static/compliance/source/protocols/media-buy/scenarios/provenance_enforcement.yaml b/static/compliance/source/protocols/media-buy/scenarios/provenance_enforcement.yaml
index 442250d1f8e..175ce649c51 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/provenance_enforcement.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/provenance_enforcement.yaml
@@ -4,6 +4,9 @@ title: "Seller enforces provenance_requirements on sync_creatives"
category: media_buy_seller
summary: "Seller publishes provenance_requirements + accepted_verifiers on a product. Four structural rejections (no provenance, missing digital_source_type, off-list verifier, missing disclosure), then a corrected resubmission with on-list verifier is accepted."
track: creative
+requires:
+ - controller
+
required_tools:
- get_products
- sync_creatives
diff --git a/static/compliance/source/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml b/static/compliance/source/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml
index 03f96915a8a..7a0d3d20167 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml
@@ -4,6 +4,9 @@ title: "Seller refutes a buyer's provenance claim via on-list verifier"
category: media_buy_seller
summary: "Buyer attaches a digital_source_type claim. Seller invokes get_creative_features against an on-list verifier (creative_policy.accepted_verifiers); when the verifier contradicts the claim, seller rejects with PROVENANCE_CLAIM_CONTRADICTED carrying audit-safe error.details."
track: creative
+requires:
+ - controller
+
required_tools:
- get_products
- sync_creatives
diff --git a/static/compliance/source/protocols/media-buy/scenarios/reach_buy_flow.yaml b/static/compliance/source/protocols/media-buy/scenarios/reach_buy_flow.yaml
index 717e7e4f5ba..77c4a8cde79 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/reach_buy_flow.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/reach_buy_flow.yaml
@@ -4,6 +4,8 @@ title: "Seller fulfills a media buy with a reach optimization goal"
category: media_buy_seller
summary: "Verifies that a seller advertising reach in supported_optimization_metrics can accept a media buy whose metric-kind optimization_goal targets unique reach with a buyer-supplied reach_unit, reject reach_unit values not in the product's metric_optimization.supported_reach_units, and report reach + frequency on delivery. Sibling to the performance buy scenarios on the brand-reach side: sellers that don't advertise reach as an optimization metric (most pure performance DSPs, retail-media networks) grade not_applicable."
track: media_buy
+requires:
+ - controller
# Gate: scenario runs only when the seller declares reach in
# media_buy.supported_optimization_metrics (proposed in #4669). Sellers
diff --git a/static/compliance/source/protocols/media-buy/scenarios/read_filter_behavior.yaml b/static/compliance/source/protocols/media-buy/scenarios/read_filter_behavior.yaml
index 0df45df7ce3..c25fd25cf5f 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/read_filter_behavior.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/read_filter_behavior.yaml
@@ -5,6 +5,8 @@ title: "Seller applies deterministic media-buy read filters"
category: media_buy_seller
summary: "Verifies get_media_buys membership filters and half-open get_media_buy_delivery date bounds instead of accepting them as no-ops."
track: reporting
+requires:
+ - controller
required_tools:
- get_media_buys
diff --git a/static/compliance/source/protocols/media-buy/scenarios/revenue_share_pricing.yaml b/static/compliance/source/protocols/media-buy/scenarios/revenue_share_pricing.yaml
index 050726f715d..210fa6ae510 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/revenue_share_pricing.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/revenue_share_pricing.yaml
@@ -4,6 +4,9 @@ title: "Revenue-share pricing and settlement"
category: media_buy_seller
summary: "Verifies contingent revenue-share discovery, commitment without a bid, commissionable-value delivery, and formula-checked usage reconciliation."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.1"
required_tools:
- sync_accounts
diff --git a/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_budget.yaml b/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_budget.yaml
index 2c5f29216be..cfe4949c003 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_budget.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_budget.yaml
@@ -1,9 +1,11 @@
id: media_buy_seller/seller_optimized_budget
-version: "1.1.0"
+version: "1.1.1"
title: "Seller accepts and persists a seller-optimized budget across packages"
category: media_buy_seller
summary: "Verifies that a seller advertising seller_optimized_budget accepts and persists the core shared-budget contract (shared total, cross-package goals, media-buy pacing, allocation echo). Package caps, minimum-spend targets, and package pacing are graded only when their own sub-capability is advertised, and must be rejected with UNSUPPORTED_FEATURE before any over-subscription validation when it is not."
track: media_buy
+requires:
+ - controller
requires_capability:
path: media_buy.features.seller_optimized_budget
@@ -576,7 +578,7 @@ phases:
equals: true
steps:
- id: create_shared_buy_with_min_spend_targets
- title: "Set a soft minimum on the prospecting package"
+ title: "Set a soft minimum on the retargeting package"
task: create_media_buy
schema_ref: "media-buy/create-media-buy-request.json"
response_schema_ref: "media-buy/create-media-buy-response.json"
@@ -584,7 +586,11 @@ phases:
stateful: true
expected: |
Accept a soft minimum-spend target (20000) on an uncapped
- prospecting package and echo it unchanged.
+ retargeting package and echo it unchanged. The target sits on the
+ second package because a conformance runner may author a package
+ cap on the first package of every create request; a target on that
+ package could then exceed its own cap, which is graded by
+ media_buy_seller/seller_optimized_min_spend_target_exceeds_package_cap.
sample_request:
account:
brand:
@@ -605,9 +611,9 @@ phases:
packages:
- product_id: "shared_budget_prospecting"
pricing_option_id: "prospecting_cpm"
- min_spend_target: 20000
- product_id: "shared_budget_retargeting"
pricing_option_id: "retargeting_cpm"
+ min_spend_target: 20000
start_time: "asap"
end_time: "2099-06-30T23:59:59Z"
idempotency_key: "$generate:uuid_v4#seller_optimized_budget_min_spend_targets"
@@ -624,7 +630,7 @@ phases:
- check: field_contains
path: "packages[*]"
value:
- product_id: "shared_budget_prospecting"
+ product_id: "shared_budget_retargeting"
min_spend_target: 20000
description: "Response preserves the soft package minimum-spend target"
@@ -649,7 +655,7 @@ phases:
- check: field_contains
path: "media_buys[0].packages[*]"
value:
- product_id: "shared_budget_prospecting"
+ product_id: "shared_budget_retargeting"
min_spend_target: 20000
description: "Readback preserves the package minimum-spend target"
diff --git a/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_min_spend_target_exceeds_package_cap.yaml b/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_min_spend_target_exceeds_package_cap.yaml
index 6c5ffe3a77a..13ff8fd4515 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_min_spend_target_exceeds_package_cap.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_min_spend_target_exceeds_package_cap.yaml
@@ -4,6 +4,9 @@ title: "Seller rejects a minimum-spend target above its own package cap"
category: media_buy_seller
summary: "Verifies that a seller advertising seller-optimized budgets, package budget caps, and minimum-spend targets rejects a package min_spend_target above that package's budget with INVALID_REQUEST before mutation."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.2"
# The cap-versus-minimum check is over-subscription validation across two
diff --git a/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_proposal_package_pacing.yaml b/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_proposal_package_pacing.yaml
index e495b503ad2..985c92744ce 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_proposal_package_pacing.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/seller_optimized_proposal_package_pacing.yaml
@@ -4,6 +4,9 @@ title: "Seller-optimized proposal carries subordinate package pacing into the bu
category: media_buy_seller
summary: "Verifies that a seller advertising seller-optimized budgets, package pacing, and proposals can express subordinate allocation pacing on a seller-optimized proposal and translate it into package pacing on execution and readback."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.2"
# Proposal-derived package pacing needs three independent declarations: the
diff --git a/static/compliance/source/protocols/media-buy/scenarios/targeting_aware_discovery.yaml b/static/compliance/source/protocols/media-buy/scenarios/targeting_aware_discovery.yaml
index c7bb1e213c9..28cbc06dc28 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/targeting_aware_discovery.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/targeting_aware_discovery.yaml
@@ -4,6 +4,9 @@ title: "Seller resolves targeting during discovery and persists inventory select
category: media_buy_seller
summary: "Verifies targeting-scoped discovery forecasts, future overlay support, sparse configured-product modifications, opaque product acceptance, and inventory targeting across create/update/readback."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.2"
required_tools:
diff --git a/static/compliance/source/protocols/media-buy/scenarios/total_budget_redistribution.yaml b/static/compliance/source/protocols/media-buy/scenarios/total_budget_redistribution.yaml
index 87b13b2c667..8afe3f12c87 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/total_budget_redistribution.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/total_budget_redistribution.yaml
@@ -4,6 +4,8 @@ title: "Atomic media-buy total budget redistribution"
category: media_buy_seller
summary: "Verifies that a fixed media-buy total_budget update proportionally rescales active packages, returns auditable package state, and rejects competing package patches atomically."
track: media_buy
+requires:
+ - controller
required_tools:
- sync_accounts
diff --git a/static/compliance/source/protocols/media-buy/scenarios/typed_proposal_negotiation.yaml b/static/compliance/source/protocols/media-buy/scenarios/typed_proposal_negotiation.yaml
index ef21def5d65..91627503829 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/typed_proposal_negotiation.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/typed_proposal_negotiation.yaml
@@ -5,12 +5,20 @@ category: media_buy_seller
summary: "Verifies the AdCP 3.2 typed negotiation lifecycle: capability-gated constraint satisfaction, product changes, digest-verified alternatives, partial invariant, immutable lineage, finalize atomicity, and idempotent replay through refine_proposals."
track: media_buy
required_tools:
+ - request_proposals
- refine_proposals
- accept_proposal
-requires_capability:
- path: media_buy.proposal_refinement.supported_dimensions
- contains: "alternatives"
+requires:
+ - controller
+
+# Proposals are seeded through request_proposals (the 3.2 lifecycle tool), so a
+# seller that declares typed refinement without it is not applicable here.
+requires_all_capabilities:
+ - path: media_buy.proposal_refinement.supported_dimensions
+ contains: "alternatives"
+ - path: media_buy.lifecycle_tools
+ contains: "request_proposals"
narrative: |
AdCP 3.2 introduces typed proposal negotiation through refine_proposals.
@@ -39,7 +47,17 @@ narrative: |
Legacy sellers that do not declare proposal_refinement are not tested by
this storyboard; their unstructured proposal path is covered by
- proposal_finalize.yaml.
+ proposal_finalize.yaml. Proposals are seeded with request_proposals, so
+ sellers that declare proposal_refinement but expose proposals only through
+ the legacy get_products facade are not applicable either: that facade cannot
+ represent typed constraints losslessly. The fixture products are seeded
+ through comply_test_controller.
+
+ Each phase after seeding names its upstream phases with depends_on. A
+ capability-gated phase the seller does not support (for example the
+ unsupported-dimension rejection when the seller declares flight) is skipped
+ alone and does not cascade-skip the finalize, accept, amendment, cancellation,
+ or batch phases.
agent:
interaction_model: media_buy_seller
@@ -60,6 +78,7 @@ prerequisites:
The caller needs a brand identity and operator credentials. The seller
must declare proposal_refinement.supported_dimensions in capabilities.
test_kit: "test-kits/acme-outdoor.yaml"
+ controller_seeding: true
fixtures:
products:
@@ -175,21 +194,22 @@ phases:
The buyer needs at least one proposal_id to target with refine_proposals.
steps:
- - id: get_products_brief
- title: "Send a brief and receive proposals"
- task: get_products
- schema_ref: "media-buy/get-products-request.json"
- response_schema_ref: "media-buy/get-products-response.json"
- doc_ref: "/media-buy/task-reference/get_products"
- comply_scenario: full_sales_flow
- stateful: false
+ - id: request_seed_proposals
+ title: "Request seed proposals for the fixture products"
+ task: request_proposals
+ schema_ref: "media-buy/request-proposals-request.json"
+ response_schema_ref: "media-buy/request-proposals-response.json"
+ doc_ref: "/media-buy/task-reference/request_proposals"
+ stateful: true
expected: |
- Return products and proposals matching the brief. At least one
- proposal with proposal_id is required for the typed revision phases.
+ Return outcome proposed with at least one draft proposal covering
+ the seeded fixture products. The proposal_id is required for the
+ typed revision phases.
sample_request:
- idempotency_key: "$generate:uuid_v4#typed_negotiation_seed_get_products_brief"
- buying_mode: "brief"
+ idempotency_key: "$generate:uuid_v4#typed_negotiation_seed_request_proposals"
brief: "Premium video and display across sports and outdoor lifestyle. Q4 flight, $75K budget. Adults 25-54, US."
+ criteria:
+ product_ids: ["premium_video_q4", "display_standard_q4", "native_feed_q4"]
account:
brand:
domain: "acmeoutdoor.example"
@@ -203,7 +223,7 @@ phases:
validations:
- check: response_schema
- description: "Response matches get-products-response.json schema"
+ description: "Response matches request-proposals-response.json schema"
- check: field_present
path: "proposals"
description: "Response contains proposals"
@@ -329,7 +349,7 @@ phases:
value: "constraint_unsatisfiable"
description: "reason_code is constraint_unsatisfiable for a typed failure"
- check: field_contains
- path: "results[0].unsatisfied_constraints"
+ path: "results[0].unsatisfied_constraints[*]"
value: "total_budget"
description: "unsatisfied_constraints echoes the failing constraint key"
@@ -485,6 +505,7 @@ phases:
- id: finalize_proposal
title: "Finalize draft into committed snapshot"
+ depends_on: [account_setup, seed_proposals]
narrative: |
Finalize the initial seed draft. The seller creates a committed
successor with firm pricing and an inventory hold. The committed
@@ -542,6 +563,7 @@ phases:
- id: finalize_idempotent_replay
title: "Idempotent finalize replay"
+ depends_on: [finalize_proposal]
narrative: |
Replay the exact finalize request with the same idempotency_key. The
seller must return the cached committed proposal with replayed: true.
@@ -579,6 +601,7 @@ phases:
- id: accept_committed
title: "Accept committed proposal to create MediaBuy"
+ depends_on: [finalize_proposal]
narrative: |
The buyer accepts the committed proposal by passing the proposal_id
and proposal_terms_digest. The seller atomically verifies both before
@@ -618,6 +641,7 @@ phases:
- id: amendment_from_accepted
title: "Amendment proposal from accepted source"
+ depends_on: [accept_committed]
narrative: |
The buyer creates an amendment proposal against the accepted source.
This exercises the change_kind: amendment path. The source remains
@@ -659,6 +683,7 @@ phases:
- id: cancellation_from_accepted
title: "Cancellation proposal from accepted source"
+ depends_on: [accept_committed]
narrative: |
The buyer creates a cancellation proposal against the accepted source.
The source remains accepted and unchanged; the result is a new draft
@@ -698,6 +723,7 @@ phases:
- id: double_finalize_rejected
title: "Double-finalize of committed proposal"
+ depends_on: [finalize_proposal]
narrative: |
Attempt to finalize a proposal that is already committed (not a draft).
The seller must reject with INVALID_STATE at task level because
@@ -729,6 +755,7 @@ phases:
- id: multi_source_batch
title: "Multi-source batch with mixed outcomes"
+ depends_on: [seed_proposals, amendment_from_accepted]
narrative: |
Send a batch revise request targeting two sources in one call. Each
entry gets its own outcome — one may be revised while another is
diff --git a/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_accountability.yaml b/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_accountability.yaml
index f567dbee7fb..705dea58fd0 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_accountability.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_accountability.yaml
@@ -4,6 +4,8 @@ title: "End-to-end vendor-metric accountability: declaration → commitment →
category: media_buy_seller
summary: "Buyer commits vendor metrics on two packages, then verifies one clean package, one overdue gap, and one not-yet-measurable omission."
track: reporting
+requires:
+ - controller
requires_capability:
path: media_buy.features.committed_metrics_supported
diff --git a/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml b/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml
index 3c80da5a8b9..7751a61a4d4 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml
@@ -4,6 +4,9 @@ title: "Vendor-metric external catalog precondition"
category: media_buy_seller
summary: "Exercises the 3.1 SHOULD-window behavior for vendor_metric goals whose metric_id is absent from a seeded measurement.metrics[] catalog."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.1"
# Gate: scenario runs only when the seller declares vendor-metric
diff --git a/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml b/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml
index 8828523e543..a3a3a31b0bc 100644
--- a/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml
+++ b/static/compliance/source/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml
@@ -4,6 +4,9 @@ title: "Vendor-metric optimization-goal: acceptance and rejection"
category: media_buy_seller
summary: "Verifies that a seller supporting vendor_metric_optimization accepts a media buy whose optimization_goal has kind 'vendor_metric' when all preconditions are met, and rejects goals that fail either the capability check or the reporting-coherence check."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.1"
# Gate: scenario runs only when the seller declares vendor-metric
diff --git a/static/compliance/source/protocols/media-buy/state-machine.yaml b/static/compliance/source/protocols/media-buy/state-machine.yaml
index 137efb8c97c..26ef3edf216 100644
--- a/static/compliance/source/protocols/media-buy/state-machine.yaml
+++ b/static/compliance/source/protocols/media-buy/state-machine.yaml
@@ -4,6 +4,8 @@ title: "Media buy state machine lifecycle"
category: media_buy_state_machine
summary: "Validates media buy state transitions: create, pause, resume, cancel, and terminal state enforcement."
track: media_buy
+requires:
+ - controller
# This storyboard drives pause/resume immediately after create_media_buy. That
# only works for sellers that explicitly declare auto-approval; manual-review
diff --git a/static/compliance/source/protocols/signals/index.yaml b/static/compliance/source/protocols/signals/index.yaml
index e837ae041a4..03b75fce302 100644
--- a/static/compliance/source/protocols/signals/index.yaml
+++ b/static/compliance/source/protocols/signals/index.yaml
@@ -5,6 +5,9 @@ protocol: signals
category: signals_baseline
summary: "Baseline domain storyboard — every signals agent must declare signals support and return discoverable signals."
track: signals
+requires:
+ - controller
+
required_tools:
- get_signals
diff --git a/static/compliance/source/protocols/signals/scenarios/get_signals_async.yaml b/static/compliance/source/protocols/signals/scenarios/get_signals_async.yaml
index d5097dcf734..4d18d0266b4 100644
--- a/static/compliance/source/protocols/signals/scenarios/get_signals_async.yaml
+++ b/static/compliance/source/protocols/signals/scenarios/get_signals_async.yaml
@@ -5,6 +5,9 @@ title: "Signals agent returns and completes async get_signals discovery tasks"
category: signals_baseline
summary: "Forces semantic get_signals discovery into the submitted arm, verifies task visibility, completes it deterministically, and observes the terminal webhook result."
track: signals
+requires:
+ - controller
+
required_tools:
- get_signals
- get_task_status
diff --git a/static/compliance/source/specialisms/audience-sync/index.yaml b/static/compliance/source/specialisms/audience-sync/index.yaml
index 4880c62bf5f..7462a2d5821 100644
--- a/static/compliance/source/specialisms/audience-sync/index.yaml
+++ b/static/compliance/source/specialisms/audience-sync/index.yaml
@@ -5,6 +5,9 @@ protocol: media-buy
category: audience_sync
summary: "Full audience lifecycle: account discovery, audience creation with hashed identifiers, and audience deletion."
track: audiences
+requires:
+ - controller
+
required_tools:
- list_accounts
- sync_audiences
diff --git a/static/compliance/source/specialisms/brand-rights/index.yaml b/static/compliance/source/specialisms/brand-rights/index.yaml
index c1f0c2115af..25a32a3b373 100644
--- a/static/compliance/source/specialisms/brand-rights/index.yaml
+++ b/static/compliance/source/specialisms/brand-rights/index.yaml
@@ -5,6 +5,9 @@ protocol: brand
category: brand_rights
summary: "Brand agent that serves identity assets and licenses rights for AI-generated content."
track: core
+requires:
+ - controller
+
required_tools:
- get_brand_identity
requires_scenarios:
diff --git a/static/compliance/source/specialisms/brand-rights/scenarios/update_rights_lifecycle.yaml b/static/compliance/source/specialisms/brand-rights/scenarios/update_rights_lifecycle.yaml
index b42c236245b..db966d7d81a 100644
--- a/static/compliance/source/specialisms/brand-rights/scenarios/update_rights_lifecycle.yaml
+++ b/static/compliance/source/specialisms/brand-rights/scenarios/update_rights_lifecycle.yaml
@@ -4,6 +4,8 @@ title: "Update a seeded rights grant and reject unknown references"
category: brand_rights
summary: "Verifies that update_rights atomically updates an acquired grant and rejects an unknown rights_id with REFERENCE_NOT_FOUND."
track: brand
+requires:
+ - controller
narrative: |
`update_rights` operates on a grant, not on a catalog offering. The controller
diff --git a/static/compliance/source/specialisms/collection-lists/index.yaml b/static/compliance/source/specialisms/collection-lists/index.yaml
index 015795190f5..b83f855d65b 100644
--- a/static/compliance/source/specialisms/collection-lists/index.yaml
+++ b/static/compliance/source/specialisms/collection-lists/index.yaml
@@ -5,6 +5,9 @@ protocol: governance
category: collection_lists
summary: "Curated collection lists for program-level brand safety and content targeting — create, query, update, and delete lists of content programs (shows, series, podcasts)."
track: governance
+requires:
+ - controller
+
required_tools:
- create_collection_list
diff --git a/static/compliance/source/specialisms/content-standards/index.yaml b/static/compliance/source/specialisms/content-standards/index.yaml
index 040035ab366..187fa127b7a 100644
--- a/static/compliance/source/specialisms/content-standards/index.yaml
+++ b/static/compliance/source/specialisms/content-standards/index.yaml
@@ -5,6 +5,9 @@ protocol: governance
category: content_standards
summary: "Define creative quality rules, calibrate content against them, and validate that delivered ads met the standards."
track: governance
+requires:
+ - controller
+
required_tools:
- list_content_standards
diff --git a/static/compliance/source/specialisms/creative-ad-server/index.yaml b/static/compliance/source/specialisms/creative-ad-server/index.yaml
index 070c548955d..bd8a1fa16d5 100644
--- a/static/compliance/source/specialisms/creative-ad-server/index.yaml
+++ b/static/compliance/source/specialisms/creative-ad-server/index.yaml
@@ -5,6 +5,9 @@ protocol: creative
category: creative_ad_server
summary: "Stateful ad server with pre-loaded creatives. Generates serving tags per media buy. Optionally bills through AdCP."
track: creative
+requires:
+ - controller
+
required_tools:
- build_creative
diff --git a/static/compliance/source/specialisms/creative-generative/generative-seller.yaml b/static/compliance/source/specialisms/creative-generative/generative-seller.yaml
index a75ca389c51..3759576a902 100644
--- a/static/compliance/source/specialisms/creative-generative/generative-seller.yaml
+++ b/static/compliance/source/specialisms/creative-generative/generative-seller.yaml
@@ -4,6 +4,9 @@ title: "Generative seller agent"
category: creative_generative
summary: "Seller agent that generates creatives from briefs at buy time — no pre-built assets required."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/specialisms/creative-generative/index.yaml b/static/compliance/source/specialisms/creative-generative/index.yaml
index 9a05391f163..f664d754353 100644
--- a/static/compliance/source/specialisms/creative-generative/index.yaml
+++ b/static/compliance/source/specialisms/creative-generative/index.yaml
@@ -4,6 +4,9 @@ title: "Generative creative agent"
protocol: creative
category: creative_generative
summary: "Agent that takes a brief and generates finished creatives from scratch — no input assets required."
+requires:
+ - controller
+
required_tools:
- build_creative
# Note: sync_catalogs is NOT in required_tools. The catalog_augmented_generation
diff --git a/static/compliance/source/specialisms/creative-template/index.yaml b/static/compliance/source/specialisms/creative-template/index.yaml
index dd24e8acb58..27cf5012693 100644
--- a/static/compliance/source/specialisms/creative-template/index.yaml
+++ b/static/compliance/source/specialisms/creative-template/index.yaml
@@ -5,6 +5,9 @@ protocol: creative
category: creative_template
summary: "Stateless creative agent that takes assets in, applies templates, and produces tags or rendered output."
track: creative
+requires:
+ - controller
+
required_tools:
- build_creative
diff --git a/static/compliance/source/specialisms/creative-transformers/index.yaml b/static/compliance/source/specialisms/creative-transformers/index.yaml
index ea2570842f6..130451b40a3 100644
--- a/static/compliance/source/specialisms/creative-transformers/index.yaml
+++ b/static/compliance/source/specialisms/creative-transformers/index.yaml
@@ -4,6 +4,9 @@ title: "Account-scoped creative transformer agent"
protocol: creative
category: creative_transformers
summary: "Agent that exposes account-scoped transformers (voices, models, render configs) via list_transformers, then builds and refines creatives by transformer_id + typed config — with variant fan-out and strict config validation."
+requires:
+ - controller
+
required_tools:
- list_transformers
- build_creative
diff --git a/static/compliance/source/specialisms/governance-delivery-monitor/index.yaml b/static/compliance/source/specialisms/governance-delivery-monitor/index.yaml
index 05120d5aa75..b38d49d0882 100644
--- a/static/compliance/source/specialisms/governance-delivery-monitor/index.yaml
+++ b/static/compliance/source/specialisms/governance-delivery-monitor/index.yaml
@@ -5,6 +5,9 @@ protocol: governance
category: governance_delivery_monitor
summary: "Governance agent monitors delivery, detects budget drift past thresholds, and triggers re-evaluation."
track: campaign_governance
+requires:
+ - controller
+
required_tools:
- check_governance
diff --git a/static/compliance/source/specialisms/governance-spend-authority/denied.yaml b/static/compliance/source/specialisms/governance-spend-authority/denied.yaml
index 258db4aacc9..c1de30a7704 100644
--- a/static/compliance/source/specialisms/governance-spend-authority/denied.yaml
+++ b/static/compliance/source/specialisms/governance-spend-authority/denied.yaml
@@ -4,6 +4,9 @@ title: "Campaign governance — denied"
category: governance_spend_authority
summary: "Governance agent denies a media buy that exceeds the agent's spending authority. No human escalation — the buy is blocked."
track: campaign_governance
+requires:
+ - controller
+
required_tools:
- sync_plans
- check_governance
diff --git a/static/compliance/source/specialisms/governance-spend-authority/index.yaml b/static/compliance/source/specialisms/governance-spend-authority/index.yaml
index 1ab4138e5e9..d835f6b0d78 100644
--- a/static/compliance/source/specialisms/governance-spend-authority/index.yaml
+++ b/static/compliance/source/specialisms/governance-spend-authority/index.yaml
@@ -5,6 +5,9 @@ protocol: governance
category: governance_spend_authority
summary: "Governance agent approves a media buy with conditions. Buyer re-checks after meeting the conditions."
track: campaign_governance
+requires:
+ - controller
+
required_tools:
- sync_plans
- check_governance
diff --git a/static/compliance/source/specialisms/property-lists/index.yaml b/static/compliance/source/specialisms/property-lists/index.yaml
index 409b4c0d4bc..259007ec2eb 100644
--- a/static/compliance/source/specialisms/property-lists/index.yaml
+++ b/static/compliance/source/specialisms/property-lists/index.yaml
@@ -5,6 +5,9 @@ protocol: governance
category: property_lists
summary: "Curated property lists for inventory grouping, targeting governance, and delivery compliance — create, query, update, delete, and validate."
track: governance
+requires:
+ - controller
+
required_tools:
- create_property_list
diff --git a/static/compliance/source/specialisms/sales-broadcast-tv/index.yaml b/static/compliance/source/specialisms/sales-broadcast-tv/index.yaml
index a3f923fd38d..4a152818567 100644
--- a/static/compliance/source/specialisms/sales-broadcast-tv/index.yaml
+++ b/static/compliance/source/specialisms/sales-broadcast-tv/index.yaml
@@ -5,6 +5,9 @@ protocol: media-buy
category: sales_broadcast_tv
summary: "Seller agent for broadcast linear TV inventory — primetime and fringe spots with measurement windows, agency estimate numbers, Ad-ID-based creative sync, and delayed delivery reporting."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
diff --git a/static/compliance/source/specialisms/sales-dooh/index.yaml b/static/compliance/source/specialisms/sales-dooh/index.yaml
index 0f2e40b29c9..8c44afd35a3 100644
--- a/static/compliance/source/specialisms/sales-dooh/index.yaml
+++ b/static/compliance/source/specialisms/sales-dooh/index.yaml
@@ -5,6 +5,9 @@ protocol: media-buy
category: sales_dooh
summary: "DOOH seller for non-guaranteed venue and screen inventory with canonical screen formats and substantive play reporting."
track: media_buy
+requires:
+ - controller
+
required_tools:
- sync_creatives
- list_products
diff --git a/static/compliance/source/specialisms/sales-guaranteed/index.yaml b/static/compliance/source/specialisms/sales-guaranteed/index.yaml
index cd23db05251..d937d1c1682 100644
--- a/static/compliance/source/specialisms/sales-guaranteed/index.yaml
+++ b/static/compliance/source/specialisms/sales-guaranteed/index.yaml
@@ -5,6 +5,9 @@ protocol: media-buy
category: sales_guaranteed
summary: "Seller agent that requires human-in-the-loop IO signing before guaranteed media buys go live."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
@@ -62,7 +65,7 @@ narrative: |
during the runner's timeout window.
If the production sandbox does not expose the controller, the forced approval
- phases report a missing_test_controller coverage gap. Their skipped assertions
+ phases report a controller coverage gap (requirement_unmet naming controller, or missing_test_controller for an ungated step). Their skipped assertions
do not prove the guaranteed approval lifecycle for a Verified (Sandbox) run.
Proposal-driven workflows are part of guaranteed selling: most guaranteed deals start with
diff --git a/static/compliance/source/specialisms/sales-non-guaranteed/index.yaml b/static/compliance/source/specialisms/sales-non-guaranteed/index.yaml
index 5c6a8b1cd1b..93ef734aae9 100644
--- a/static/compliance/source/specialisms/sales-non-guaranteed/index.yaml
+++ b/static/compliance/source/specialisms/sales-non-guaranteed/index.yaml
@@ -5,6 +5,9 @@ protocol: media-buy
category: sales_non_guaranteed
summary: "Seller agent for auction-based, non-guaranteed buying where the buyer sets bid prices and budgets."
track: media_buy
+requires:
+ - controller
+
required_tools:
- get_products
- create_media_buy
@@ -369,8 +372,9 @@ phases:
The buyer creates a media buy with bid prices per package. Since this is
non-guaranteed, no IO is required and no human approval is needed. The response
completes synchronously, without an IO or human-approval task. Because this
- baseline does not attach creatives, the resulting buy waits in pending_creatives
- until the separate creative lifecycle supplies them.
+ baseline does not attach creatives, a seller with a creative library reports
+ pending_creatives until valid assets are assigned. A seller without a creative
+ library may activate the buy immediately and report active.
steps:
- id: create_media_buy
@@ -391,7 +395,8 @@ phases:
expected: |
Return the media buy synchronously:
- media_buy_id: your platform's identifier
- - media_buy_status: pending_creatives until valid assets are assigned
+ - media_buy_status: pending_creatives when waiting for library creatives, or active
+ when the seller does not require creative assignment
- confirmed_at: timestamp
- packages: confirmed line items with bid prices acknowledged
- valid_actions: include the actions available in the current lifecycle state
@@ -446,8 +451,8 @@ phases:
description: "Seller assigns package_id — must be echoed in update_media_buy"
- check: field_value
path: "media_buy_status"
- value: "pending_creatives"
- description: "A synchronously accepted buy without assigned assets waits for creatives"
+ allowed_values: ["pending_creatives", "active"]
+ description: "An accepted buy waits for library creatives or is already active"
# Anti-façade: a real non-guaranteed buy creates line items / orders /
# campaigns in the seller's adserver or DSP. An adapter returning a
# shape-valid response with a fabricated media_buy_id but no upstream
@@ -461,9 +466,10 @@ phases:
- id: monitor_pacing
title: "Inspect readiness and pacing"
narrative: |
- The buyer reads the accepted non-guaranteed buy. Before creatives are assigned,
- the seller reports pending_creatives and no auction delivery; once the separate
- creative lifecycle activates it, the same read surface carries pacing data.
+ The buyer reads the accepted non-guaranteed buy. A seller waiting for library
+ creatives reports pending_creatives and no auction delivery. A seller without
+ a creative library may already report active with pacing data; the separate
+ creative lifecycle also uses this read surface after activation.
steps:
- id: get_media_buys_pacing
@@ -480,7 +486,8 @@ phases:
expected: |
Return the media buy with lifecycle and pacing data:
- media_buy_id: matches the buy created earlier
- - status: pending_creatives before assets are assigned
+ - status: pending_creatives while waiting for library creatives, or active
+ when creative assignment is not required
- packages: line items with current delivery and pacing fields
- valid_actions: actions valid for the reported lifecycle state
@@ -504,8 +511,8 @@ phases:
description: "Media buy has a status"
- check: field_value
path: "media_buys[0].status"
- value: "pending_creatives"
- description: "The unassigned buy remains pending creatives"
+ allowed_values: ["pending_creatives", "active"]
+ description: "The accepted buy is waiting for library creatives or already active"
- check: field_present
path: "context"
@@ -518,7 +525,8 @@ phases:
title: "Adjust bids and budget"
narrative: |
The buyer can adjust bids or budgets before activation or in-flight. Here it
- raises each bid and reallocates package budgets while the buy awaits creatives.
+ raises each bid and reallocates package budgets while the buy awaits library
+ creatives or is already active on a seller that does not require assignment.
steps:
- id: update_media_buy
@@ -537,7 +545,7 @@ phases:
Apply the updates and return the modified media buy state:
- media_buy_id: matches the existing buy
- affected_packages: full post-update package objects reflecting new bids and budgets
- - media_buy_status: pending_creatives if lifecycle state is emitted
+ - media_buy_status: retain pending_creatives or active if lifecycle state is emitted
- Changes are retained for subsequent auction participation
sample_request:
diff --git a/static/compliance/source/specialisms/signal-marketplace/index.yaml b/static/compliance/source/specialisms/signal-marketplace/index.yaml
index f1ae9779839..34f2e0ab154 100644
--- a/static/compliance/source/specialisms/signal-marketplace/index.yaml
+++ b/static/compliance/source/specialisms/signal-marketplace/index.yaml
@@ -5,6 +5,9 @@ protocol: signals
category: signal_marketplace
summary: "Signal agent that resells third-party data provider signals with verifiable provider-published provenance."
track: signals
+requires:
+ - controller
+
required_tools:
- get_signals
- activate_signal
diff --git a/static/compliance/source/specialisms/signal-owned/index.yaml b/static/compliance/source/specialisms/signal-owned/index.yaml
index dea32519258..6f025c892cc 100644
--- a/static/compliance/source/specialisms/signal-owned/index.yaml
+++ b/static/compliance/source/specialisms/signal-owned/index.yaml
@@ -5,6 +5,9 @@ protocol: signals
category: signal_owned
summary: "Signal agent serving first-party or proprietary audience data for discovery without external catalog verification."
track: signals
+requires:
+ - controller
+
required_tools:
- get_signals
diff --git a/static/compliance/source/test-vectors/request-signing/README.md b/static/compliance/source/test-vectors/request-signing/README.md
index b604695e032..8b134dec287 100644
--- a/static/compliance/source/test-vectors/request-signing/README.md
+++ b/static/compliance/source/test-vectors/request-signing/README.md
@@ -45,12 +45,15 @@ test-vectors/request-signing/
│ ├── 023-multi-valued-content-digest.json → request_signature_header_malformed (step 1; RFC 9530 dict duplicate algorithm)
│ ├── 024-unquoted-string-param.json → request_signature_header_malformed (step 1; RFC 8941 §3.3 string values must be quoted)
│ ├── 025-jwk-alg-crv-mismatch.json → request_signature_key_purpose_invalid (step 8; alg=EdDSA with crv=P-256 is impossible per RFC 8037)
-│ ├── 026-non-ascii-host.json → request_signature_header_malformed (step 1; raw IDN U-label on wire; MUST be A-label)
+│ ├── 026-non-ascii-host.json → request_target_uri_malformed (step 10; raw IDN U-label on wire; MUST be A-label; real signature over the A-label base)
│ ├── 027-webhook-registration-authentication-unsigned.json → request_signature_required (webhook-reg with push_notification_config.authentication over bearer on a seller supporting signing; operation NOT in required_for)
-│ └── 028-unsigned-protocol-method-required.json → request_signature_required (unsigned `tasks/cancel` JSON-RPC POST; method is in `protocol_methods_required_for`)
+│ ├── 028-unsigned-protocol-method-required.json → request_signature_required (unsigned `tasks/cancel` JSON-RPC POST; method is in `protocol_methods_required_for`)
+│ ├── 029-duplicate-signature-label.json → request_signature_header_malformed (step 1; RFC 9421 §4.2 / RFC 8941 §3.2 duplicate key on the `Signature` header)
+│ ├── 030-content-digest-key-case.json → request_signature_header_malformed (step 1; RFC 8941 §3.1.2 keys are lowercase only — `SHA-256` is not a synonym of `sha-256`)
+│ └── 031-malformed-host-authority.json → request_target_uri_malformed (step 10; unbracketed IPv6 literal in the `Host` header, URL clean, real signature)
├── a2a/ A2A operation-resolution vectors (adcp#7820, 33 vectors): `required_for` over A2A; see "A2A operation-resolution vectors" below
├── profile-3.2/ 3.2 vectors: RFC 8941 Base64 sf-binary, content-digest covered, covers_content_digest 'required'
-│ ├── positive/ counterparts keep the root vector's number and slug; gaps = not mirrored
+│ ├── positive/ counterparts keep the root vector's number and slug; the absence of `positive/001-basic-post` and `positive/002-post-with-content-digest` is by design (both map to `001-post-with-content-digest`)
│ │ ├── 001-post-with-content-digest.json RFC 8941 Base64 + required body binding (3.2 counterpart of root 001 and 002)
│ │ ├── 003-es256-post.json ES256
│ │ ├── 004-multiple-signature-labels.json verifier processes sig1 only
@@ -61,9 +64,13 @@ test-vectors/request-signing/
│ │ ├── 009-percent-encoded-unreserved-decoded.json
│ │ ├── 010-percent-encoded-slash-preserved.json
│ │ ├── 011-ipv6-authority.json
-│ │ └── 012-ipv6-authority-default-port-stripped.json
+│ │ ├── 012-ipv6-authority-default-port-stripped.json
+│ │ ├── 013-two-signature-labels-distinct.json guard for negative/029
+│ │ ├── 014-content-digest-two-algorithms.json guard for negative/030
+│ │ └── 015-bracketed-ipv6-host-with-port.json guard for negative/031
│ └── negative/
│ ├── 001-base64url-sf-binary.json → request_signature_header_malformed (3.2-only; legacy alphabet)
+│ ├── 001-no-signature-header.json → request_signature_required (pre-check; unsigned, Content-Digest sent)
│ ├── 002-multiple-trailing-dots.json → request_target_uri_malformed (3.2-only; empty DNS label)
│ ├── 002-wrong-tag.json → request_signature_tag_invalid (step 3)
│ ├── 003-expired-signature.json → request_signature_window_invalid (step 5)
@@ -74,14 +81,26 @@ test-vectors/request-signing/
│ ├── 008-unknown-keyid.json → request_signature_key_unknown (step 7)
│ ├── 009-key-ops-missing-verify.json → request_signature_key_purpose_invalid (step 8)
│ ├── 010-content-digest-mismatch.json → request_signature_digest_mismatch (step 11)
+│ ├── 011-malformed-header.json → request_signature_header_malformed (step 1; unparseable Signature-Input, placeholder Signature)
│ ├── 012-missing-expires-param.json → request_signature_params_incomplete (step 2)
│ ├── 013-expires-le-created.json → request_signature_window_invalid (step 5)
│ ├── 014-missing-nonce-param.json → request_signature_params_incomplete (step 2)
│ ├── 015-signature-invalid.json → request_signature_invalid (step 10)
│ ├── 016-replayed-nonce.json → request_signature_replayed (step 12; requires test_harness_state preload)
│ ├── 017-key-revoked.json → request_signature_key_revoked (step 9; requires test_harness_state preload)
+│ ├── 019-signature-without-signature-input.json → request_signature_header_malformed (pre-check; real Signature, Signature-Input stripped, operation outside required_for)
│ ├── 020-rate-abuse.json → request_signature_rate_abuse (step 9a; requires test_harness_state preload)
-│ └── 025-jwk-alg-crv-mismatch.json → request_signature_key_purpose_invalid (step 8; jwks_override)
+│ ├── 021-duplicate-signature-input-label.json → request_signature_header_malformed (step 1; real Signature)
+│ ├── 022-multi-valued-content-type.json → request_signature_header_malformed (step 1; real Signature)
+│ ├── 023-multi-valued-content-digest.json → request_signature_header_malformed (step 1; real Signature)
+│ ├── 024-unquoted-string-param.json → request_signature_header_malformed (step 1; real Signature)
+│ ├── 025-jwk-alg-crv-mismatch.json → request_signature_key_purpose_invalid (step 8; jwks_override)
+│ ├── 026-non-ascii-host.json → request_target_uri_malformed (step 10; raw U-label on the wire, real Signature over the A-label base)
+│ ├── 027-webhook-registration-authentication-unsigned.json → request_signature_required (pre-check; unsigned)
+│ ├── 028-unsigned-protocol-method-required.json → request_signature_required (pre-check; unsigned)
+│ ├── 029-duplicate-signature-label.json → request_signature_header_malformed (step 1; real Signature repeated under `sig1`)
+│ ├── 030-content-digest-key-case.json → request_signature_header_malformed (step 1; `SHA-256` and `sha-256`, real Signature)
+│ └── 031-malformed-host-authority.json → request_target_uri_malformed (step 10; unbracketed IPv6 `Host`, URL clean, real Signature)
└── positive/ vectors that MUST verify successfully
├── 001-basic-post.json Ed25519, no content-digest
├── 002-post-with-content-digest.json Ed25519, content-digest covered
@@ -94,7 +113,10 @@ test-vectors/request-signing/
├── 009-percent-encoded-unreserved-decoded.json Path has %7E/%2D/%5F/%2E; canonical decodes unreserved per RFC 3986 §6.2.2.2
├── 010-percent-encoded-slash-preserved.json Path has %2F (reserved); stays percent-encoded, not treated as segment separator
├── 011-ipv6-authority.json IPv6 literal host; brackets preserved in @target-uri and @authority
- └── 012-ipv6-authority-default-port-stripped.json IPv6 literal with :443; port stripped, brackets preserved
+ ├── 012-ipv6-authority-default-port-stripped.json IPv6 literal with :443; port stripped, brackets preserved
+ ├── 013-two-signature-labels-distinct.json sig1 and sig2 on both Signature-Input and Signature; guard for negative/029
+ ├── 014-content-digest-two-algorithms.json Content-Digest with sha-256 and sha-512, both correct; guard for negative/030
+ └── 015-bracketed-ipv6-host-with-port.json Host: [2001:db8::1]:8443 matches the URL authority; guard for negative/031
```
## Canonicalization vectors (`canonicalization.json`)
@@ -244,18 +266,22 @@ The shipped signatures were generated from those base strings using the correspo
## Profile 3.2 vectors
-A 3.2 signing peer MUST advertise `covers_content_digest: "required"`, and every accepted signature on a body-bearing request covers `content-digest`. Most root vectors sign without `content-digest`, so a `required` verifier cannot grade them. `profile-3.2/` restores that coverage: each root positive vector and each root negative for checklist steps 2–12 has a 3.2 counterpart **with the same number and slug** (for example, `profile-3.2/negative/003-expired-signature.json` is the 3.2 version of `negative/003-expired-signature.json`). Root vectors that are not mirrored leave gaps in the numbering. Root `positive/001` (basic POST) and `positive/002` (POST with content-digest) are the same request in 3.2, so both map to `profile-3.2/positive/001-post-with-content-digest.json`. `profile-3.2/negative/001` and `002-multiple-trailing-dots` are 3.2-only wire-format vectors that predate this scheme; `002-multiple-trailing-dots` shares its number with the `002-wrong-tag` counterpart, and file names stay unique.
+A 3.2 signing peer MUST advertise `covers_content_digest: "required"`, and every accepted signature on a body-bearing request covers `content-digest`. Most root vectors sign without `content-digest`, so a `required` verifier cannot grade them. `profile-3.2/` restores that coverage: each root positive vector and each root negative has a 3.2 counterpart **with the same number and slug** (for example, `profile-3.2/negative/003-expired-signature.json` is the 3.2 version of `negative/003-expired-signature.json`), except the vectors for postures 3.2 forbids. Root vectors that are not mirrored leave gaps in the numbering. Root `positive/001` (basic POST) and `positive/002` (POST with content-digest) are the same request in 3.2, so both map to `profile-3.2/positive/001-post-with-content-digest.json`. `profile-3.2/negative/001` and `002-multiple-trailing-dots` are 3.2-only wire-format vectors that predate this scheme; `002-multiple-trailing-dots` shares its number with the `002-wrong-tag` counterpart, and file names stay unique.
Each counterpart keeps its original's request shape but:
-- covers `content-digest` (except `profile-3.2/negative/007-missing-content-digest`, whose whole point is that it is missing; it still sends a correct `Content-Digest` header, so verifiers must check the covered-components list rather than header presence);
+- covers `content-digest` wherever a parseable `Signature-Input` exists. The exceptions are `profile-3.2/negative/007-missing-content-digest`, whose whole point is that it is missing (it still sends a correct `Content-Digest` header, so verifiers must check the covered-components list rather than header presence), and `011`, whose `Signature-Input` is unparseable;
- encodes `Signature` and `Content-Digest` as RFC 8941 `sf-binary` (standard Base64, padded);
- advertises `covers_content_digest: "required"`;
- re-keys the body's `idempotency_key`, so the counterpart is a distinct request.
As in the root corpus, pre-crypto negatives (steps 2–9a) carry a 64-zero-byte placeholder `Signature`. That makes them step-ordering canaries: a verifier that verifies the signature before the targeted check returns `request_signature_invalid`. The post-crypto negatives (`profile-3.2/negative/010` and `016`) carry real signatures, so only the targeted check fails.
-Root negatives without a 3.2 counterpart: the unsigned pre-check vectors (`001`, `027`, `028`); the step-1 parse vectors (`011`, `019`, `021`–`024`, `026`), which reject before covered components are considered; and `018`, because `forbidden` is a legacy-only posture a 3.2 verifier cannot advertise.
+The step-0 and step-1 vectors are mirrored with `content-digest` covered, so that the step-0/1 fault is the vector's only fault. Without that, a `required` verifier would also find a step-6 fault (a body-bound signature that does not cover `content-digest`) in `021`, `022`, `024`, `026`, `029` and `031`, and the vector would grade the verifier's evaluation order rather than the step-1 rule. The unsigned vectors (`001`, `027`, `028`) stay unsigned and carry only a correct `Content-Digest`. Where the fault does not depend on the signature bytes (`021`–`024`, `026`, `029`–`031`), the `Signature` is real rather than a placeholder, so a signature the verifier can validate is not a second fault; `021`, `023`, `029` and `030` repeat the same member or value so that keeping either one finds no second fault. `029` and `030` carry real signatures where the root vectors use placeholders, and the root's false-positive guards `positive/013`–`015` are mirrored as well. `031` is a real signature over the base for the clean URL authority, so the malformed `Host` header is the only fault; its `Host` header is carried over unchanged. `019` is a real signature whose `Signature-Input` was stripped, on an operation outside `required_for` so that only the header-pair rule applies; `026` signs the base for the A-label form of the host, so only the raw U-label on the wire is wrong. `011` keeps the placeholder because its `Signature-Input` is unparseable and no signature base exists.
+
+The pre-crypto negatives for steps 2–9a keep their placeholder `Signature`, which predates the single-fault rule below. Whether the step order those canaries grade is normative is the open question in adcp#7577, so they are not rewritten here.
+
+The only root negative without a 3.2 counterpart is one for a posture 3.2 forbids: `018`, because `forbidden` is a legacy-only posture a 3.2 verifier cannot advertise.
## Running vectors against an implementation
@@ -274,12 +300,12 @@ A reference harness is in progress at https://github.com/adcontextprotocol/adcp-
Run vectors in this order when validating a new implementation — it isolates failure categories so a bug surfaces cleanly instead of as a pile of unrelated red tests. The numbers below refer to the root 3.1 corpus; a 3.2 verifier applies the same order to the `profile-3.2/` counterparts (see the mapping in [File layout](#file-layout)):
-1. **Positive vectors first** (`positive/001`, `/002`, `/003`). These exercise the happy path. If `001` fails, your signer or verifier's canonicalization, key loading, or crypto is wrong — fix before touching anything else. The `expected_signature_base` field in each positive vector lets you diff YOUR canonical base against the spec's, independent of whether your crypto works.
-2. **Parse-level negatives next** (`001`, `002`, `011`, `012`, `014`, `019`). These fail at the pre-check or early checklist steps without invoking crypto. Passing these means your header parsing and presence checks are correct.
+1. **Positive vectors first** (`positive/001`, `/002`, `/003`, then the false-positive guards `positive/013`, `/014`, `/015` before the negatives they pair with: `negative/029`, `/030`, `/031`). These exercise the happy path. If `001` fails, your signer or verifier's canonicalization, key loading, or crypto is wrong — fix before touching anything else. The `expected_signature_base` field in each positive vector lets you diff YOUR canonical base against the spec's, independent of whether your crypto works.
+2. **Parse-level negatives next** (`001`, `002`, `011`, `012`, `014`, `019`, `021`, `023`, `029`, `030`). These fail at the pre-check or early checklist steps without invoking crypto. Passing these means your header parsing and presence checks are correct.
3. **Semantic negatives** (`003`, `004`, `005`, `006`, `007`, `013`, `018`). These exercise specific rules (window, alg allowlist, covered components, content-digest policy) without requiring valid signatures.
4. **Key-path negatives** (`008`, `009`). JWKS resolution + `adcp_use` enforcement.
5. **Stateful pre-crypto negatives** (`017`, `020`). These require preloaded harness state and reject before crypto verify — `017` on revocation (step 9), `020` on the per-keyid cap (step 9a). The committed `Signature` on these vectors is a placeholder and is NOT expected to verify cryptographically; the rejection MUST land on the pre-crypto cheap check.
-6. **Crypto / stateful-post negatives last** (`015`, `010`, `016`). These require the verifier to have run most of the checklist before reaching the failure point. `015` specifically catches canonicalization bugs where your implementation computes a different signature base than the spec — if you pass `positive/001` but fail `015`, your canonicalization is still off somewhere and `015` is picking it up.
+6. **Crypto / stateful-post negatives last** (`015`, `010`, `016`, `031`). These require the verifier to have run most of the checklist before reaching the failure point. `031` is a real-signature negative: the signature verifies over the URL authority, so only a verifier that also judges the `Host` header rejects it with `request_target_uri_malformed`. `015` specifically catches canonicalization bugs where your implementation computes a different signature base than the spec — if you pass `positive/001` but fail `015`, your canonicalization is still off somewhere and `015` is picking it up.
## Adding vectors
@@ -290,3 +316,4 @@ Every new vector MUST:
3. Use only keypairs from `keys.json`, OR supply a documented `jwks_override` explaining why a non-canonical key shape is required.
4. Include `expected_signature_base` for positive vectors and for step-10 `request_signature_invalid` catchers.
5. Include `test_harness_state` for any vector that requires preloaded verifier state.
+6. Carry exactly one fault (adcp#7577). A request MUST NOT contain a second fault that a verifier could detect through a different evaluation order, because multi-fault vectors implicitly grade verifier step ordering. Build the request so that every other check passes: cover `content-digest`, send a correct `Content-Digest`, and sign the base the verifier would otherwise verify. Keep a placeholder `Signature` only where no signature base can exist.
diff --git a/static/compliance/source/test-vectors/request-signing/canonicalization.json b/static/compliance/source/test-vectors/request-signing/canonicalization.json
index a18f82f87cf..f41a4994fdd 100644
--- a/static/compliance/source/test-vectors/request-signing/canonicalization.json
+++ b/static/compliance/source/test-vectors/request-signing/canonicalization.json
@@ -165,6 +165,38 @@
"expected_target_uri": "https://seller.example.com/?x=1",
"expected_authority": "seller.example.com"
},
+ {
+ "name": "empty-path-no-query-becomes-slash",
+ "rule": "step 5: empty path with authority → / (no query present)",
+ "input_url": "https://seller.example.com",
+ "expected_target_uri": "https://seller.example.com/",
+ "expected_authority": "seller.example.com",
+ "$comment": "Step 5's condition is the path and the authority; the query is not part of it. The queried spelling above is step 5's illustrative example, not its trigger, and an implementation that reads it as the trigger passes that case while leaving this one unslashed. Keep both."
+ },
+ {
+ "name": "empty-path-no-query-non-default-port-becomes-slash",
+ "rule": "step 5: empty path with authority → / (port preserved from step 4)",
+ "input_url": "https://seller.example.com:8443",
+ "expected_target_uri": "https://seller.example.com:8443/",
+ "expected_authority": "seller.example.com:8443",
+ "$comment": "The slash lands after the port, not between host and port. A fix applied to the host rather than the path emits seller.example.com/:8443."
+ },
+ {
+ "name": "empty-path-no-query-ipv6-becomes-slash",
+ "rule": "step 5: empty path with authority → / (IPv6 literal)",
+ "input_url": "https://[2001:db8::1]",
+ "expected_target_uri": "https://[2001:db8::1]/",
+ "expected_authority": "[2001:db8::1]",
+ "$comment": "Brackets are preserved per step 2 and the slash goes outside them."
+ },
+ {
+ "name": "empty-path-empty-query-becomes-slash",
+ "rule": "steps 5 + 7: empty path → /, and the trailing ? is still preserved",
+ "input_url": "https://seller.example.com?",
+ "expected_target_uri": "https://seller.example.com/?",
+ "expected_authority": "seller.example.com",
+ "$comment": "The two rules compose rather than compete. This is also where a query-gated reading of step 5 fails on its own terms: the raw URL does carry a ?, but the parsed query is the empty string, so a condition written against the query reads false and emits a path-less https://seller.example.com? -- a form no RFC 3986 normalizer produces."
+ },
{
"name": "percent-encoded-hex-uppercased",
"rule": "step 6: uppercase %xx hex digits",
diff --git a/static/compliance/source/test-vectors/request-signing/negative/026-non-ascii-host.json b/static/compliance/source/test-vectors/request-signing/negative/026-non-ascii-host.json
index 601808ad0cd..2321c58eb0f 100644
--- a/static/compliance/source/test-vectors/request-signing/negative/026-non-ascii-host.json
+++ b/static/compliance/source/test-vectors/request-signing/negative/026-non-ascii-host.json
@@ -1,6 +1,6 @@
{
"name": "URL authority contains raw IDN U-label (non-ASCII bytes in host)",
- "spec_reference": "#adcp-rfc-9421-profile (@target-uri canonicalization: hosts MUST be ASCII A-labels; RFC 5891 §4.4)",
+ "spec_reference": "#adcp-rfc-9421-profile (@target-uri canonicalization: hosts MUST be ASCII A-labels; RFC 5891 §4.4); security.mdx error table: raw non-ASCII host → request_target_uri_malformed",
"signing_profile_version": "3.1",
"reference_now": 1776520800,
"request": {
@@ -9,7 +9,7 @@
"headers": {
"Content-Type": "application/json",
"Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
- "Signature": "sig1=:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:"
+ "Signature": "sig1=:fYwfZG_HXkIxr0bNLUGRpwl0gSO3-birWx-20-GY9868cMWxtU_gSKOSFWzI6T9q_CII_UQOA0ogwyV3gyp_CA:"
},
"body": "{\"idempotency_key\":\"vector-negative-026-non-ascii-host\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
},
@@ -25,8 +25,9 @@
],
"expected_outcome": {
"success": false,
- "error_code": "request_signature_header_malformed",
- "failed_step": 1
+ "error_code": "request_target_uri_malformed",
+ "failed_step": 10
},
- "$comment": "Host label 'bücher' is a Unicode U-label; the AdCP @target-uri algorithm requires A-label (Punycode, 'xn--bcher-kva') form. Accepting a raw U-label on the wire risks a canonicalization-differential: UTS-46 Nontransitional processing produces one A-label, naive lowercase + Punycode produces another (see canonicalization.json case 'idn-mixed-case-to-punycode'), and non-ASCII-aware libraries may round-trip the bytes unchanged. Verifier MUST reject at parse rather than guess. Companion canonicalization.json cases 'idn-to-punycode' and 'idn-mixed-case-to-punycode' exercise the SIGNER side (expect A-label output from U-label input after explicit UTS-46 processing); this vector exercises the VERIFIER side (reject U-label bytes received on the wire inside a signed request)."
+ "$comment": "Host label 'bücher' is a Unicode U-label; the AdCP @target-uri algorithm requires A-label (Punycode, 'xn--bcher-kva') form. Accepting a raw U-label on the wire risks a canonicalization-differential: UTS-46 Nontransitional processing produces one A-label, naive lowercase + Punycode produces another (see canonicalization.json case 'idn-mixed-case-to-punycode'), and non-ASCII-aware libraries may round-trip the bytes unchanged. Verifier MUST reject rather than guess, with request_target_uri_malformed (the security.mdx error table lists 'raw non-ASCII host' under that code; the 3.1 corpus originally graded this as request_signature_header_malformed, corrected in the 3.2.4 maintenance corpus). The Signature is a real Ed25519 signature by test-ed25519-2026 over expected_signature_base, which uses the A-label form 'xn--bcher-kva.example.com': a verifier that silently applies ToASCII to the raw U-label verifies successfully and wrongly accepts, so the host is the only fault. Companion canonicalization.json cases 'idn-to-punycode' and 'idn-mixed-case-to-punycode' exercise the SIGNER side (expect A-label output from U-label input after explicit UTS-46 processing); this vector exercises the VERIFIER side (reject U-label bytes received on the wire inside a signed request).",
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://xn--bcher-kva.example.com/adcp/create_media_buy\n\"@authority\": xn--bcher-kva.example.com\n\"content-type\": application/json\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\""
}
diff --git a/static/compliance/source/test-vectors/request-signing/negative/029-duplicate-signature-label.json b/static/compliance/source/test-vectors/request-signing/negative/029-duplicate-signature-label.json
new file mode 100644
index 00000000000..38704adf236
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/negative/029-duplicate-signature-label.json
@@ -0,0 +1,32 @@
+{
+ "name": "Signature header declares label 'sig1' twice (malformed structured dictionary)",
+ "spec_reference": "#verifier-checklist-requests step 1 (RFC 9421 §4.2 Signature is a Dictionary; RFC 8941 §3.2 keys are unique; AdCP rejects duplicate labels rather than retaining the last)",
+ "signing_profile_version": "3.1",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:, sig1=:BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:"
+ },
+ "body": "{\"idempotency_key\":\"vector-negative-029-duplicate-signature-label\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "either",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "RFC 9421 §4.2 defines the Signature field as a Dictionary, and RFC 8941 §3.2 makes dictionary keys unique, and a standard parser (RFC 8941 §4.2.2) resolves a duplicate by silently overwriting with the last value. That overwrite is the ambiguity: AdCP step 1 therefore treats a repeated label as malformed, the same downgrade-protection posture as 021, and verifiers MUST reject rather than retain the last value. Signature-Input carries sig1 exactly once and is well formed; only the Signature header repeats the label. Accepting it lets two parties disagree on which signature bytes belong to sig1 — one verifies the first, another reads the last — over a Signature-Input both agree on. Same rule as 021-duplicate-signature-input-label, applied to the other signature header. Both values are well-formed 64-byte sf-binary placeholders, so a verifier that rejects only on an unparseable signature will not reject here."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/negative/030-content-digest-key-case.json b/static/compliance/source/test-vectors/request-signing/negative/030-content-digest-key-case.json
new file mode 100644
index 00000000000..9d2839f5c47
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/negative/030-content-digest-key-case.json
@@ -0,0 +1,33 @@
+{
+ "name": "Content-Digest carries SHA-256 and sha-256 (uppercase dictionary key is not a case-insensitive synonym)",
+ "spec_reference": "#verifier-checklist-requests step 1 (RFC 9530 §2 Content-Digest is an RFC 8941 Dictionary; RFC 8941 §3.1.2 keys are lowercase only)",
+ "signing_profile_version": "3.1",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "SHA-256=:qgPvy3VlFK_BtENbAvUhJn_MsgGdHhxlZHKt2itYaxc:, sha-256=:qgPvy3VlFK_BtENbAvUhJn_MsgGdHhxlZHKt2itYaxc:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:"
+ },
+ "body": "{\"idempotency_key\":\"vector-negative-030-content-digest-key-case\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "RFC 9530 §2 Content-Digest is an RFC 8941 Dictionary, and the RFC 8941 §3.1.2 key production admits lowercase characters only (a-z, 0-9, '_', '-', '.', '*'; first character a-z or '*'). 'SHA-256' is therefore a parse-invalid key (RFC 8941 §4.2.3.3: parsing fails when the first character is not lcalpha or '*'), not a case-insensitive synonym of 'sha-256' and not a second spelling of the same algorithm. Verifiers MUST NOT fold case to reconcile the two members. Grading is on the error code, so a folding verifier that reports a duplicate algorithm still returns the expected code; this vector catches verifiers that ignore the unknown key or compare keys as written and accept the header, after which a signer and verifier may disagree on which value entered the signature base. Verifier MUST reject at step 1. Both members carry the correct sha-256 of the body so the digest value itself is not the fault; sibling of 023-multi-valued-content-digest (same algorithm twice, same spelling)."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/negative/031-malformed-host-authority.json b/static/compliance/source/test-vectors/request-signing/negative/031-malformed-host-authority.json
new file mode 100644
index 00000000000..7a62d301bd3
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/negative/031-malformed-host-authority.json
@@ -0,0 +1,34 @@
+{
+ "name": "Host header carries an unbracketed IPv6 literal (malformed authority) while the URL is clean",
+ "spec_reference": "#adcp-rfc-9421-profile (@authority derived from the as-received Host header and canonicalized by the URL canonicalization algorithm; malformed authority → request_target_uri_malformed)",
+ "signing_profile_version": "3.1",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://[::1]/adcp/create_media_buy",
+ "headers": {
+ "Host": "::1",
+ "Content-Type": "application/json",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:54AboGWe1BvlA-epah2osf0Zqsvj_9e5SMO-AUxjIHHAmc-gm8qKMKjSPDzw3TJwsHYHgzc5pqJ_4X-xFmydDA:"
+ },
+ "body": "{\"idempotency_key\":\"vector-negative-031-malformed-host-authority\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "either",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://[::1]/adcp/create_media_buy\n\"@authority\": [::1]\n\"content-type\": application/json\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_target_uri_malformed",
+ "failed_step": 10
+ },
+ "$comment": "The URL is the valid bracketed form https://[::1]/..., and the Signature is a real Ed25519 signature by test-ed25519-2026 over the base computed from the URL authority '[::1]', so the Host header is the only fault. The profile derives @authority from the as-received Host header and canonicalizes it by the same algorithm as @target-uri; an IPv6 literal outside brackets ('::1') is ambiguous with a port and is malformed (canonicalization.json case malformed-bare-ipv6), so the verifier MUST reject with request_target_uri_malformed at step 10. A verifier that derives @authority from the URL alone never judges the header, computes the signed base, verifies the signature, and wrongly accepts. failed_step is informational: step 10 is where @authority derivation happens; grading is on the error code."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/positive/013-two-signature-labels-distinct.json b/static/compliance/source/test-vectors/request-signing/positive/013-two-signature-labels-distinct.json
new file mode 100644
index 00000000000..9bf3fcc5752
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/positive/013-two-signature-labels-distinct.json
@@ -0,0 +1,32 @@
+{
+ "name": "Two distinct signature labels on both Signature-Input and Signature — verifier processes sig1 and does not reject the dictionaries",
+ "spec_reference": "#adcp-rfc-9421-profile (One signature per request); #verifier-checklist-requests step 1 (duplicate-key rejection applies to repeated labels, not to distinct ones)",
+ "signing_profile_version": "3.1",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\", sig2=(\"@method\" \"@target-uri\" \"@authority\");created=1776520800;expires=1776521100;nonce=\"m4Fq2xYt9ZbCwLJd7sVn8g\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:U51PJzU9nMJxMAH_u-UDpSecT5SQX1-deSnWE3XpFo-BLT2_2h5FgMltntNCW05chhmFnjZEzkRmaYKeU0UUBw:, sig2=:AwoRGB8mLTQ7QklQV15lbHN6gYiPlp2kq7K5wMfO1dzj6vH4_wYNFBsiKTA3PkVMU1phaG92fYSLkpmgp661vA:"
+ },
+ "body": "{\"idempotency_key\":\"vector-positive-013-two-signature-labels-distinct\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "either",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": true,
+ "verified_label": "sig1"
+ },
+ "$comment": "False-positive guard for negative/029 and 021: Signature-Input and Signature each carry two DISTINCT labels (sig1, sig2), which is legal. sig1 is a real Ed25519 signature over expected_signature_base; sig2 has a different covered-components set, a different nonce, and a well-formed 64-byte value that does not verify. Verifiers MUST process exactly one label (conventionally sig1) and ignore the rest; attempting sig2 and rejecting is non-conformant. Differs from 004-multiple-signature-labels only in sig2's signature bytes: 004 uses a run of 'A' (decodes to a 66-byte zero value, not a 64-byte signature), so a verifier that shape-validates every Signature member could pass 004 by luck; here the extra member is a correctly sized 64-byte signature. Signature generated with the test-ed25519-2026 private key from expected_signature_base."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/positive/014-content-digest-two-algorithms.json b/static/compliance/source/test-vectors/request-signing/positive/014-content-digest-two-algorithms.json
new file mode 100644
index 00000000000..d68fb53b5a7
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/positive/014-content-digest-two-algorithms.json
@@ -0,0 +1,32 @@
+{
+ "name": "Content-Digest carries sha-256 and sha-512, both correct — distinct algorithm keys are legal",
+ "spec_reference": "#verifier-checklist-requests steps 1 and 11 (RFC 9530 §2: Content-Digest is a Dictionary keyed by lowercase algorithm name; RFC 8941 §3.1.2)",
+ "signing_profile_version": "3.1",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:vyR23LVTR1W-_gnNrZDaxId_kmAB7lQ34b1NNNhX9a0:, sha-512=:qORTgRshnU8ahelPs1uOk75o3XC2L6LDEWoAlnFrNXrfjMk0Cil1vkqbjFwE9KHRsTNDyAsPD1_-eW8kBnFQOA:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:ULMYyZqThGeyjciOwuH8Zp8-1MnrMTYQj2vbmN4QjGe9xDRU9gR9UnR_utuy5Ja7YZc3jgDgOYuyCC95mEeZCA:"
+ },
+ "body": "{\"idempotency_key\":\"vector-positive-014-content-digest-two-algorithms\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"content-digest\": sha-256=:vyR23LVTR1W-_gnNrZDaxId_kmAB7lQ34b1NNNhX9a0:, sha-512=:qORTgRshnU8ahelPs1uOk75o3XC2L6LDEWoAlnFrNXrfjMk0Cil1vkqbjFwE9KHRsTNDyAsPD1_-eW8kBnFQOA:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": true
+ },
+ "$comment": "False-positive guard for negative/023 and 030. Content-Digest carries two members with distinct lowercase algorithm keys, sha-256 and sha-512, each the correct digest of the body (unpadded Base64URL, as in the rest of the 3.1 root corpus). A verifier that rejects every multi-member Content-Digest, or every comma in it, fails here; a verifier that checks only one algorithm still passes because both are correct. content-digest is covered and the Signature is a real Ed25519 signature by test-ed25519-2026 over expected_signature_base, which includes the Content-Digest value verbatim."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/positive/015-bracketed-ipv6-host-with-port.json b/static/compliance/source/test-vectors/request-signing/positive/015-bracketed-ipv6-host-with-port.json
new file mode 100644
index 00000000000..71071047518
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/positive/015-bracketed-ipv6-host-with-port.json
@@ -0,0 +1,32 @@
+{
+ "name": "Bracketed IPv6 literal with non-default port in both the URL and the Host header",
+ "spec_reference": "#adcp-rfc-9421-profile (@authority derived from as-received Host; IPv6 brackets preserved, non-default port kept)",
+ "signing_profile_version": "3.1",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://[2001:db8::1]:8443/adcp/create_media_buy",
+ "headers": {
+ "Host": "[2001:db8::1]:8443",
+ "Content-Type": "application/json",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:KFJa1rmiEAYePBhzr1bHsjvkvrD9cs7MXGPiVv6wD9LZINvTTeDR50N3mE5GaCwbcuxaesexETAJeTcj4MPYDg:"
+ },
+ "body": "{\"idempotency_key\":\"vector-positive-015-bracketed-ipv6-host-with-port\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "either",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://[2001:db8::1]:8443/adcp/create_media_buy\n\"@authority\": [2001:db8::1]:8443\n\"content-type\": application/json\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": true
+ },
+ "$comment": "False-positive guard for negative/031. The Host header carries a well-formed bracketed IPv6 authority with a non-default port; it byte-matches the authority of the canonical @target-uri, so @authority is '[2001:db8::1]:8443' and the request verifies. Without this vector a verifier passes 031 by rejecting every Host header that contains ':' or '['. Extends 011-ipv6-authority (no Host header, default port) and 012 (default port stripped) to a non-default port carried on the Host header. Signature generated with the test-ed25519-2026 private key from expected_signature_base."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/001-no-signature-header.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/001-no-signature-header.json
new file mode 100644
index 00000000000..ac942114ed5
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/001-no-signature-header.json
@@ -0,0 +1,31 @@
+{
+ "name": "AdCP 3.2 unsigned request to an operation in required_for (Content-Digest sent, nothing signed)",
+ "spec_reference": "#verifier-checklist-requests pre-check (required_for enforcement); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:nODniPasrOwG+VeIC4UcO5eGL3o1AGoffQ8Ih3JDVx0=:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-001-no-signature-header\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_required",
+ "failed_step": 0
+ },
+ "$comment": "3.2-profile counterpart of negative/001-no-signature-header.json. AdCP 3.2 profile: the verifier advertises covers_content_digest='required' and the request carries a correct Content-Digest, but no usable signature is presented, so the step-0 fault is the only fault. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/011-malformed-header.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/011-malformed-header.json
new file mode 100644
index 00000000000..ea481e13678
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/011-malformed-header.json
@@ -0,0 +1,33 @@
+{
+ "name": "AdCP 3.2 Signature-Input present but syntactically invalid (downgrade protection; Content-Digest sent)",
+ "spec_reference": "#verifier-checklist-requests pre-check (malformed header, no bearer fallback); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/sync_creatives",
+ "headers": {
+ "Content-Type": "application/json",
+ "Signature-Input": "this-is-not-a-valid-rfc-9421-signature-input",
+ "Signature": "sig1=:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==:",
+ "Content-Digest": "sha-256=:iRu+uxya7cmJRTbXUq8l2H8PYiwq7hD6MymHur+cd5w=:"
+ },
+ "body": "{\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"creatives\":[{\"creative_id\":\"c_0001\",\"name\":\"Test Creative\",\"format_id\":{\"agent_url\":\"https://creative.adcontextprotocol.org/\",\"id\":\"display_300x250_image\"},\"assets\":{\"banner\":{\"asset_type\":\"image\",\"url\":\"https://example.com/banner.png\",\"width\":300,\"height\":250}}}],\"idempotency_key\":\"vector-profile-3-2-negative-011-malformed-header\",\"delete_missing\":false,\"dry_run\":false,\"validation_mode\":\"strict\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "3.2-profile counterpart of negative/011-malformed-header.json. AdCP 3.2 profile: the verifier advertises covers_content_digest='required' and the request carries a correct Content-Digest. The Signature-Input value is not parseable, so there is no covered-components list in which content-digest could be covered and no signature base to sign. Signature is the 64-zero-byte placeholder (step-ordering canary): the targeted check runs before cryptographic verification, so a verifier that verifies first returns request_signature_invalid instead of the expected code. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/019-signature-without-signature-input.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/019-signature-without-signature-input.json
new file mode 100644
index 00000000000..fe5bcad5d45
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/019-signature-without-signature-input.json
@@ -0,0 +1,31 @@
+{
+ "name": "AdCP 3.2 Signature header present but Signature-Input header absent (downgrade loophole; content-digest covered in the stripped shape)",
+ "spec_reference": "#verifier-checklist-requests pre-check (header pair enforcement); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:CDVo0AYxcfmqk71EoGxOY8jRDCjJ0VURRSRLJ7stOMs=:",
+ "Signature": "sig1=:D4eGZiMi78duzNDkwDxHACBK9tlbnb3P0uqWBgzaSURvwAv2jwI85rUAeTZEZF/vs9Nm8OyAdqZ62wBT69KkDg==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-019-signature-without-signature-input\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": []
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"content-digest\": sha-256=:CDVo0AYxcfmqk71EoGxOY8jRDCjJ0VURRSRLJ7stOMs=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "3.2-profile counterpart of negative/019-signature-without-signature-input.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. The operation is not in required_for, so the unpaired Signature is the only fault whatever order the pre-check bullets are read in. The request is a correctly signed 3.2 request (content-digest covered) whose Signature-Input a proxy stripped. The Signature is a real Ed25519 signature by test-ed25519-2026 over expected_signature_base, the base the stripped Signature-Input would have described; no other fault is present, so rejecting at step 1 is the only conformant outcome. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/021-duplicate-signature-input-label.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/021-duplicate-signature-input-label.json
new file mode 100644
index 00000000000..e13413c1297
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/021-duplicate-signature-input-label.json
@@ -0,0 +1,34 @@
+{
+ "name": "AdCP 3.2 Signature-Input header declares label 'sig1' twice (malformed structured dictionary, content-digest covered)",
+ "spec_reference": "#verifier-checklist-requests step 1 (RFC 9421 §4.1 Signature-Input is a Dictionary; duplicate keys malformed); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:NNAjLIoYP1NsXiVnKObP56aOW35CIrOFXinWZPEj5Oc=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\", sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:y0pNBJ+oSxrvMdXjzwNfabP4m1pZuyUO4ny3Ti+PFN5P1zUDRS3hIaLJZZVX2ao+KF7G6aUaESx7g70NNUzUAQ==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-021-duplicate-signature-input-label\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"content-digest\": sha-256=:NNAjLIoYP1NsXiVnKObP56aOW35CIrOFXinWZPEj5Oc=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "3.2-profile counterpart of negative/021-duplicate-signature-input-label.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. The Signature-Input header repeats the same sig1 member twice, byte for byte; it covers content-digest and its Signature is a valid Ed25519 signature over expected_signature_base. A verifier that keeps either member therefore verifies the request, so the duplicate label is the only fault. (The root vector's second member is weaker; the 3.2 mirror repeats the first so that no second fault is reachable by keeping the last one.) Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/022-multi-valued-content-type.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/022-multi-valued-content-type.json
new file mode 100644
index 00000000000..ae5fc00005f
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/022-multi-valued-content-type.json
@@ -0,0 +1,34 @@
+{
+ "name": "AdCP 3.2 Content-Type header sent as multiple field values (malformed — covered field must be single-valued, content-digest covered)",
+ "spec_reference": "#verifier-checklist-requests step 1 (covered component fields must be single-valued; RFC 9421 §2.1 derivation rules do not permit concatenation for non-list headers); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json, text/plain",
+ "Content-Digest": "sha-256=:Ef1MgmdCrkSSjOvZz3yx3jRIWt8AalT41OMgMPsPgs0=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:P2P7xqNLLvR7x+Byyepc5ihnIUGps5YY81FHkLj3RdNLs21nvIhSc3KzujOj/T9w3bI934D+E70kqu9Z0VjWAw==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-022-multi-valued-content-type\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json, text/plain\n\"content-digest\": sha-256=:Ef1MgmdCrkSSjOvZz3yx3jRIWt8AalT41OMgMPsPgs0=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "3.2-profile counterpart of negative/022-multi-valued-content-type.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. The Signature is a valid Ed25519 signature over expected_signature_base, which carries the Content-Type value exactly as sent, so the multi-valued field is the only fault. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/023-multi-valued-content-digest.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/023-multi-valued-content-digest.json
new file mode 100644
index 00000000000..4da657db4c1
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/023-multi-valued-content-digest.json
@@ -0,0 +1,34 @@
+{
+ "name": "AdCP 3.2 Content-Digest header sent as multiple field values (malformed, content-digest covered)",
+ "spec_reference": "#verifier-checklist-requests step 1 (Content-Digest covered in signature must be single-valued; RFC 9530); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:NhC0hsbCQ3lWjG8FkOteUEaHCB1/tNMbRvTxDKsMhdU=:, sha-256=:NhC0hsbCQ3lWjG8FkOteUEaHCB1/tNMbRvTxDKsMhdU=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:+chRWRUwyDCbZZwlQXclhQrql5Ycxrd3ENjOxVQz76ZYWUwnuF9XUbf0tXuSqTBaVG6KcgbPlO81WxTBZPuyDQ==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-023-multi-valued-content-digest\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"content-digest\": sha-256=:NhC0hsbCQ3lWjG8FkOteUEaHCB1/tNMbRvTxDKsMhdU=:, sha-256=:NhC0hsbCQ3lWjG8FkOteUEaHCB1/tNMbRvTxDKsMhdU=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "3.2-profile counterpart of negative/023-multi-valued-content-digest.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. Both Content-Digest members are the correct sha-256 of the body, so a verifier that keeps either one finds a matching digest. The Signature is a valid Ed25519 signature over expected_signature_base, which carries the Content-Digest value exactly as sent, so the repeated algorithm is the only fault. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/024-unquoted-string-param.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/024-unquoted-string-param.json
new file mode 100644
index 00000000000..4653daa5328
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/024-unquoted-string-param.json
@@ -0,0 +1,34 @@
+{
+ "name": "AdCP 3.2 Signature-Input sig-param string value sent unquoted (keyid=foo instead of keyid=\"foo\", content-digest covered)",
+ "spec_reference": "#verifier-checklist-requests step 1 (RFC 9421 §2.3 sig-params; RFC 8941 §3.3 string values MUST be double-quoted); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:Q3FQYXttiTxTTe/Uyd4kU85SugyiiPGIIISxQAuF2VU=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=test-ed25519-2026;alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:AmBtcnmPqvAgc/2i+tLjfZYF7flBtLf1Bds/vD9wc3MHxc9XQ7x2bjgp1XwMXQMfpkMNLgnFN8vD12ZmF81yBQ==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-024-unquoted-string-param\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"content-digest\": sha-256=:Q3FQYXttiTxTTe/Uyd4kU85SugyiiPGIIISxQAuF2VU=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=test-ed25519-2026;alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "3.2-profile counterpart of negative/024-unquoted-string-param.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. The Signature is a valid Ed25519 signature over expected_signature_base, which carries the sig-params exactly as sent (unquoted keyid), so the unquoted string is the only fault. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/026-non-ascii-host.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/026-non-ascii-host.json
new file mode 100644
index 00000000000..9a8ffc76897
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/026-non-ascii-host.json
@@ -0,0 +1,34 @@
+{
+ "name": "AdCP 3.2 URL authority contains raw IDN U-label (non-ASCII bytes in host, content-digest covered)",
+ "spec_reference": "#adcp-rfc-9421-profile (@target-uri canonicalization: hosts MUST be ASCII A-labels; RFC 5891 §4.4); security.mdx error table: raw non-ASCII host → request_target_uri_malformed; AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://bücher.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:kIaEys2lgdMw3nBKsDVxqowKlhUAwuZ7fv/ao1EWz30=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:kPfSDWSJkxG8dJjqL6sGEgUIilMlas5j7LqD9AnjvcupsVqVB3e1wziTlvJX9//oAlSraR/4ZwpVAtwvwDqZDQ==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-026-non-ascii-host\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://xn--bcher-kva.example.com/adcp/create_media_buy\n\"@authority\": xn--bcher-kva.example.com\n\"content-type\": application/json\n\"content-digest\": sha-256=:kIaEys2lgdMw3nBKsDVxqowKlhUAwuZ7fv/ao1EWz30=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_target_uri_malformed",
+ "failed_step": 10
+ },
+ "$comment": "3.2-profile counterpart of negative/026-non-ascii-host.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. The Signature is a valid Ed25519 signature over the base for the A-label form of the host (xn--bcher-kva.example.com), the base a signer that canonicalized correctly would produce. A verifier that silently re-normalizes the U-label would therefore verify the signature; docs/reference/url-canonicalization.mdx requires the comparer to reject a raw non-ASCII host instead, so the raw U-label on the wire is the only fault. The expected code follows root 026 (request_target_uri_malformed at step 10, per the maintainer decision on adcp#7905). Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/027-webhook-registration-authentication-unsigned.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/027-webhook-registration-authentication-unsigned.json
new file mode 100644
index 00000000000..94aae98125a
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/027-webhook-registration-authentication-unsigned.json
@@ -0,0 +1,30 @@
+{
+ "name": "AdCP 3.2 webhook registration with push_notification_config.authentication over bearer (unsigned); operation NOT in required_for (Content-Digest sent)",
+ "spec_reference": "#webhook-security Downgrade and injection resistance — MUST require 9421 when authentication is present; AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/update_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer test-bearer-token",
+ "Content-Digest": "sha-256=:E+LdIY2+s0VOVRV19uSrCWt4s85QWjv4VDcyc3m+sog=:"
+ },
+ "body": "{\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"media_buy_id\":\"mb_001\",\"idempotency_key\":\"vector-profile-3-2-negative-027-webhook-registration-authentication-unsigned\",\"brand\":{\"domain\":\"brand.example\"},\"push_notification_config\":{\"url\":\"https://buyer.example.com/webhook\",\"authentication\":{\"schemes\":[\"HMAC-SHA256\"],\"credentials\":\"ssssssssssssssssssssssssssssssssssssssss\"}}}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": []
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_required",
+ "failed_step": 0
+ },
+ "$comment": "3.2-profile counterpart of negative/027-webhook-registration-authentication-unsigned.json. AdCP 3.2 profile: the verifier advertises covers_content_digest='required' and the request carries a correct Content-Digest, but no usable signature is presented, so the step-0 fault is the only fault. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/028-unsigned-protocol-method-required.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/028-unsigned-protocol-method-required.json
new file mode 100644
index 00000000000..3694c38b792
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/028-unsigned-protocol-method-required.json
@@ -0,0 +1,32 @@
+{
+ "name": "AdCP 3.2 unsigned tasks/cancel JSON-RPC POST; method is in protocol_methods_required_for (Content-Digest sent)",
+ "spec_reference": "#signed-requests-transport-layer (protocol_methods_* namespace; pre-check 0); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/mcp",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:3P1xXLJI+Tke1E3EQTdP9Htsynb0Oq9aqD3vguuCULE=:"
+ },
+ "body": "{\"jsonrpc\":\"2.0\",\"method\":\"tasks/cancel\",\"params\":{\"taskId\":\"task_conformance_001\"},\"id\":1}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [],
+ "protocol_methods_required_for": [
+ "tasks/cancel"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_required",
+ "failed_step": 0
+ },
+ "$comment": "3.2-profile counterpart of negative/028-unsigned-protocol-method-required.json. AdCP 3.2 profile: the verifier advertises covers_content_digest='required' and the request carries a correct Content-Digest, but no usable signature is presented, so the step-0 fault is the only fault. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/029-duplicate-signature-label.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/029-duplicate-signature-label.json
new file mode 100644
index 00000000000..9e0eb274c08
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/029-duplicate-signature-label.json
@@ -0,0 +1,34 @@
+{
+ "name": "AdCP 3.2 Signature header declares label 'sig1' twice (malformed structured dictionary, content-digest covered)",
+ "spec_reference": "#verifier-checklist-requests step 1 (RFC 9421 §4.2 Signature is a Dictionary; RFC 8941 §3.2 keys are unique; AdCP rejects duplicate labels rather than retaining the last); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:Fl7pGOE8MXD49dUig9o72/y73tU2xqwfL6n9eHg2kXM=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:r/DDnXNu+Yz9tDymMybuOJFt+POlsgiINuVzHvVHgu+OrYBHiJQvHQ1KCtzTkU+0FRId6ZyWUGzgGZ9y2XT7DQ==:, sig1=:r/DDnXNu+Yz9tDymMybuOJFt+POlsgiINuVzHvVHgu+OrYBHiJQvHQ1KCtzTkU+0FRId6ZyWUGzgGZ9y2XT7DQ==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-029-duplicate-signature-label\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"content-digest\": sha-256=:Fl7pGOE8MXD49dUig9o72/y73tU2xqwfL6n9eHg2kXM=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "3.2-profile counterpart of negative/029-duplicate-signature-label.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. Signature-Input carries sig1 exactly once, covers content-digest, and is well formed; only the Signature header repeats the label. Both Signature members are the same valid Ed25519 signature over expected_signature_base, so a verifier that keeps either one verifies it and the repeated label is the only fault. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/030-content-digest-key-case.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/030-content-digest-key-case.json
new file mode 100644
index 00000000000..155ccccb9ab
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/030-content-digest-key-case.json
@@ -0,0 +1,34 @@
+{
+ "name": "AdCP 3.2 Content-Digest carries SHA-256 and sha-256 (uppercase dictionary key is not a case-insensitive synonym, content-digest covered)",
+ "spec_reference": "#verifier-checklist-requests step 1 (RFC 9530 §2 Content-Digest is an RFC 8941 Dictionary; RFC 8941 §3.1.2 keys are lowercase only); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "SHA-256=:21dxJDSRQbO0g8ppYqCLM3nGKNTR454hle8yfY3DWiA=:, sha-256=:21dxJDSRQbO0g8ppYqCLM3nGKNTR454hle8yfY3DWiA=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:7wOfKIt+6DUYjlPDijJx19de+TWuhWpD0Gwg/4bRAdjKoWsCMx0kaueGgjZBFMKzqr/tLlKXvtmExsJ635FlBg==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-030-content-digest-key-case\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"content-digest\": SHA-256=:21dxJDSRQbO0g8ppYqCLM3nGKNTR454hle8yfY3DWiA=:, sha-256=:21dxJDSRQbO0g8ppYqCLM3nGKNTR454hle8yfY3DWiA=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_signature_header_malformed",
+ "failed_step": 1
+ },
+ "$comment": "3.2-profile counterpart of negative/030-content-digest-key-case.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. Both members are the correct digest of the body in standard padded Base64, and the Signature is a valid Ed25519 signature over expected_signature_base, which carries the Content-Digest value exactly as sent, so the uppercase key is the only fault. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/031-malformed-host-authority.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/031-malformed-host-authority.json
new file mode 100644
index 00000000000..760819438e3
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/negative/031-malformed-host-authority.json
@@ -0,0 +1,35 @@
+{
+ "name": "AdCP 3.2 Host header carries an unbracketed IPv6 literal (malformed authority) while the URL is clean (content-digest covered)",
+ "spec_reference": "#adcp-rfc-9421-profile (@authority derived from the as-received Host header and canonicalized by the URL canonicalization algorithm; malformed authority → request_target_uri_malformed); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://[::1]/adcp/create_media_buy",
+ "headers": {
+ "Host": "::1",
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:9zL8fhx5CdjqPaxHFqS+b2lrm4hc2syRWMV5jmlbjtY=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:+O4ID3iFmdHlAGeD7vbGNL+x0Z6Rb/Ae0qIh+sj2zEJN376Q2EzQMQaviCXYZpTC9fBeVIO4tFVwg8BdDlRVBA==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-negative-031-malformed-host-authority\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://[::1]/adcp/create_media_buy\n\"@authority\": [::1]\n\"content-type\": application/json\n\"content-digest\": sha-256=:9zL8fhx5CdjqPaxHFqS+b2lrm4hc2syRWMV5jmlbjtY=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": false,
+ "error_code": "request_target_uri_malformed",
+ "failed_step": 10
+ },
+ "$comment": "3.2-profile counterpart of negative/031-malformed-host-authority.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. The URL is the valid bracketed form and the Signature is a real Ed25519 signature over the base computed from the URL authority [::1], so the Host header is the only fault. A verifier that derives @authority from the URL alone verifies it. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/positive/013-two-signature-labels-distinct.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/positive/013-two-signature-labels-distinct.json
new file mode 100644
index 00000000000..87580d22ed2
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/positive/013-two-signature-labels-distinct.json
@@ -0,0 +1,33 @@
+{
+ "name": "AdCP 3.2 two distinct labels on both Signature-Input and Signature — verifier processes sig1 and does not reject the dictionaries (content-digest covered)",
+ "spec_reference": "#adcp-rfc-9421-profile (One signature per request); #verifier-checklist-requests step 1 (duplicate-key rejection applies to repeated labels, not to distinct ones); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:VN/fNweBxR2Mt3rX0fhchkjSex6123k1Y5eOOeo4vdA=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\", sig2=(\"@method\" \"@target-uri\" \"@authority\");created=1776520800;expires=1776521100;nonce=\"m4Fq2xYt9ZbCwLJd7sVn8g\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:4D2PJrWzBl9yuR631BO+RsRldBGginL+4XuO8lv+FPc0UmbxA4CV61JU37YJkAlYE6g662KcEa03urogNTGNCg==:, sig2=:AwoRGB8mLTQ7QklQV15lbHN6gYiPlp2kq7K5wMfO1dzj6vH4/wYNFBsiKTA3PkVMU1phaG92fYSLkpmgp661vA==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-positive-013-two-signature-labels-distinct\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"content-digest\": sha-256=:VN/fNweBxR2Mt3rX0fhchkjSex6123k1Y5eOOeo4vdA=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": true,
+ "verified_label": "sig1"
+ },
+ "$comment": "3.2-profile counterpart of positive/013-two-signature-labels-distinct.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. False-positive guard for negative/029 and 021. sig1 is a valid signature covering content-digest. sig2 has a different covered-components set, a different nonce, and a well-formed 64-byte value (the root vector's bytes, re-encoded as standard padded Base64) that does not verify. Verifiers MUST process exactly one label (conventionally sig1) and ignore the rest; attempting sig2 and rejecting is non-conformant. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/positive/014-content-digest-two-algorithms.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/positive/014-content-digest-two-algorithms.json
new file mode 100644
index 00000000000..121e59de951
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/positive/014-content-digest-two-algorithms.json
@@ -0,0 +1,32 @@
+{
+ "name": "AdCP 3.2 Content-Digest carries sha-256 and sha-512, both correct — distinct algorithm keys are legal (content-digest covered)",
+ "spec_reference": "#verifier-checklist-requests steps 1 and 11 (RFC 9530 §2: Content-Digest is a Dictionary keyed by lowercase algorithm name; RFC 8941 §3.1.2); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://seller.example.com/adcp/create_media_buy",
+ "headers": {
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:L7k6nKQUaZmWbGSlP3eii0WX+aijX8F0omEIPVcyUq0=:, sha-512=:2ichC2RWltILOGlam+IYJQjM9DY0zQ8xrYzFAPZo8cfZXEZJAF37118EWQYGMfRm5wMtngc7zu4N7+5PsZ6AGg==:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:H63J77EyvOnHa55rhsyxuDoNvRwiBINDEzb8Eg35YdecWl0hThD/jNGl2gpv0anrZdvlKB5fksfxcB+Yxop3Cg==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-positive-014-content-digest-two-algorithms\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://seller.example.com/adcp/create_media_buy\n\"@authority\": seller.example.com\n\"content-type\": application/json\n\"content-digest\": sha-256=:L7k6nKQUaZmWbGSlP3eii0WX+aijX8F0omEIPVcyUq0=:, sha-512=:2ichC2RWltILOGlam+IYJQjM9DY0zQ8xrYzFAPZo8cfZXEZJAF37118EWQYGMfRm5wMtngc7zu4N7+5PsZ6AGg==:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": true
+ },
+ "$comment": "3.2-profile counterpart of positive/014-content-digest-two-algorithms.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. False-positive guard for negative/023 and 030. Both members are the correct digest of the body in standard padded Base64, and the Signature is a real Ed25519 signature over expected_signature_base, which carries the Content-Digest value verbatim. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/test-vectors/request-signing/profile-3.2/positive/015-bracketed-ipv6-host-with-port.json b/static/compliance/source/test-vectors/request-signing/profile-3.2/positive/015-bracketed-ipv6-host-with-port.json
new file mode 100644
index 00000000000..06972098928
--- /dev/null
+++ b/static/compliance/source/test-vectors/request-signing/profile-3.2/positive/015-bracketed-ipv6-host-with-port.json
@@ -0,0 +1,33 @@
+{
+ "name": "AdCP 3.2 bracketed IPv6 literal with non-default port in both the URL and the Host header (content-digest covered)",
+ "spec_reference": "#adcp-rfc-9421-profile (@authority derived from as-received Host; IPv6 brackets preserved, non-default port kept); AdCP 3.2 profile per #content-digest-and-proxy-compatibility and #adcp-rfc-9421-profile binary value encoding",
+ "signing_profile_version": "3.2",
+ "reference_now": 1776520800,
+ "request": {
+ "method": "POST",
+ "url": "https://[2001:db8::1]:8443/adcp/create_media_buy",
+ "headers": {
+ "Host": "[2001:db8::1]:8443",
+ "Content-Type": "application/json",
+ "Content-Digest": "sha-256=:ilCj0oXvxdCQ4XBo82djX6ROGjCL3pOW94oGtTRDPpc=:",
+ "Signature-Input": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "Signature": "sig1=:6cbQBDeJ7BsVa2Asx3+EWPAtDMhL2fjN2Y8y2j99FNH0t8gOiUyRAeVcaDHYspQ/rLPr/ilV/cizDGpv9kaqDw==:"
+ },
+ "body": "{\"idempotency_key\":\"vector-profile-3-2-positive-015-bracketed-ipv6-host-with-port\",\"account\":{\"brand\":{\"domain\":\"acmeoutdoor.example\"},\"operator\":\"pinnacle-agency.example\",\"sandbox\":false},\"packages\":[{\"product_id\":\"prod-1\",\"budget\":5000.0,\"pricing_option_id\":\"cpm_usd_fixed\",\"paused\":false}],\"brand\":{\"domain\":\"brand.example\"},\"start_time\":\"2027-01-04T00:00:00Z\",\"end_time\":\"2027-02-01T00:00:00Z\",\"paused\":false,\"plan_id\":\"plan_001\"}"
+ },
+ "verifier_capability": {
+ "supported": true,
+ "covers_content_digest": "required",
+ "required_for": [
+ "create_media_buy"
+ ]
+ },
+ "jwks_ref": [
+ "test-ed25519-2026"
+ ],
+ "expected_signature_base": "\"@method\": POST\n\"@target-uri\": https://[2001:db8::1]:8443/adcp/create_media_buy\n\"@authority\": [2001:db8::1]:8443\n\"content-type\": application/json\n\"content-digest\": sha-256=:ilCj0oXvxdCQ4XBo82djX6ROGjCL3pOW94oGtTRDPpc=:\n\"@signature-params\": (\"@method\" \"@target-uri\" \"@authority\" \"content-type\" \"content-digest\");created=1776520800;expires=1776521100;nonce=\"KXYnfEfJ0PBRZXQyVXfVQA\";keyid=\"test-ed25519-2026\";alg=\"ed25519\";tag=\"adcp/request-signing/v1\"",
+ "expected_outcome": {
+ "success": true
+ },
+ "$comment": "3.2-profile counterpart of positive/015-bracketed-ipv6-host-with-port.json. AdCP 3.2 profile: the signature covers content-digest, binary values use RFC 8941 sf-binary (standard padded Base64), and the verifier advertises covers_content_digest='required'. False-positive guard for negative/031. The Host header byte-matches the authority of the canonical @target-uri, so @authority is [2001:db8::1]:8443 and the request verifies. Generated by scripts/generate-request-signing-profile-3.2-vectors.mjs from the test keys in keys.json; do not hand-edit."
+}
diff --git a/static/compliance/source/universal/billing-gate-dispatch.yaml b/static/compliance/source/universal/billing-gate-dispatch.yaml
index c16d871e0b8..8ac201db547 100644
--- a/static/compliance/source/universal/billing-gate-dispatch.yaml
+++ b/static/compliance/source/universal/billing-gate-dispatch.yaml
@@ -1,5 +1,5 @@
id: billing_gate_dispatch
-version: "1.1.1"
+version: "1.1.2"
title: "Billing contract and gate dispatch — sync_accounts capability vs per-buyer-agent gate"
category: error_compliance
summary: "Validates that account.supported_billing is declared and honored by sync_accounts, including out-of-set BILLING_NOT_SUPPORTED rejection, recovery-value consistency, and the distinct per-buyer-agent BILLING_NOT_PERMITTED_FOR_AGENT gate."
@@ -139,7 +139,6 @@ prerequisites:
phases:
- id: capability_discovery
title: "Capability discovery"
- optional: true
requires_capability:
path: "account"
present: true
diff --git a/static/compliance/source/universal/collection-lists-pagination-integrity.yaml b/static/compliance/source/universal/collection-lists-pagination-integrity.yaml
index 4558d473070..d9d560b75f4 100644
--- a/static/compliance/source/universal/collection-lists-pagination-integrity.yaml
+++ b/static/compliance/source/universal/collection-lists-pagination-integrity.yaml
@@ -4,6 +4,9 @@ title: "Pagination cursor integrity — list_collection_lists"
category: schema_validation
summary: "Validates the cursor↔has_more invariant by walking a paginated list_collection_lists response from a continuation page to a terminal page."
track: core
+requires:
+ - controller
+
required_tools:
- list_collection_lists
diff --git a/static/compliance/source/universal/content-standards-pagination-integrity.yaml b/static/compliance/source/universal/content-standards-pagination-integrity.yaml
index e1366afd35e..ae5fc5310c4 100644
--- a/static/compliance/source/universal/content-standards-pagination-integrity.yaml
+++ b/static/compliance/source/universal/content-standards-pagination-integrity.yaml
@@ -4,6 +4,9 @@ title: "Pagination cursor integrity — list_content_standards"
category: schema_validation
summary: "Validates the cursor↔has_more invariant by walking a paginated list_content_standards response from a continuation page to a terminal page."
track: core
+requires:
+ - controller
+
required_tools:
- list_content_standards
diff --git a/static/compliance/source/universal/deterministic-testing.yaml b/static/compliance/source/universal/deterministic-testing.yaml
index 725e42f4554..337c717aa58 100644
--- a/static/compliance/source/universal/deterministic-testing.yaml
+++ b/static/compliance/source/universal/deterministic-testing.yaml
@@ -4,6 +4,9 @@ title: 'Deterministic testing'
category: core
summary: 'Uses comply_test_controller to force state transitions and simulate delivery/budget, verifying state machines and reporting.'
track: core
+requires:
+ - controller
+
required_tools:
- comply_test_controller
platform_types:
diff --git a/static/compliance/source/universal/error-compliance-signals.yaml b/static/compliance/source/universal/error-compliance-signals.yaml
index 74e6322e0ef..42c90a267f0 100644
--- a/static/compliance/source/universal/error-compliance-signals.yaml
+++ b/static/compliance/source/universal/error-compliance-signals.yaml
@@ -4,6 +4,9 @@ title: "Error handling — signals protocol"
category: error_compliance
summary: "Validates that signals agents return properly structured AdCP errors with correct codes, recovery hints, and transport bindings."
track: error_handling
+requires:
+ - controller
+
required_tools:
- get_signals
- activate_signal
diff --git a/static/compliance/source/universal/error-compliance.yaml b/static/compliance/source/universal/error-compliance.yaml
index ac5dba29845..d2c487a2f2f 100644
--- a/static/compliance/source/universal/error-compliance.yaml
+++ b/static/compliance/source/universal/error-compliance.yaml
@@ -4,6 +4,9 @@ title: "Error handling and compliance"
category: error_compliance
summary: "Validates that agents return properly structured AdCP errors with correct codes, recovery hints, and transport bindings."
track: error_handling
+requires:
+ - controller
+
required_tools:
- get_products
diff --git a/static/compliance/source/universal/get-signals-pagination-integrity.yaml b/static/compliance/source/universal/get-signals-pagination-integrity.yaml
index 2fe7efa1f6a..b89db5b67d8 100644
--- a/static/compliance/source/universal/get-signals-pagination-integrity.yaml
+++ b/static/compliance/source/universal/get-signals-pagination-integrity.yaml
@@ -4,6 +4,9 @@ title: "get_signals pagination cursor integrity"
category: schema_validation
summary: "Validates the cursor↔has_more invariant on a paginated get_signals response by walking from a continuation page to the next page under a broad query."
track: signals
+requires:
+ - controller
+
required_tools:
- get_signals
diff --git a/static/compliance/source/universal/idempotency.yaml b/static/compliance/source/universal/idempotency.yaml
index a451c0185ae..859f62f9011 100644
--- a/static/compliance/source/universal/idempotency.yaml
+++ b/static/compliance/source/universal/idempotency.yaml
@@ -4,6 +4,8 @@ title: "Idempotency enforcement"
category: core
summary: "Validates that mutating requests enforce idempotency_key — replays return cached responses even after resource purge, key reuse with a different payload returns IDEMPOTENCY_CONFLICT, fresh keys create new resources, and concurrent retries with the same key produce exactly one resource (first-insert-wins under rule 9)."
track: core
+requires:
+ - controller
# Cross-step assertions (adcontextprotocol/adcp#2639). These convert two
# reviewer-only checks from `key_reuse_conflict` and `security` into
diff --git a/static/compliance/source/universal/property-lists-pagination-integrity.yaml b/static/compliance/source/universal/property-lists-pagination-integrity.yaml
index 316de6e7794..976a6c0bf3e 100644
--- a/static/compliance/source/universal/property-lists-pagination-integrity.yaml
+++ b/static/compliance/source/universal/property-lists-pagination-integrity.yaml
@@ -4,6 +4,9 @@ title: "Pagination cursor integrity — list_property_lists"
category: schema_validation
summary: "Validates the cursor↔has_more invariant by walking a paginated list_property_lists response from a continuation page to a terminal page."
track: core
+requires:
+ - controller
+
required_tools:
- list_property_lists
diff --git a/static/compliance/source/universal/read-tool-idempotency.yaml b/static/compliance/source/universal/read-tool-idempotency.yaml
index 36e5de84d5e..d9d5448047e 100644
--- a/static/compliance/source/universal/read-tool-idempotency.yaml
+++ b/static/compliance/source/universal/read-tool-idempotency.yaml
@@ -5,6 +5,9 @@ title: "Read-tool idempotency_key envelope tolerance"
category: idempotency
summary: "Validates that read-only AdCP tasks and the 3.x get_products compatibility facade tolerate an optional idempotency_key without claiming read-response replay."
track: core
+requires:
+ - controller
+
required_tools: [] # protocol-level baseline; read-tool probes gate themselves per step
narrative: |
diff --git a/static/compliance/source/universal/schema-validation-signals.yaml b/static/compliance/source/universal/schema-validation-signals.yaml
index e0e319c80e1..49da5d1d287 100644
--- a/static/compliance/source/universal/schema-validation-signals.yaml
+++ b/static/compliance/source/universal/schema-validation-signals.yaml
@@ -4,6 +4,9 @@ title: "Schema compliance — signals protocol"
category: schema_validation
summary: "Validates that signals agent responses conform to AdCP schemas with all required fields present and correctly typed."
track: core
+requires:
+ - controller
+
required_tools:
- get_signals
diff --git a/static/compliance/source/universal/schema-validation.yaml b/static/compliance/source/universal/schema-validation.yaml
index 86f82eda0ae..6af660217b8 100644
--- a/static/compliance/source/universal/schema-validation.yaml
+++ b/static/compliance/source/universal/schema-validation.yaml
@@ -4,6 +4,9 @@ title: "Schema compliance and temporal validation"
category: schema_validation
summary: "Validates that agent responses conform to AdCP schemas and that temporal constraints are enforced."
track: core
+requires:
+ - controller
+
required_tools:
- get_products
diff --git a/static/compliance/source/universal/signed-requests.yaml b/static/compliance/source/universal/signed-requests.yaml
index 8c031c6327e..d6df0bbf8b6 100644
--- a/static/compliance/source/universal/signed-requests.yaml
+++ b/static/compliance/source/universal/signed-requests.yaml
@@ -2,7 +2,7 @@ id: signed_requests
version: "1.0.0"
title: "Signed requests — RFC 9421 transport-layer verification"
category: signed_requests
-summary: "Agent verifies RFC 9421 HTTP Signatures on incoming AdCP requests per the 3.1-compatible transport-layer profile. Universal capability-gated storyboard — runs for any agent advertising `request_signing.supported: true` regardless of `supported_protocols`. Graded against the legacy wire suite covering every 3.1 checklist step and canonicalization-edge rule."
+summary: "Agent verifies RFC 9421 HTTP Signatures on incoming AdCP requests per the 3.1-compatible transport-layer profile. Universal capability-gated storyboard — runs for any agent advertising `request_signing.supported: true` regardless of `supported_protocols`. Graded against the legacy wire suite covering every 3.1 checklist step and canonicalization-edge rule; a verifier advertising `covers_content_digest: \"required\"` (every 3.2+ verifier) is graded against the `profile-3.2/` mirror, which carries a counterpart of every legacy vector (positive `001` and `002` collapse into `positive/001-post-with-content-digest`) except `negative/018` (`forbidden` is illegal in 3.2)."
track: security_transport
required_tools:
- get_adcp_capabilities
@@ -188,6 +188,9 @@ phases:
019 Signature without Signature-Input → request_signature_header_malformed
020 per-keyid replay cache cap → request_signature_rate_abuse
028 unsigned tasks/cancel + protocol_methods_required_for → request_signature_required
+ 029 duplicate label on Signature → request_signature_header_malformed
+ 030 Content-Digest SHA-256 + sha-256 → request_signature_header_malformed
+ 031 unbracketed IPv6 in Host header → request_target_uri_malformed
Vector 028 is gated on `request_signing.protocol_methods_required_for`
being non-empty: the runner skips when the agent does not declare the
diff --git a/static/compliance/source/universal/stale-response-advisory.yaml b/static/compliance/source/universal/stale-response-advisory.yaml
index e839bb68a84..518b8d18a29 100644
--- a/static/compliance/source/universal/stale-response-advisory.yaml
+++ b/static/compliance/source/universal/stale-response-advisory.yaml
@@ -4,6 +4,9 @@ title: "STALE_RESPONSE advisory-success wire placement"
category: stale_response_advisory
summary: "Validates that STALE_RESPONSE rides in errors[] on a populated success response with transport success preserved, and that STALE_RESPONSE is absent on healthy upstream responses."
track: error_handling
+requires:
+ - controller
+
required_tools:
- get_products
diff --git a/static/compliance/source/universal/storyboard-schema.yaml b/static/compliance/source/universal/storyboard-schema.yaml
index f2de89fb93e..3b83eccb0fa 100644
--- a/static/compliance/source/universal/storyboard-schema.yaml
+++ b/static/compliance/source/universal/storyboard-schema.yaml
@@ -176,11 +176,15 @@
# ("skip the whole storyboard if the capability is absent").
# Storyboards may declare both: the gate fires first, and
# controller_seeding takes effect only if the gate passes.
-# Declaring controller_seeding: true without requires:
-# [controller] is also valid — mid-run, individual steps
-# grade missing_test_controller if the agent lacks the
-# tool; requires: [controller] coalesces that into a single
-# whole-storyboard skip at load time instead.
+# A storyboard that declares prerequisites.controller_seeding:
+# true MUST also declare requires: [controller] (enforced by
+# tests/lint-storyboard-controller-requires.test.cjs). The
+# gate coalesces what would otherwise be a
+# missing_test_controller grade on every seeded step into a
+# single whole-storyboard requirement_unmet skip at load
+# time. Whether a given class of seller is expected to
+# implement comply_test_controller is a separate policy
+# question — see docs/building/by-layer/L3/comply-test-controller.mdx.
# Mid-run transient loss: if the load-phase gate passes
# (the agent advertised comply_test_controller at load
# time) but the tool becomes unavailable mid-run, the
diff --git a/static/compliance/source/universal/webhook-emission.yaml b/static/compliance/source/universal/webhook-emission.yaml
index 34f96efe566..de74c9b382e 100644
--- a/static/compliance/source/universal/webhook-emission.yaml
+++ b/static/compliance/source/universal/webhook-emission.yaml
@@ -6,6 +6,7 @@ summary: "Any agent that emits webhooks MUST echo the caller-supplied operation_
track: core
requires:
- webhook_receiver
+ - controller
narrative: |
Webhook emission is a cross-cutting capability, not a specialism. Sellers emit
diff --git a/static/compliance/source/universal/wholesale-feed-products-scope-isolation.yaml b/static/compliance/source/universal/wholesale-feed-products-scope-isolation.yaml
index cdcf353c42b..6eab0b7423a 100644
--- a/static/compliance/source/universal/wholesale-feed-products-scope-isolation.yaml
+++ b/static/compliance/source/universal/wholesale-feed-products-scope-isolation.yaml
@@ -4,6 +4,9 @@ title: "Wholesale product feed cache-scope isolation"
category: marketplace_catalog
summary: "Validates that get_products conditional-fetch is keyed by cache_scope: a wholesale_feed_version minted under one cache_scope must not short-circuit (unchanged: true) a request the seller resolves to a different cache_scope."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.2"
requires_capability:
diff --git a/static/compliance/source/universal/wholesale-feed-products.yaml b/static/compliance/source/universal/wholesale-feed-products.yaml
index e7d3624e0c7..2a1c279002f 100644
--- a/static/compliance/source/universal/wholesale-feed-products.yaml
+++ b/static/compliance/source/universal/wholesale-feed-products.yaml
@@ -4,6 +4,9 @@ title: "Wholesale product feed versioning"
category: marketplace_catalog
summary: "Validates get_products wholesale feed versioning: bootstrap responses carry wholesale_feed_version/cache_scope and matching if_wholesale_feed_version probes return unchanged without product rows."
track: media_buy
+requires:
+ - controller
+
introduced_in: "3.1"
requires_capability:
diff --git a/static/compliance/source/universal/wholesale-feed-signals-scope-isolation.yaml b/static/compliance/source/universal/wholesale-feed-signals-scope-isolation.yaml
index c48b201d02b..05c429a32e4 100644
--- a/static/compliance/source/universal/wholesale-feed-signals-scope-isolation.yaml
+++ b/static/compliance/source/universal/wholesale-feed-signals-scope-isolation.yaml
@@ -4,6 +4,9 @@ title: "Wholesale signals feed cache-scope isolation"
category: marketplace_catalog
summary: "Validates that get_signals conditional-fetch is keyed by cache_scope: a wholesale_feed_version minted under one cache_scope must not short-circuit (unchanged: true) a request the agent resolves to a different cache_scope."
track: signals
+requires:
+ - controller
+
introduced_in: "3.2"
requires_capability:
diff --git a/static/compliance/source/universal/wholesale-feed-signals.yaml b/static/compliance/source/universal/wholesale-feed-signals.yaml
index 3fa07f66497..12d5a705184 100644
--- a/static/compliance/source/universal/wholesale-feed-signals.yaml
+++ b/static/compliance/source/universal/wholesale-feed-signals.yaml
@@ -4,6 +4,9 @@ title: "Wholesale signals feed versioning"
category: marketplace_catalog
summary: "Validates get_signals wholesale feed versioning: bootstrap responses carry wholesale_feed_version/cache_scope and matching if_wholesale_feed_version probes return unchanged without signal rows."
track: signals
+requires:
+ - controller
+
introduced_in: "3.1"
requires_capability:
diff --git a/static/schemas/source/account/list-account-changes-request.json b/static/schemas/source/account/list-account-changes-request.json
index 0174ff3d57e..ce677609ea4 100644
--- a/static/schemas/source/account/list-account-changes-request.json
+++ b/static/schemas/source/account/list-account-changes-request.json
@@ -6,19 +6,10 @@
"description": "Read a durable, ordered feed of material changes to AdCP-visible state for one account. Use a latest checkpoint before snapshot bootstrap, then drain from that cursor to close the bootstrap race. Experimental in 3.2 (RFC #6810): sellers implementing this task MUST list account.change_feed in experimental_features.",
"x-tool-summary": "List durable changes to authoritative AdCP-visible state for one account.",
"type": "object",
+ "allOf": [{ "$ref": "/schemas/core/version-envelope.json" }],
"properties": {
- "adcp_version": {
- "type": "string",
- "description": "Release-precision AdCP version. Flattened here so emitted MCP tool input schemas remain plain root objects for clients that reject top-level combinators.",
- "pattern": "^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[a-zA-Z0-9](?:[a-zA-Z0-9.-]*[a-zA-Z0-9])?)?$"
- },
- "adcp_major_version": {
- "type": "integer",
- "deprecated": true,
- "description": "Deprecated major-only version pin retained through 3.x.",
- "minimum": 1,
- "maximum": 99
- },
+ "adcp_version": { "$ref": "/schemas/core/version-envelope.json#/properties/adcp_version" },
+ "adcp_major_version": { "$ref": "/schemas/core/version-envelope.json#/properties/adcp_major_version" },
"account": {
"$ref": "/schemas/core/account-ref.json",
"description": "Account whose change feed to read. The resolved account and returned cursor are bound to the authenticated principal."
diff --git a/static/schemas/source/core/compact-task-submitted.json b/static/schemas/source/core/compact-task-submitted.json
index d0d3e52c34f..1f801583843 100644
--- a/static/schemas/source/core/compact-task-submitted.json
+++ b/static/schemas/source/core/compact-task-submitted.json
@@ -4,6 +4,10 @@
"title": "Compact Task Submitted",
"description": "Bounded submitted envelope shared by the compact lifecycle tools.",
"type": "object",
+ "allOf": [
+ { "$ref": "/schemas/core/version-envelope.json" },
+ { "$ref": "/schemas/core/protocol-envelope.json" }
+ ],
"properties": {
"status": { "type": "string", "const": "submitted" },
"task_id": { "type": "string", "minLength": 1, "x-entity": "task" },
diff --git a/static/schemas/source/core/reporting-obligation.json b/static/schemas/source/core/reporting-obligation.json
index 63a9c66c057..9351bd7c803 100644
--- a/static/schemas/source/core/reporting-obligation.json
+++ b/static/schemas/source/core/reporting-obligation.json
@@ -440,7 +440,7 @@
"revision_chain": "Supersession MUST be acyclic, remain within this logical slice, and every supersedes_reporting_revision_id MUST name the immediately prior retained snapshot revision. At most one official revision may exist for a logical slice; it is terminal, and every obligation using that slice shares the same close. Later corrections are reporting adjustments and never alter this chain.",
"record_counts": "revision_count is the number of distinct revision records for this obligation in ledger_snapshot_id. Reliable Reporting 1.0 requires adjustment_count. A seller advertising consumer_status_task additionally requires consumer_status_count; both fields remain schema-optional so readers can accept the published RC.1 shape. adjustment_count counts distinct adjustments targeting an official revision used by this obligation; one destination-independent adjustment is counted once even when it fans out through multiple materializations. consumer_status_count counts the authenticated caller's immutable status history associated either by reporting_obligation_id or by the exact delivery_config_id, delivery_config_version, report_definition_id, and period logical key. If the seller creates an obligation after receiving obligation_missing, the existing chain attaches to the repaired obligation by that logical key; it MUST NOT be lost, forked, or reset. current_consumer_status_id names the chain's one unsuperseded leaf. materialization_count, successful_materialization_count, receipt_count, accepted_receipt_count, adjustment_receipt_count, accepted_adjustment_receipt_count, and pending_adjustment_count, when present for their respective tiers, MUST equal the complete associated record totals in the same snapshot, even when records appear on different pages.",
"adjustment_reconciliation": "For reconciliation_mode consumer_receipt, every adjustment is pending until the authenticated consumer records an accepted adjustment receipt with the exact canonical digest. A rejected receipt preserves the dispute and MUST NOT be represented as accepted settlement.",
- "core_readability": "For a Core (API-delivered) obligation — no destination_ref — healthy and complete assert an authoritative readable revision: production_status published, at least one immutable revision retained per status_retention_days, and readable through the existing get_media_buy_delivery and reporting_webhook transports. Managed-delivery obligations additionally require at least one successful retained materialization.",
+ "core_readability": "For a Core (API-delivered) obligation — no destination_ref — healthy and complete assert an authoritative readable revision: production_status published, at least one immutable revision retained per status_retention_days, and readable through the existing get_media_buy_delivery and reporting_webhook transports. An open REVISION_UNREADABLE issue for any revision of the obligation also blocks healthy and complete. Managed-delivery obligations additionally require at least one successful retained materialization.",
"consumer_mismatch": "Consumer status is separately attributed and never satisfies production or billing reconciliation. A current statement that conflicts with the seller's otherwise healthy/complete projection degrades only this authenticated caller/account view with a CONSUMER_STATUS_MISMATCH issue carrying opened_at and the causing reporting_status_id. Conflicts are obligation_missing, revision_missing, unreadable, content_mismatch, and received naming a revision that is no longer the current required revision after a seller restatement. Every conflict except that last one is immediately action_required. A received statement made stale only by a seller restatement is delayed until the grace deadline defined by get-reporting-status-response.json stale_received_grace — the first superseding revision's created_at plus the configuration generation's schedule.delivery_sla, or automated_recovery_window_seconds when that SLA resolves to zero — and action_required at or after it, because the buyer consumed exactly what the seller then required and has not yet had a bounded chance to re-read. Later restatements do not restart that window, and an advertised consumer_mismatch_escalation_seconds boundary takes precedence over it. The issue keeps one issue_id and one opened_at across that severity change, and is retired only under reporting-status-issue.json consumer_mismatch_lifecycle. An exact bilateral waiver retires the issue and restores this obligation's underlying seller health even while current_consumer_status_id continues to name the immutable causing statement; a later statement or materially different conflict is evaluated independently. The seller assigns responsible_party from the diagnosed cause; an uncorroborated consumer statement or waiver never changes another caller's view or seller-advertised reliability_statistics. Absence of consumer status is never a conflict: after expected_at plus automated_recovery_window_seconds it is counted in the response's obligation_counts.consumer_status_pending and changes no health."
},
"additionalProperties": false
diff --git a/static/schemas/source/core/reporting-status-issue.json b/static/schemas/source/core/reporting-status-issue.json
index 917985c982d..d4d8095170b 100644
--- a/static/schemas/source/core/reporting-status-issue.json
+++ b/static/schemas/source/core/reporting-status-issue.json
@@ -36,6 +36,7 @@
"RESOURCE_EXPIRED",
"READER_INCOMPATIBLE",
"HISTORY_UNAVAILABLE",
+ "REVISION_UNREADABLE",
"RECEIPT_REQUIRED",
"RECEIPT_REJECTED",
"ADJUSTMENT_RECEIPT_REQUIRED",
@@ -96,6 +97,14 @@
"pattern": "^[A-Za-z0-9_.:-]{1,255}$",
"x-entity": "reporting_obligation"
},
+ "reporting_revision_id": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 255,
+ "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
+ "x-entity": "reporting_revision",
+ "description": "Published revision this issue concerns. Required when code is REVISION_UNREADABLE."
+ },
"reporting_status_id": {
"type": "string",
"minLength": 16,
@@ -158,12 +167,23 @@
{
"if": { "properties": { "code": { "const": "CONSUMER_STATUS_MISMATCH" } }, "required": ["code"] },
"then": { "required": ["opened_at", "reporting_status_id"] }
+ },
+ {
+ "if": { "properties": { "code": { "const": "REVISION_UNREADABLE" } }, "required": ["code"] },
+ "then": {
+ "properties": { "responsible_party": { "const": "seller" } },
+ "required": ["reporting_obligation_id", "reporting_revision_id"],
+ "if": { "properties": { "severity": { "const": "delayed" } } },
+ "then": { "properties": { "recommended_action": { "const": "wait_for_retry" } } },
+ "else": { "properties": { "recommended_action": { "const": "contact_seller" } } }
+ }
}
],
"x-adcp-validation": {
"issue_lifecycle": "issue_id identifies one logical condition. opened_at is fixed at first emission and MUST NOT advance while the same issue_id is re-emitted, even across ledger snapshots, health transitions, or a severity change from delayed to action_required. issue_state, when supported, moves only forward through open, acknowledged, and then resolved or waived; a recurrence after retirement receives a new issue_id and a new opened_at. external_ref is inert correlation text with no protocol meaning; a seller MUST NOT reuse one external_ref across callers on a caller-scoped issue, because that would leak the blast radius of a seller-side incident between tenants.",
"consumer_mismatch_lifecycle": "resolved requires a superseding agreeing consumer statement or a seller projection that no longer conflicts. waived is terminal only when consumer and seller explicitly agree off-protocol to disregard the exact caller/account mismatch identified by issue_id, causing reporting_status_id, and diagnosed conflict; a seller MUST NOT act unilaterally. Waiver leaves the consumer statement unchanged and not seller evidence. The seller retains a private audit, retires the issue from issues[], and projects underlying seller health even while the immutable statement remains current and visible in consumer_statuses[]. A later statement or different conflict is evaluated independently and receives a new issue_id if conflicting. A health change fires the advertised reporting.status_changed recovery transition with issue_ids empty or absent; otherwise no health-transition notification is required and polling remains authoritative.",
- "consumer_mismatch_escalation": "A CONSUMER_STATUS_MISMATCH issue MUST carry opened_at and the reporting_status_id that caused it. When the seller advertises consumer_mismatch_escalation_seconds, an open or acknowledged issue still unresolved at opened_at plus that window MUST be emitted at severity action_required with a recommended_action in the contact_ family — contact_buyer, contact_seller, or contact_provider — naming the diagnosed responsible_party, and the seller MUST advertise operations_contact so the named party is reachable. wait_for_retry MUST NOT survive the escalation boundary: an unattended mismatch is an escalation, not a retry. This escalation takes precedence over the stale-received grace window in get-reporting-status-response.json: when the two windows overlap, the escalation boundary wins and the issue is action_required even if the grace window has not closed. An issue already retired under consumer_mismatch_lifecycle is not subject to this rule, because it is no longer in issues[]."
+ "consumer_mismatch_escalation": "A CONSUMER_STATUS_MISMATCH issue MUST carry opened_at and the reporting_status_id that caused it. When the seller advertises consumer_mismatch_escalation_seconds, an open or acknowledged issue still unresolved at opened_at plus that window MUST be emitted at severity action_required with a recommended_action in the contact_ family — contact_buyer, contact_seller, or contact_provider — naming the diagnosed responsible_party, and the seller MUST advertise operations_contact so the named party is reachable. wait_for_retry MUST NOT survive the escalation boundary: an unattended mismatch is an escalation, not a retry. This escalation takes precedence over the stale-received grace window in get-reporting-status-response.json: when the two windows overlap, the escalation boundary wins and the issue is action_required even if the grace window has not closed. An issue already retired under consumer_mismatch_lifecycle is not subject to this rule, because it is no longer in issues[].",
+ "revision_unreadable": "REVISION_UNREADABLE means the seller cannot currently serve or verify the content of a published revision that it still owes through exact reads within status_retention_days. Examples: the stored rows are missing, or they no longer reproduce row_count, control_totals, and revision_content_sha256. PRODUCTION_FAILED does not apply, because the revision was produced and published. The issue names one affected reporting_obligation_id and the reporting_revision_id. When one revision serves several of the caller's obligations, the seller emits one issue per obligation. An affected obligation is neither healthy nor complete while the issue is open. The issue is delayed with wait_for_retry while automatic repair is in progress, and action_required with contact_seller once the seller cannot restore the content automatically. While the issue is open, an exact read of the revision by a caller authorized for it MUST return SERVICE_UNAVAILABLE. It MUST NOT return REFERENCE_NOT_FOUND, and it MUST NOT return rows that fail the binding. Unauthorized callers still receive the nondisclosing REFERENCE_NOT_FOUND. The revision's metadata stays listed in the ledger. The issue is retired when exact reads again return content that matches the committed binding, or when the revision's status_retention_days window ends. A seller MUST NOT retire it by serving different content under the same reporting_revision_id. Because an official revision cannot be superseded, an obligation whose official revision is lost does not become complete."
},
"additionalProperties": false
}
diff --git a/static/schemas/source/core/version-envelope.json b/static/schemas/source/core/version-envelope.json
index ef3bae5f2ce..46e355a1a04 100644
--- a/static/schemas/source/core/version-envelope.json
+++ b/static/schemas/source/core/version-envelope.json
@@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "/schemas/core/version-envelope.json",
"title": "AdCP Version Envelope",
- "description": "Release-precision AdCP protocol version negotiation fields. Composed via `allOf` into every AdCP request and response schema so the version semantics live in exactly one place. Distinct from `core/protocol-envelope.json`, which wraps responses at the transport layer (context_id / task_id / status / payload). This envelope is part of the payload itself.",
+ "description": "Release-precision AdCP protocol version negotiation fields. Composed via `allOf` into AdCP request schemas and shared response components so the version semantics live in one place. Strict (`additionalProperties: false`) request schemas also redeclare these two fields in their own `properties` via `$ref`, because draft-07 does not evaluate properties across `allOf`. The Trusted Match match requests are the exception: they inline both fields for their strict privacy boundary. Distinct from `core/protocol-envelope.json`, which wraps responses at the transport layer (context_id / task_id / status / payload). This envelope is part of the payload itself.",
"type": "object",
"properties": {
"adcp_version": {
diff --git a/static/schemas/source/media-buy/accept-proposal-request.json b/static/schemas/source/media-buy/accept-proposal-request.json
index ef3eb708fd0..adcfec3ebb5 100644
--- a/static/schemas/source/media-buy/accept-proposal-request.json
+++ b/static/schemas/source/media-buy/accept-proposal-request.json
@@ -5,6 +5,7 @@
"description": "Accept one committed immutable proposal. Depending on proposal_kind, acceptance creates a MediaBuy, applies an amendment, or applies a negotiated cancellation. The proposal already contains the commercial terms, so callers do not repeat packages, dates, targeting, or creatives.",
"x-tool-summary": "Accept a committed proposal to create or amend a media buy, or apply a negotiated cancellation.",
"type": "object",
+ "allOf": [{ "$ref": "/schemas/core/version-envelope.json" }],
"x-mutates-state": true,
"x-governed-commitment": {
"scope": "conditional",
diff --git a/static/schemas/source/media-buy/buy-products-request.json b/static/schemas/source/media-buy/buy-products-request.json
index 07347b70d19..035df8566dc 100644
--- a/static/schemas/source/media-buy/buy-products-request.json
+++ b/static/schemas/source/media-buy/buy-products-request.json
@@ -157,6 +157,7 @@
}
],
"allOf": [
+ { "$ref": "/schemas/core/version-envelope.json" },
{
"not": {
"properties": {
diff --git a/static/schemas/source/media-buy/control-media-buy-request.json b/static/schemas/source/media-buy/control-media-buy-request.json
index 8857a247572..f33815858da 100644
--- a/static/schemas/source/media-buy/control-media-buy-request.json
+++ b/static/schemas/source/media-buy/control-media-buy-request.json
@@ -146,6 +146,7 @@
{ "required": ["reporting_webhook"] }
],
"allOf": [
+ { "$ref": "/schemas/core/version-envelope.json" },
{
"if": { "required": ["cancellation_reason"] },
"then": { "required": ["canceled"] }
diff --git a/static/schemas/source/media-buy/decline-proposals-request.json b/static/schemas/source/media-buy/decline-proposals-request.json
index 5d205768596..021f3597a31 100644
--- a/static/schemas/source/media-buy/decline-proposals-request.json
+++ b/static/schemas/source/media-buy/decline-proposals-request.json
@@ -5,6 +5,7 @@
"description": "Terminally decline one or more immutable proposals. Repeating an already-applied decline with a new idempotency key succeeds with outcome declined and preserves the first recorded reason and detail; the proposal cannot later be executed.",
"x-tool-summary": "Terminally decline one or more proposals and record the buyer's reason.",
"type": "object",
+ "allOf": [{ "$ref": "/schemas/core/version-envelope.json" }],
"x-mutates-state": true,
"x-operation-family": "decline_proposals",
"x-added-in": "3.2.0",
diff --git a/static/schemas/source/media-buy/list-products-request.json b/static/schemas/source/media-buy/list-products-request.json
index 2e80edb022b..1285513c63d 100644
--- a/static/schemas/source/media-buy/list-products-request.json
+++ b/static/schemas/source/media-buy/list-products-request.json
@@ -55,6 +55,7 @@
"if_pricing_version": ["if_feed_version"]
},
"allOf": [
+ { "$ref": "/schemas/core/version-envelope.json" },
{
"if": {
"properties": { "criteria": { "required": ["catalog"] } },
diff --git a/static/schemas/source/media-buy/refine-proposals-request.json b/static/schemas/source/media-buy/refine-proposals-request.json
index 21a1a707cb6..b30409de7e9 100644
--- a/static/schemas/source/media-buy/refine-proposals-request.json
+++ b/static/schemas/source/media-buy/refine-proposals-request.json
@@ -5,6 +5,7 @@
"description": "Create draft revisions or finalize draft proposals into held committed snapshots. Each result receives a new proposal_id and every source remains unchanged.",
"x-tool-summary": "Revise draft proposals or finalize them into committed, inventory-held snapshots.",
"type": "object",
+ "allOf": [{ "$ref": "/schemas/core/version-envelope.json" }],
"x-mutates-state": true,
"x-operation-family": "refine_proposals",
"x-added-in": "3.2.0",
diff --git a/static/schemas/source/media-buy/request-proposals-request.json b/static/schemas/source/media-buy/request-proposals-request.json
index c0c0ca62156..37e54a3ccfc 100644
--- a/static/schemas/source/media-buy/request-proposals-request.json
+++ b/static/schemas/source/media-buy/request-proposals-request.json
@@ -70,6 +70,7 @@
}
],
"allOf": [
+ { "$ref": "/schemas/core/version-envelope.json" },
{
"not": {
"properties": {
diff --git a/static/schemas/source/media-buy/sync-reporting-status-request.json b/static/schemas/source/media-buy/sync-reporting-status-request.json
index 9ba80efff4f..2bae6bc905d 100644
--- a/static/schemas/source/media-buy/sync-reporting-status-request.json
+++ b/static/schemas/source/media-buy/sync-reporting-status-request.json
@@ -6,6 +6,7 @@
"x-tool-summary": "Tell a seller whether expected reporting was received, omitted, missing, unreadable, or contradictory.",
"description": "Submit the authenticated consumer's operational reporting status for expected configuration periods. This is a batched idempotent append-only sync over seller-hosted task transport, not a webhook registration, measurement-data feed, or billing receipt. Identity comes from authenticated transport; the request MUST NOT assert a buyer or consumer principal.",
"type": "object",
+ "allOf": [{ "$ref": "/schemas/core/version-envelope.json" }],
"x-mutates-state": true,
"properties": {
"adcp_version": { "$ref": "/schemas/core/version-envelope.json#/properties/adcp_version" },
diff --git a/tests/build-schemas-hoist-by-identity.test.cjs b/tests/build-schemas-hoist-by-identity.test.cjs
new file mode 100644
index 00000000000..63164d5c27a
--- /dev/null
+++ b/tests/build-schemas-hoist-by-identity.test.cjs
@@ -0,0 +1,224 @@
+#!/usr/bin/env node
+/**
+ * Unit tests for hoistBySourceIdentity in scripts/build-schemas.cjs.
+ *
+ * The function resolves $refs like `resolveRefs`, except refs to listed
+ * source schemas (core/provenance.json) are written once to root $defs and
+ * every call-site becomes `{ $ref: "#/$defs/Provenance", ...siblings }`.
+ * Unlike `x-adcp-hoist`, call-site siblings (notably `description`) survive.
+ *
+ * See issue #4875.
+ */
+
+'use strict';
+
+const test = require('node:test');
+const assert = require('node:assert/strict');
+const fs = require('node:fs');
+const os = require('node:os');
+const path = require('node:path');
+
+const { hoistBySourceIdentity, resolveRefs, generateBundledSchemas } = require('../scripts/build-schemas.cjs');
+
+const PROV = '/schemas/core/provenance.json';
+
+function makeSourceDir() {
+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'hoist-identity-'));
+ fs.mkdirSync(path.join(dir, 'core'), { recursive: true });
+ fs.mkdirSync(path.join(dir, 'enums'), { recursive: true });
+ fs.writeFileSync(path.join(dir, 'enums/source-type.json'), JSON.stringify({
+ $schema: 'http://json-schema.org/draft-07/schema#',
+ $id: '/schemas/enums/source-type.json',
+ type: 'string',
+ enum: ['human', 'ai'],
+ }));
+ fs.writeFileSync(path.join(dir, 'core/provenance.json'), JSON.stringify({
+ $schema: 'http://json-schema.org/draft-07/schema#',
+ $id: PROV,
+ title: 'Provenance',
+ description: 'Declares how content was produced.',
+ type: 'object',
+ properties: { source_type: { $ref: '/schemas/enums/source-type.json' } },
+ }));
+ return dir;
+}
+
+test('hoists provenance to $defs and rewrites call-sites to a local $ref', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+ const schema = {
+ type: 'object',
+ properties: { a: { $ref: PROV }, b: { $ref: PROV } },
+ };
+ const result = hoistBySourceIdentity(schema, dir, [PROV]);
+
+ assert.deepEqual(result.properties.a, { $ref: '#/$defs/Provenance' });
+ assert.deepEqual(result.properties.b, { $ref: '#/$defs/Provenance' });
+ assert.equal(result.$defs.Provenance.title, 'Provenance');
+ assert.equal(result.$defs.Provenance.description, 'Declares how content was produced.');
+ assert.equal(result.$defs.Provenance.$schema, undefined);
+});
+
+test('preserves call-site description siblings', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+ const schema = {
+ properties: {
+ a: { $ref: PROV, description: 'overrides manifest-level provenance' },
+ b: { $ref: PROV },
+ },
+ };
+ const result = hoistBySourceIdentity(schema, dir, [PROV]);
+
+ assert.deepEqual(result.properties.a, {
+ $ref: '#/$defs/Provenance',
+ description: 'overrides manifest-level provenance',
+ });
+ // The $defs entry keeps provenance's own description, not a call-site one.
+ assert.equal(result.$defs.Provenance.description, 'Declares how content was produced.');
+});
+
+test('every distinct call-site description survives, including through nested file refs', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+ fs.mkdirSync(path.join(dir, 'core/assets'), { recursive: true });
+ fs.writeFileSync(path.join(dir, 'core/assets/image.json'), JSON.stringify({
+ $id: '/schemas/core/assets/image.json',
+ type: 'object',
+ properties: { provenance: { $ref: PROV, description: 'image-level override' } },
+ }));
+ const schema = {
+ properties: {
+ top: { $ref: PROV, description: 'artifact default' },
+ image: { $ref: '/schemas/core/assets/image.json' },
+ bare: { $ref: PROV },
+ },
+ };
+ const result = hoistBySourceIdentity(schema, dir, [PROV]);
+
+ assert.equal(result.properties.top.description, 'artifact default');
+ assert.equal(result.properties.image.properties.provenance.description, 'image-level override');
+ assert.equal(result.properties.image.properties.provenance.$ref, '#/$defs/Provenance');
+ assert.deepEqual(result.properties.bare, { $ref: '#/$defs/Provenance' });
+ assert.equal(Object.keys(result.$defs).length, 1);
+});
+
+test('refs inside the hoisted body are resolved inline', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+ const schema = { properties: { a: { $ref: PROV }, b: { $ref: PROV } } };
+ const result = hoistBySourceIdentity(schema, dir, [PROV]);
+
+ const inner = result.$defs.Provenance.properties.source_type;
+ assert.deepEqual(inner.enum, ['human', 'ai']);
+ assert.equal(inner.$ref, undefined);
+});
+
+test('no-op when the ref is absent or appears only once', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+
+ const absent = { properties: { a: { type: 'string' } } };
+ assert.deepEqual(hoistBySourceIdentity(absent, dir, [PROV]), absent);
+
+ // A single call-site is inlined exactly as `resolveRefs` would.
+ const once = { properties: { a: { $ref: PROV, description: 'only one' } } };
+ const result = hoistBySourceIdentity(once, dir, [PROV]);
+ assert.equal(result.$defs, undefined);
+ assert.deepEqual(result, resolveRefs(once, dir));
+});
+
+test('throws when root $defs already defines the target name', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+ const schema = {
+ $defs: { Provenance: { type: 'string' } },
+ properties: { a: { $ref: PROV }, b: { $ref: PROV } },
+ };
+ assert.throws(() => hoistBySourceIdentity(schema, dir, [PROV]), /already defines 'Provenance'/);
+});
+
+test('rejects fragment refs, non-/schemas/ refs, and untitled sources', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+ assert.throws(() => hoistBySourceIdentity({}, dir, [`${PROV}#/properties/x`]), /without a fragment/);
+ assert.throws(() => hoistBySourceIdentity({}, dir, ['core/provenance.json']), /without a fragment/);
+ fs.writeFileSync(path.join(dir, 'core/untitled.json'), JSON.stringify({ type: 'object' }));
+ assert.throws(() => hoistBySourceIdentity({}, dir, ['/schemas/core/untitled.json']), /usable `title`/);
+});
+
+test('ignores a listed ref whose source file does not exist', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+ const schema = { properties: { a: { type: 'string' } } };
+ assert.deepEqual(hoistBySourceIdentity(schema, dir, ['/schemas/core/missing.json']), schema);
+});
+
+test('hoists the repeated ref and inlines the singleton when several are listed', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+ fs.writeFileSync(path.join(dir, 'core/once.json'), JSON.stringify({
+ $id: '/schemas/core/once.json',
+ title: 'Once',
+ type: 'string',
+ }));
+ const schema = {
+ properties: {
+ a: { $ref: PROV }, b: { $ref: PROV }, c: { $ref: '/schemas/core/once.json', description: 'c' },
+ },
+ };
+ const result = hoistBySourceIdentity(schema, dir, [PROV, '/schemas/core/once.json']);
+
+ assert.deepEqual(Object.keys(result.$defs), ['Provenance']);
+ assert.deepEqual(result.properties.a, { $ref: '#/$defs/Provenance' });
+ assert.equal(result.properties.c.type, 'string');
+ assert.equal(result.properties.c.$ref, undefined);
+});
+
+test('resolveRefs without options still inlines every ref', (t) => {
+ const dir = makeSourceDir();
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
+ const result = resolveRefs({ properties: { a: { $ref: PROV, description: 'x' } } }, dir);
+ assert.equal(result.properties.a.title, 'Provenance');
+ assert.equal(result.properties.a.$ref, undefined);
+});
+
+test('generateBundledSchemas hoists provenance end to end and the bundle compiles', async (t) => {
+ const Ajv = require('ajv');
+ const dir = makeSourceDir();
+ const out = fs.mkdtempSync(path.join(os.tmpdir(), 'hoist-identity-out-'));
+ t.after(() => {
+ fs.rmSync(dir, { recursive: true, force: true });
+ fs.rmSync(out, { recursive: true, force: true });
+ });
+ const rel = path.join('media-buy', 'x-response.json');
+ fs.mkdirSync(path.join(dir, 'media-buy'), { recursive: true });
+ fs.writeFileSync(path.join(dir, rel), JSON.stringify({
+ $schema: 'http://json-schema.org/draft-07/schema#',
+ $id: '/schemas/media-buy/x-response.json',
+ type: 'object',
+ properties: {
+ a: { $ref: PROV, description: 'a-site' },
+ b: { $ref: PROV, description: 'b-site' },
+ },
+ }));
+
+ assert.deepEqual(await generateBundledSchemas(dir, out, '3.2.1'), { successCount: 1, errorCount: 0 });
+ const bundled = JSON.parse(fs.readFileSync(path.join(out, rel), 'utf8'));
+ assert.equal(bundled.properties.a.$ref, '#/$defs/Provenance');
+ assert.equal(bundled.properties.a.description, 'a-site');
+ assert.equal(bundled.properties.b.description, 'b-site');
+ assert.equal(bundled.$defs.Provenance.title, 'Provenance');
+
+ const validate = new Ajv({ strict: false }).compile(bundled);
+ assert.equal(validate({ a: { source_type: 'ai' }, b: {} }), true);
+ assert.equal(validate({ a: { source_type: 'robot' } }), false);
+});
+
+test('real source tree: core/provenance.json is hoisted (guards the missing-file skip)', () => {
+ const sourceDir = path.join(__dirname, '../static/schemas/source');
+ const schema = { properties: { a: { $ref: PROV }, b: { $ref: PROV } } };
+ const result = hoistBySourceIdentity(schema, sourceDir, [PROV]);
+ assert.equal(result.properties.a.$ref, '#/$defs/Provenance');
+ assert.equal(result.$defs.Provenance.title, 'Provenance');
+});
diff --git a/tests/composed-schema-validation.test.cjs b/tests/composed-schema-validation.test.cjs
index ceb2717bc1f..3a531a7e4e3 100644
--- a/tests/composed-schema-validation.test.cjs
+++ b/tests/composed-schema-validation.test.cjs
@@ -566,6 +566,69 @@ function testTypedDiscriminatedUnion(
}
}
+const VERSION_ENVELOPE_REF = '/schemas/core/version-envelope.json';
+
+// Request schemas that predate or sit outside the version-envelope convention.
+// This list is a ratchet: do not add to it. New request schemas MUST compose
+// core/version-envelope.json via a root allOf (issue #7892).
+const VERSION_ENVELOPE_EXEMPT_REQUESTS = new Map([
+ ['trusted-match/context-match-request.json', '3.1 holdover: inlines adcp_version (strict privacy boundary)'],
+ ['trusted-match/identity-match-request.json', '3.1 holdover: inlines adcp_version (strict privacy boundary)'],
+ ['brand/search-brands-request.json', 'pre-3.2 request with no version fields'],
+ ['creative/validate-input-request.json', 'pre-3.2 request with no version fields'],
+ ['core/get-geo-place-resolution-request.json', 'shared request component with no version fields'],
+ ['core/pagination-request.json', 'shared pagination component, not a task request']
+]);
+
+function listRequestSchemaFiles(dir = SCHEMA_BASE_DIR) {
+ const files = [];
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
+ const full = path.join(dir, entry.name);
+ // Generated mcp/2026-07-28/** tool schemas are self-contained by
+ // construction (MCP tool input schemas cannot carry external $refs), so
+ // inlining there is correct. Skip it if it ever appears under source/.
+ if (entry.isDirectory()) {
+ if (entry.name !== 'mcp') files.push(...listRequestSchemaFiles(full));
+ } else if (entry.name.endsWith('-request.json')) {
+ files.push(full);
+ }
+ }
+ return files;
+}
+
+function versionEnvelopeCompositionErrors() {
+ const errors = [];
+ const seenExempt = new Set();
+ for (const file of listRequestSchemaFiles()) {
+ const rel = path.relative(SCHEMA_BASE_DIR, file).split(path.sep).join('/');
+ const schema = JSON.parse(fs.readFileSync(file, 'utf8'));
+ const composesEnvelope = Array.isArray(schema.allOf) &&
+ schema.allOf.some((arm) => arm && arm.$ref === VERSION_ENVELOPE_REF);
+ if (VERSION_ENVELOPE_EXEMPT_REQUESTS.has(rel)) {
+ seenExempt.add(rel);
+ if (composesEnvelope) errors.push(`${rel}: now composes the envelope, remove it from the exemption list`);
+ continue;
+ }
+ if (!composesEnvelope) {
+ errors.push(`${rel}: root allOf must $ref ${VERSION_ENVELOPE_REF}`);
+ continue;
+ }
+ // draft-07 does not evaluate properties across allOf, so a strict root
+ // must keep the envelope fields declared locally.
+ if (schema.additionalProperties === false) {
+ for (const field of ['adcp_version', 'adcp_major_version']) {
+ if (schema.properties?.[field]?.$ref !== `${VERSION_ENVELOPE_REF}#/properties/${field}`) {
+ errors.push(`${rel}: additionalProperties:false root must declare ${field} as a $ref to the envelope property`);
+ }
+ }
+ }
+ }
+ for (const rel of VERSION_ENVELOPE_EXEMPT_REQUESTS.keys()) {
+ if (!seenExempt.has(rel)) errors.push(`${rel}: stale exemption (file no longer exists)`);
+ }
+ return errors;
+}
+
async function runTests() {
log('Testing Composed Schema Validation (allOf patterns)', 'info');
log('====================================================');
@@ -7524,6 +7587,59 @@ async function runTests() {
}
log('');
+ // Version envelope composition (#7892, #7919)
+ log('Version envelope composition:', 'info');
+ totalTests++;
+ const envelopeErrors = versionEnvelopeCompositionErrors();
+ if (envelopeErrors.length === 0) {
+ log(' \u2713 Every request schema composes core/version-envelope.json via root allOf', 'success');
+ passedTests++;
+ } else {
+ log(' \u2717 Request schemas not composing core/version-envelope.json:', 'error');
+ for (const error of envelopeErrors) log(` ${error}`, 'error');
+ failedTests++;
+ }
+ await testSchemaValidation(
+ '/schemas/media-buy/decline-proposals-request.json',
+ {
+ adcp_version: '3.2',
+ adcp_major_version: 3,
+ idempotency_key: 'decline-proposals-envelope-0001',
+ declines: [{ proposal_id: 'proposal-1', reason: 'inventory_fit' }]
+ },
+ 'Strict compact request accepts envelope fields alongside allOf composition'
+ );
+ await testSchemaRejection(
+ '/schemas/media-buy/decline-proposals-request.json',
+ {
+ adcp_version: '03.2',
+ idempotency_key: 'decline-proposals-envelope-0001',
+ declines: [{ proposal_id: 'proposal-1', reason: 'inventory_fit' }]
+ },
+ 'Strict compact request still rejects a malformed adcp_version'
+ );
+ await testSchemaValidation(
+ '/schemas/core/compact-task-submitted.json',
+ { adcp_version: '3.2', status: 'submitted', task_id: 'task_123', message: 'Queued' },
+ 'Compact submitted arm accepts version and protocol envelope fields'
+ );
+ await testSchemaRejection(
+ '/schemas/core/compact-task-submitted.json',
+ { adcp_version: '3.2.1', status: 'submitted', task_id: 'task_123' },
+ 'Compact submitted arm rejects a malformed adcp_version'
+ );
+ await testSchemaRejection(
+ '/schemas/core/compact-task-submitted.json',
+ { status: 'completed', task_id: 'task_123' },
+ 'Compact submitted arm rejects non-submitted status'
+ );
+ await testSchemaRejection(
+ '/schemas/core/compact-task-submitted.json',
+ { status: 'submitted', task_id: 'task_123', task_status: 'submitted' },
+ 'Compact submitted arm rejects the legacy task_status field via protocol-envelope'
+ );
+ log('');
+
// Print results
log('====================================================');
log(`Tests completed: ${totalTests}`);
diff --git a/tests/governance-conditions-storyboard.test.cjs b/tests/governance-conditions-storyboard.test.cjs
index 3ad5f0f8b12..4510c967f29 100644
--- a/tests/governance-conditions-storyboard.test.cjs
+++ b/tests/governance-conditions-storyboard.test.cjs
@@ -38,7 +38,7 @@ test('governance conditions require a later approved intent before mutation', ()
const ids = orderedSteps.map((step) => step.id);
const steps = stepsById(doc);
- assert.deepEqual(doc.requires, ['multi_agent']);
+ assert.deepEqual(doc.requires, ['multi_agent', 'controller']);
assert.equal(doc.default_agent, 'sales');
assert.deepEqual(doc.requires_capability, {
path: 'adcp.governance_enforcement.tasks',
@@ -155,7 +155,7 @@ test('governance approved flow grades signed intent and durable state', () => {
const readback = steps.get('get_media_buys_readback');
const outcome = steps.get('report_plan_outcome');
- assert.deepEqual(doc.requires, ['multi_agent']);
+ assert.deepEqual(doc.requires, ['multi_agent', 'controller']);
assert.equal(doc.default_agent, 'sales');
assert.deepEqual(doc.requires_capability, {
path: 'adcp.governance_enforcement.tasks',
diff --git a/tests/governance-storyboard-routing.test.cjs b/tests/governance-storyboard-routing.test.cjs
index 802b8dfc550..3f0b16baed2 100644
--- a/tests/governance-storyboard-routing.test.cjs
+++ b/tests/governance-storyboard-routing.test.cjs
@@ -28,7 +28,7 @@ for (const scenarioName of SCENARIOS) {
(step) => ['check_governance', 'report_plan_outcome'].includes(step.task),
);
- assert.deepEqual(scenario.requires, ['multi_agent']);
+ assert.deepEqual(scenario.requires, ['multi_agent', 'controller']);
assert.equal(scenario.default_agent, 'sales');
assert.equal(syncPlans.agent, 'governance');
assert.ok(
diff --git a/tests/lint-storyboard-controller-requires.test.cjs b/tests/lint-storyboard-controller-requires.test.cjs
new file mode 100644
index 00000000000..407e0ae1688
--- /dev/null
+++ b/tests/lint-storyboard-controller-requires.test.cjs
@@ -0,0 +1,95 @@
+#!/usr/bin/env node
+/**
+ * Tests for the storyboard controller-requires lint.
+ */
+
+'use strict';
+
+const fs = require('node:fs');
+const os = require('node:os');
+const path = require('node:path');
+const test = require('node:test');
+const assert = require('node:assert/strict');
+
+const { lint } = require('../scripts/lint-storyboard-controller-requires.cjs');
+
+test('source tree passes the controller-requires lint', () => {
+ const violations = lint();
+ assert.deepEqual(
+ violations,
+ [],
+ 'storyboards set controller_seeding: true without requires: [controller]:\n' +
+ violations.map((v) => ` ${v.file}`).join('\n'),
+ );
+});
+
+function lintDoc(doc) {
+ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'controller-requires-lint-'));
+ fs.writeFileSync(path.join(tmp, 'temp.yaml'), doc);
+ try {
+ return lint(tmp);
+ } finally {
+ fs.rmSync(tmp, { recursive: true, force: true });
+ }
+}
+
+test('controller_seeding without requires — flagged', () => {
+ const violations = lintDoc(`
+id: temp_storyboard
+prerequisites:
+ controller_seeding: true
+phases: []
+`);
+ assert.equal(violations.length, 1);
+ assert.equal(violations[0].rule, 'controller_seeding_without_requires_controller');
+});
+
+test('controller_seeding with requires lacking controller — flagged', () => {
+ const violations = lintDoc(`
+id: temp_storyboard
+requires: [multi_agent]
+prerequisites:
+ controller_seeding: true
+phases: []
+`);
+ assert.equal(violations.length, 1);
+});
+
+test('controller_seeding with requires: [controller] — clean', () => {
+ assert.deepEqual(
+ lintDoc(`
+id: temp_storyboard
+requires:
+ - multi_agent
+ - controller
+prerequisites:
+ controller_seeding: true
+phases: []
+`),
+ [],
+ );
+});
+
+test('controller_seeding: false or absent — clean', () => {
+ assert.deepEqual(
+ lintDoc(`
+id: temp_storyboard
+prerequisites:
+ controller_seeding: false
+phases: []
+`),
+ [],
+ );
+ assert.deepEqual(lintDoc('id: temp_storyboard\nphases: []\n'), []);
+});
+
+test('requires given as a scalar string — flagged (schema requires a list)', () => {
+ const violations = lintDoc(`
+id: temp_storyboard
+requires: controller
+prerequisites:
+ controller_seeding: true
+phases: []
+`);
+ assert.equal(violations.length, 1);
+});
diff --git a/tests/lint-version-envelope.test.cjs b/tests/lint-version-envelope.test.cjs
index aa592bdf170..83fb1bbb90a 100644
--- a/tests/lint-version-envelope.test.cjs
+++ b/tests/lint-version-envelope.test.cjs
@@ -15,10 +15,15 @@
* This lint enforces the invariant so future contributors don't reintroduce
* the regression.
*
+ * A strict root is allowed when it also redeclares `adcp_version` and
+ * `adcp_major_version` in its own `properties` as `$ref`s to the envelope
+ * (the compact 3.2 requests do this), because draft-07 then sees both fields
+ * locally.
+ *
* Scope: this lint inspects only the schema's root `allOf` array. Schemas
- * that need strict-mode (e.g. trusted-match/identity-match-request.json's privacy
- * boundary) intentionally don't compose the envelope via allOf — they
- * inline `adcp_version` / `adcp_major_version` in `properties`. The lint
+ * that need strict-mode without redeclaring the fields (e.g.
+ * trusted-match/identity-match-request.json's privacy boundary)
+ * intentionally don't compose the envelope via allOf — they inline `adcp_version` / `adcp_major_version` in `properties`. The lint
* does not (and should not) detect indirect composition through `oneOf`
* branches, `definitions`/`$defs`, or nested allOf — those patterns are
* not used in AdCP today and adding them would rightly trigger this lint
@@ -55,7 +60,7 @@ function usesVersionEnvelope(schema) {
);
}
-test('every schema that allOfs the version envelope has permissive additionalProperties at root', () => {
+test('every schema that allOfs the version envelope is permissive or redeclares the envelope fields', () => {
const violations = [];
for (const file of listJsonFiles(SOURCE_DIR)) {
let schema;
@@ -66,8 +71,13 @@ test('every schema that allOfs the version envelope has permissive additionalPro
}
if (!usesVersionEnvelope(schema)) continue;
- const ap = schema.additionalProperties;
- if (ap === false) {
+ // A strict root is safe only when it redeclares both envelope fields in
+ // its own properties as $refs to the envelope (draft-07 does not evaluate
+ // properties across allOf).
+ const declaresEnvelopeFields = ['adcp_version', 'adcp_major_version'].every(
+ (field) => schema.properties?.[field]?.$ref === `${ENVELOPE_REF}#/properties/${field}`,
+ );
+ if (schema.additionalProperties === false && !declaresEnvelopeFields) {
violations.push({
file: path.relative(path.resolve(__dirname, '..'), file),
reason: 'additionalProperties: false at root rejects envelope fields',
@@ -79,7 +89,7 @@ test('every schema that allOfs the version envelope has permissive additionalPro
violations,
[],
'Schemas with allOf $ref to version-envelope.json MUST have ' +
- 'additionalProperties: true (or absent) at root. draft-07 allOf does ' +
+ 'additionalProperties: true (or absent) at root, or redeclare adcp_version and adcp_major_version in properties. draft-07 allOf does ' +
'not bypass parent strict-mode. Violations:\n' +
violations.map((v) => ` ${v.file} — ${v.reason}`).join('\n'),
);
diff --git a/tests/reporting-status-contract.test.cjs b/tests/reporting-status-contract.test.cjs
index d67986078ce..79008d02222 100644
--- a/tests/reporting-status-contract.test.cjs
+++ b/tests/reporting-status-contract.test.cjs
@@ -1157,7 +1157,37 @@ describe('managed reporting status contract', () => {
recommended_action: 'wait_for_retry',
}), true, JSON.stringify(validateStatusIssue.errors));
+ // A retained revision that cannot be served names the exact revision and
+ // obligation, and is always the seller's to repair.
+ const unreadableIssue = {
+ issue_id: 'issue_revision_unreadable_20260826',
+ code: 'REVISION_UNREADABLE',
+ severity: 'delayed',
+ responsible_party: 'seller',
+ recommended_action: 'wait_for_retry',
+ reporting_obligation_id: 'obl_daily_share_20260826',
+ reporting_revision_id: 'rev_daily_share_20260826_snapshot_3',
+ };
+ assert.equal(validateStatusIssue(unreadableIssue), true, JSON.stringify(validateStatusIssue.errors));
+ assert.equal(validateStatusIssue({ ...unreadableIssue, severity: 'action_required', recommended_action: 'contact_seller' }), true, JSON.stringify(validateStatusIssue.errors));
+ const { reporting_revision_id: _revisionId, ...unreadableWithoutRevision } = unreadableIssue;
+ assert.equal(validateStatusIssue(unreadableWithoutRevision), false);
+ const { reporting_obligation_id: _obligationId, ...unreadableWithoutObligation } = unreadableIssue;
+ assert.equal(validateStatusIssue(unreadableWithoutObligation), false);
+ assert.equal(validateStatusIssue({ ...unreadableIssue, responsible_party: 'provider' }), false);
+ assert.equal(validateStatusIssue({ ...unreadableIssue, recommended_action: 'repair_access' }), false);
+ // Severity and action move together so buyers stop retrying once repair stops.
+ assert.equal(validateStatusIssue({ ...unreadableIssue, recommended_action: 'contact_seller' }), false);
+ assert.equal(validateStatusIssue({ ...unreadableIssue, severity: 'action_required' }), false);
+
const issueSchema = readSchema('/schemas/core/reporting-status-issue.json');
+ assert.match(issueSchema['x-adcp-validation'].revision_unreadable, /MUST return SERVICE_UNAVAILABLE\. It MUST NOT return REFERENCE_NOT_FOUND/);
+ assert.match(issueSchema['x-adcp-validation'].revision_unreadable, /Unauthorized callers still receive the nondisclosing REFERENCE_NOT_FOUND/);
+ assert.match(issueSchema['x-adcp-validation'].revision_unreadable, /obligation whose official revision is lost does not become complete/);
+ assert.match(
+ readSchema('/schemas/core/reporting-obligation.json')['x-adcp-validation'].core_readability,
+ /open REVISION_UNREADABLE issue for any revision of the obligation also blocks healthy and complete/,
+ );
assert.match(issueSchema['x-adcp-validation'].issue_lifecycle, /MUST NOT advance while the same issue_id is re-emitted/);
assert.match(issueSchema['x-adcp-validation'].consumer_mismatch_escalation, /recommended_action in the contact_ family/);
assert.match(issueSchema['x-adcp-validation'].consumer_mismatch_escalation, /wait_for_retry MUST NOT survive the escalation boundary/);
@@ -1353,7 +1383,13 @@ describe('managed reporting status contract', () => {
);
const syncRequestSchema = readSchema('/schemas/media-buy/sync-reporting-status-request.json');
assert.equal(syncRequestSchema.additionalProperties, false);
- assert.equal(syncRequestSchema.allOf, undefined, 'closed request inlines version properties instead of composing a permissive envelope');
+ assert.ok(
+ (syncRequestSchema.allOf || []).some((arm) => arm.$ref === '/schemas/core/version-envelope.json'),
+ 'closed request composes the version envelope via root allOf',
+ );
+ for (const field of ['adcp_version', 'adcp_major_version']) {
+ assert.ok(syncRequestSchema.properties[field], `closed request keeps ${field} declared locally for draft-07 additionalProperties`);
+ }
});
it('rejects unverified, mutable, and method-mismatched ready materializations while allowing native controls', () => {
diff --git a/tests/request-signing-profile-3.2-vectors.test.cjs b/tests/request-signing-profile-3.2-vectors.test.cjs
index 59b635e0c30..10a167097da 100644
--- a/tests/request-signing-profile-3.2-vectors.test.cjs
+++ b/tests/request-signing-profile-3.2-vectors.test.cjs
@@ -54,9 +54,42 @@ const HAND_AUTHORED = new Set([
]);
const generated = profileAll.filter(entry => !HAND_AUTHORED.has(entry.id));
+// Step-0/1 mirrors with no Signature-Input at all: unsigned requests (pre-check 0) and a
+// Signature whose Signature-Input was stripped (019).
+const NO_SIGNATURE_INPUT = new Set([
+ '001-no-signature-header',
+ '019-signature-without-signature-input',
+ '027-webhook-registration-authentication-unsigned',
+ '028-unsigned-protocol-method-required',
+]);
+const UNSIGNED = new Set([
+ '001-no-signature-header',
+ '027-webhook-registration-authentication-unsigned',
+ '028-unsigned-protocol-method-required',
+]);
+// 011's Signature-Input is unparseable, so no signature base exists and the placeholder stays.
+const UNPARSEABLE_INPUT = new Set(['011-malformed-header']);
+// Step-1 mirrors whose fault is independent of the signature bytes carry a real signature,
+// so the step-1 fault is the vector's only fault.
+const REAL_SIGNATURE_STEP1 = new Set([
+ '019-signature-without-signature-input',
+ '021-duplicate-signature-input-label',
+ '022-multi-valued-content-type',
+ '023-multi-valued-content-digest',
+ '024-unquoted-string-param',
+ '026-non-ascii-host',
+ '029-duplicate-signature-label',
+ '030-content-digest-key-case',
+ '031-malformed-host-authority',
+]);
+const MIRRORED_PRECHECK = new Set([...UNSIGNED, ...UNPARSEABLE_INPUT, ...REAL_SIGNATURE_STEP1]);
+const MULTI_VALUED_DIGEST = new Set(['023-multi-valued-content-digest', '030-content-digest-key-case']);
+
+const slugKey = id => path.basename(id);
+
/** Split the sig1 member of a Signature-Input header into components + raw params. */
function parseSig1Input(header) {
- const match = /^sig1=(\(([^)]*)\)[^,]*)/.exec(header);
+ const match = header === undefined ? null : /^sig1=(\(([^)]*)\)[^,]*)/.exec(header);
if (!match) return undefined;
const components = match[2].split(' ').filter(Boolean).map(c => JSON.parse(c));
const params = Object.fromEntries(
@@ -67,14 +100,14 @@ function parseSig1Input(header) {
.map(part => {
const eq = part.indexOf('=');
const raw = part.slice(eq + 1);
- return [part.slice(0, eq), raw.startsWith('"') ? JSON.parse(raw) : Number(raw)];
+ return [part.slice(0, eq), raw.startsWith('"') ? JSON.parse(raw) : Number.isNaN(Number(raw)) ? raw : Number(raw)];
})
);
return { serialized: match[1], components, params };
}
function sig1Bytes(header) {
- const token = /^sig1=:([^:]*):/.exec(header)?.[1];
+ const token = header === undefined ? undefined : /^sig1=:([^:]*):/.exec(header)?.[1];
assert.ok(token !== undefined, 'Signature must carry a sig1 sf-binary member');
return { token, bytes: Buffer.from(token, 'base64') };
}
@@ -122,7 +155,15 @@ function jwksFor(vector) {
});
}
-async function sdkVerify(vector) {
+// Operation the SDK resolves for vectors that are not create_media_buy; 028 is a JSON-RPC protocol method.
+const SDK_OPERATION = {
+ 'negative/011-malformed-header': 'sync_creatives',
+ 'negative/027-webhook-registration-authentication-unsigned': 'update_media_buy',
+ 'negative/028-unsigned-protocol-method-required': undefined,
+};
+
+async function sdkVerify(vector, id) {
+ const relId = id.replace(/^profile-3\.2\//, '');
const replayStore = new InMemoryReplayStore();
const revocationStore = new InMemoryRevocationStore();
const state = vector.test_harness_state ?? {};
@@ -142,17 +183,27 @@ async function sdkVerify(vector) {
replayStore,
revocationStore,
now: () => vector.reference_now,
- operation: 'create_media_buy',
+ operation: relId in SDK_OPERATION ? SDK_OPERATION[relId] : 'create_media_buy',
adcpVersion: '3.2',
}
);
}
+// @adcp/sdk 14.2.0 in adcpVersion '3.2' mode converts a raw IDN U-label to its A-label instead of
+// rejecting it (docs/reference/url-canonicalization.mdx: the comparer MUST reject raw non-ASCII), so it
+// verifies the single-fault 026 mirror, and it derives @authority from the URL rather than the Host header, so
+// it verifies 031. Both are sibling-repo (adcp-client) fixes; remove an entry when the SDK rejects the vector.
+const SDK_KNOWN_GAPS = {
+ '026-non-ascii-host': '@adcp/sdk 14.2.0 (adcpVersion 3.2) verifies a raw U-label host instead of rejecting it',
+ '031-malformed-host-authority': '@adcp/sdk 14.2.0 (adcpVersion 3.2) derives @authority from the URL and ignores the malformed Host header',
+};
+
describe('AdCP 3.2 request-signing corpus covers content-digest (adcp#7733)', () => {
it('mirrors every legacy positive vector under the same number and slug', () => {
const files = new Set(profilePositive.map(e => e.file));
// In 3.2 a basic POST is a POST with content-digest: root 001 and 002 both
- // map onto the hand-authored profile-3.2/positive/001.
+ // map onto the hand-authored profile-3.2/positive/001. The absence of
+ // positive/001-basic-post is by design.
const COLLAPSED = new Set(['001-basic-post.json', '002-post-with-content-digest.json']);
assert.ok(files.has('001-post-with-content-digest.json'));
for (const { file } of legacyPositive) {
@@ -161,22 +212,36 @@ describe('AdCP 3.2 request-signing corpus covers content-digest (adcp#7733)', ()
}
});
- it('mirrors every legacy negative for checklist steps 2–12 under the same number and slug', () => {
+ it('mirrors every legacy negative under the same number and slug, except those for postures 3.2 forbids', () => {
const files = new Set(profileNegative.map(e => e.file));
+ const unmirrored = [];
for (const { file, vector } of legacyNegative) {
- const step = String(vector.expected_outcome.failed_step);
- const inSteps2to12 = /^([2-9]|1[0-2])a?$/.test(step);
// 'forbidden' is a legacy-only posture a 3.2 verifier cannot advertise.
- if (!inSteps2to12 || vector.verifier_capability.covers_content_digest === 'forbidden') continue;
+ if (vector.verifier_capability.covers_content_digest === 'forbidden') {
+ assert.ok(!files.has(file), `negative/${file} grades a posture 3.2 forbids and must not be mirrored`);
+ unmirrored.push(file);
+ continue;
+ }
assert.ok(files.has(file), `negative/${file} has no profile-3.2 counterpart with the same number and slug`);
}
+ assert.deepEqual(unmirrored, ['018-digest-covered-when-forbidden.json']);
});
it('keeps generated negatives as step-ordering canaries: pre-crypto steps carry the zero placeholder', () => {
for (const { id, vector } of generated.filter(e => e.id.includes('/negative/'))) {
+ const key = slugKey(id);
const step = vector.expected_outcome.failed_step;
- const preCrypto = step === '9a' || (typeof step === 'number' && step < 10);
+ if (UNSIGNED.has(key)) {
+ assert.equal(vector.request.headers.Signature, undefined, `${id} must stay unsigned`);
+ assert.equal(vector.request.headers['Signature-Input'], undefined, `${id} must stay unsigned`);
+ continue;
+ }
const zero = sig1Bytes(vector.request.headers.Signature).bytes.equals(Buffer.alloc(64));
+ if (REAL_SIGNATURE_STEP1.has(key)) {
+ assert.ok(!zero, `${id} must carry a real signature so the step-1 fault is its only fault`);
+ continue;
+ }
+ const preCrypto = step === '9a' || (typeof step === 'number' && step < 10);
if (preCrypto) assert.ok(zero, `${id} (step ${step}) must carry the zero placeholder signature`);
else if (vector.expected_outcome.error_code !== 'request_signature_invalid') {
assert.ok(!zero, `${id} (step ${step}) must carry a real signature so only the targeted check fails`);
@@ -189,6 +254,12 @@ describe('AdCP 3.2 request-signing corpus covers content-digest (adcp#7733)', ()
assert.equal(vector.signing_profile_version, '3.2', id);
assert.equal(vector.verifier_capability.covers_content_digest, 'required', id);
const parsed = parseSig1Input(vector.request.headers['Signature-Input']);
+ if (!parsed) {
+ // Only the vectors whose fault is the absence or unparseability of Signature-Input have none to inspect.
+ const key = slugKey(id);
+ assert.ok(NO_SIGNATURE_INPUT.has(key) || UNPARSEABLE_INPUT.has(key) || HAND_AUTHORED.has(id), `${id} has no parseable Signature-Input`);
+ continue;
+ }
const missingDigestCase = vector.expected_outcome.error_code === 'request_signature_components_incomplete'
&& slugOf(path.basename(id)) === 'missing-content-digest';
assert.equal(parsed.components.includes('content-digest'), !missingDigestCase, `${id} content-digest coverage`);
@@ -198,7 +269,13 @@ describe('AdCP 3.2 request-signing corpus covers content-digest (adcp#7733)', ()
it('uses RFC 8941 standard padded Base64 for every sf-binary value in generated vectors', () => {
for (const { id, vector } of generated) {
for (const name of ['Signature', 'Content-Digest']) {
- for (const token of vector.request.headers[name].matchAll(/:([^:]*):/g)) {
+ const value = vector.request.headers[name];
+ if (value === undefined) {
+ assert.equal(name, 'Signature', `${id} must carry a Content-Digest`);
+ assert.ok(UNSIGNED.has(slugKey(id)), `${id} must carry a Signature`);
+ continue;
+ }
+ for (const token of value.matchAll(/:([^:]*):/g)) {
assert.match(token[1], /^[A-Za-z0-9+/]*={0,2}$/, `${id} ${name}`);
assert.equal(token[1].length % 4, 0, `${id} ${name} must be padded`);
}
@@ -209,10 +286,50 @@ describe('AdCP 3.2 request-signing corpus covers content-digest (adcp#7733)', ()
it('carries a Content-Digest equal to sha-256 of the body, except the digest-mismatch vector', () => {
for (const { id, vector } of profileAll) {
const expected = `sha-256=:${crypto.createHash('sha256').update(vector.request.body, 'utf8').digest('base64')}:`;
+ const actual = vector.request.headers['Content-Digest'];
if (vector.expected_outcome.error_code === 'request_signature_digest_mismatch') {
- assert.notEqual(vector.request.headers['Content-Digest'], expected, id);
+ assert.notEqual(actual, expected, id);
+ } else if (MULTI_VALUED_DIGEST.has(slugKey(id))) {
+ // Both members are the correct digest; the repeated algorithm (or its case) is the vector's only fault.
+ const members = [expected, expected];
+ if (slugKey(id) === '030-content-digest-key-case') members[0] = members[0].replace(/^sha-256/, 'SHA-256');
+ assert.equal(actual, members.join(', '), id);
+ } else if (id === 'profile-3.2/positive/014-content-digest-two-algorithms') {
+ // Two distinct algorithms, both correct (positive/014).
+ const sha512 = `sha-512=:${crypto.createHash('sha512').update(vector.request.body, 'utf8').digest('base64')}:`;
+ assert.equal(actual, `${expected}, ${sha512}`, id);
} else if (!HAND_AUTHORED.has(id) || id.includes('positive')) {
- assert.equal(vector.request.headers['Content-Digest'], expected, id);
+ assert.equal(actual, expected, id);
+ }
+ }
+ });
+
+ it('carries the Host header that the 031 fault and the 015 guard depend on', () => {
+ const host = id => profileAll.find(e => e.id === id).vector.request.headers.Host;
+ assert.equal(host('profile-3.2/negative/031-malformed-host-authority'), '::1');
+ assert.equal(host('profile-3.2/positive/015-bracketed-ipv6-host-with-port'), '[2001:db8::1]:8443');
+ });
+
+ it('gives every step-0/1 and header/authority mirror a single fault: real signature over the base as sent, digest covered', () => {
+ const step01 = generated.filter(e => e.id.includes('/negative/') && MIRRORED_PRECHECK.has(slugKey(e.id)));
+ assert.deepEqual(
+ step01.map(e => slugKey(e.id)).sort(),
+ [...MIRRORED_PRECHECK].sort(),
+ 'the step-0/1 mirrors must be exactly the registered set'
+ );
+ for (const { id, vector } of step01) {
+ const key = slugKey(id);
+ assert.ok(vector.request.headers['Content-Digest'], `${id} must send a Content-Digest`);
+ if (UNSIGNED.has(key)) continue;
+ if (UNPARSEABLE_INPUT.has(key)) continue;
+ assert.ok(REAL_SIGNATURE_STEP1.has(key), `${id} is a step-1 mirror and must be registered as carrying a real signature`);
+ const parsed = parseSig1Input(vector.request.headers['Signature-Input']);
+ if (parsed) {
+ assert.ok(parsed.components.includes('content-digest'), `${id} must cover content-digest`);
+ } else {
+ // 019: the stripped Signature-Input is described by the committed base, which must cover content-digest.
+ assert.match(vector.expected_signature_base, /^"content-digest": /m, `${id} committed base must cover content-digest`);
+ assert.match(vector.expected_signature_base, /^"@signature-params": \(.*"content-digest".*\);/m, id);
}
}
});
@@ -220,29 +337,55 @@ describe('AdCP 3.2 request-signing corpus covers content-digest (adcp#7733)', ()
describe('AdCP 3.2 request-signing vectors verify independently', () => {
for (const { id, vector } of generated) {
- const signed = !/^A+==$/.test(sig1Bytes(vector.request.headers.Signature).token);
+ const key = slugKey(id);
+ const tokenOf = vector.request.headers.Signature === undefined ? undefined : sig1Bytes(vector.request.headers.Signature).token;
+ const signed = tokenOf !== undefined && !/^A+==$/.test(tokenOf);
- it(`${id}: recomputed signature base matches and signature ${signed ? 'verifies' : 'is the zero placeholder'}`, () => {
- const base = independentBase(vector);
- if (vector.expected_signature_base !== undefined) assert.equal(base, vector.expected_signature_base);
+ it(`${id}: recomputed signature base matches and signature ${signed ? 'verifies' : 'is absent or the zero placeholder'}`, () => {
+ if (UNSIGNED.has(key)) {
+ assert.equal(vector.expected_signature_base, undefined);
+ assert.equal(vector.expected_outcome.success, false);
+ return;
+ }
+ const hasInput = parseSig1Input(vector.request.headers['Signature-Input']) !== undefined;
const { bytes } = sig1Bytes(vector.request.headers.Signature);
if (!signed) {
assert.ok(bytes.equals(Buffer.alloc(64)), 'placeholder must be 64 zero bytes');
assert.equal(vector.expected_outcome.success, false, 'positive vectors must be really signed');
return;
}
- const kid = parseSig1Input(vector.request.headers['Signature-Input']).params.keyid;
+ let base;
+ if (key === '026-non-ascii-host') {
+ // The raw U-label cannot be canonicalized by a conformant verifier; the signed base uses the A-label.
+ // WHATWG URL ToASCII of the wire URL must equal the signed @target-uri / @authority.
+ base = vector.expected_signature_base;
+ const wire = new URL(vector.request.url);
+ assert.ok(/[^\x00-\x7f]/.test(vector.request.url.split('/')[2]), 'wire URL must carry a raw non-ASCII host');
+ const baseLines = base.split('\n');
+ assert.ok(baseLines.includes(`"@target-uri": https://${wire.hostname}${wire.pathname}`), `${id} base must carry the A-label @target-uri`);
+ assert.ok(baseLines.includes(`"@authority": ${wire.hostname}`), `${id} base must carry the A-label @authority`);
+ } else if (hasInput) {
+ base = independentBase(vector);
+ if (vector.expected_signature_base !== undefined) assert.equal(base, vector.expected_signature_base);
+ } else {
+ // 019: Signature-Input was stripped; the committed base is the one it would have described.
+ base = vector.expected_signature_base;
+ assert.ok(base, `${id} must commit the base the stripped Signature-Input described`);
+ }
+ const kidSource = hasInput ? vector.request.headers['Signature-Input'] : /keyid="([^"]+)"/.exec(base)[0];
+ const kid = /keyid="?([^";]+)"?/.exec(kidSource)[1];
assert.equal(cryptoVerify(keys.find(k => k.kid === kid), base, bytes), true);
});
- it(`${id}: @adcp/sdk 3.2 verifier returns the expected outcome`, async () => {
+ const sdkTest = SDK_KNOWN_GAPS[key] ? { todo: SDK_KNOWN_GAPS[key] } : {};
+ it(`${id}: @adcp/sdk 3.2 verifier returns the expected outcome`, sdkTest, async () => {
const outcome = vector.expected_outcome;
if (outcome.success) {
- const result = await sdkVerify(vector);
+ const result = await sdkVerify(vector, id);
assert.equal(result.status, 'verified');
return;
}
- await assert.rejects(sdkVerify(vector), err => {
+ await assert.rejects(sdkVerify(vector, id), err => {
assert.equal(err.code, outcome.error_code);
return true;
});
diff --git a/tests/sdk-runner-capability-gates.test.cjs b/tests/sdk-runner-capability-gates.test.cjs
index 50ff5bd94e3..99bcefb1541 100644
--- a/tests/sdk-runner-capability-gates.test.cjs
+++ b/tests/sdk-runner-capability-gates.test.cjs
@@ -7,7 +7,7 @@ const fs = require('node:fs');
const path = require('node:path');
const YAML = require('yaml');
-const { runStoryboard } = require('@adcp/sdk/testing');
+const { parseStoryboard, runStoryboard } = require('@adcp/sdk/testing');
const mediaBuyScenariosPath = path.join(
__dirname,
@@ -55,7 +55,7 @@ test('evaluator capability contract grades individual experimental feature decla
})),
}],
};
- const tools = ['get_adcp_capabilities', ...storyboard.required_tools];
+ const tools = ['get_adcp_capabilities', ...storyboard.required_tools, 'comply_test_controller'];
for (const features of [[], ['other.feature'], ['creative.evaluator'], ['other.feature', 'creative.evaluator']]) {
const capabilities = {
@@ -230,7 +230,7 @@ test('inventory-list storyboards skip sellers that declare property-list support
equals: true,
});
- const tools = ['get_adcp_capabilities', ...storyboard.required_tools];
+ const tools = ['get_adcp_capabilities', ...storyboard.required_tools, 'comply_test_controller'];
const result = await runStoryboard('https://agent.example/mcp', storyboard, {
_profile: {
tools,
@@ -274,7 +274,7 @@ test('inventory-list no-match requires canonical rejection and fails accepted bu
})),
})),
};
- const tools = ['get_adcp_capabilities', 'create_media_buy'];
+ const tools = ['get_adcp_capabilities', 'create_media_buy', 'comply_test_controller'];
const baseOptions = {
agentTools: tools,
context: {
@@ -493,30 +493,19 @@ test('online media-buy governance proofs do not apply to signed-context-only sel
assert.equal(signedOnly.phases[0].steps[0].skip_reason, 'capability_unsupported');
});
+function loadBillingGateStoryboard() {
+ return YAML.parse(fs.readFileSync(path.join(
+ __dirname, '..', 'static', 'compliance', 'source', 'universal', 'billing-gate-dispatch.yaml'
+ ), 'utf8'));
+}
+
test('billing gate skips phases when account capabilities are absent', async () => {
- const storyboardPath = path.join(
- __dirname,
- '..',
- 'static',
- 'compliance',
- 'source',
- 'universal',
- 'billing-gate-dispatch.yaml'
- );
- const storyboard = YAML.parse(fs.readFileSync(storyboardPath, 'utf8'));
+ const storyboard = loadBillingGateStoryboard();
const perAgentPhases = storyboard.phases.filter(phase => phase.id.startsWith('per_agent_gate_'));
const capabilityDiscovery = storyboard.phases.find(phase => phase.id === 'capability_discovery');
- assert.deepEqual(
- {
- optional: capabilityDiscovery.optional,
- requires_capability: capabilityDiscovery.requires_capability,
- },
- {
- optional: true,
- requires_capability: { path: 'account', present: true },
- }
- );
+ assert.equal(capabilityDiscovery.optional, undefined);
+ assert.deepEqual(capabilityDiscovery.requires_capability, { path: 'account', present: true });
assert.deepEqual(
perAgentPhases.map(phase => [phase.id, phase.requires_capability]),
@@ -533,7 +522,7 @@ test('billing gate skips phases when account capabilities are absent', async ()
);
const dispatchedTasks = [];
- const tools = ['get_adcp_capabilities', ...storyboard.required_tools];
+ const tools = ['get_adcp_capabilities', ...storyboard.required_tools, 'comply_test_controller'];
const result = await runStoryboard('https://agent.example/mcp', storyboard, {
_profile: {
tools,
@@ -555,6 +544,8 @@ test('billing gate skips phases when account capabilities are absent', async ()
});
assert.deepEqual(dispatchedTasks, []);
+ assert.equal(result.overall_passed, true);
+ assert.equal(result.failed_count, 0);
const phases = Object.fromEntries(result.phases.map(phase => [phase.phase_id, phase]));
assert.equal(phases.capability_discovery.steps[0].skip_reason, 'not_applicable');
for (const phaseId of [
@@ -567,6 +558,86 @@ test('billing gate skips phases when account capabilities are absent', async ()
}
});
+for (const { name, supportedBilling, missingDeclaration } of [
+ { name: 'operator billing with omitted-value rejection probes', supportedBilling: ['operator'] },
+ { name: 'all billing values with no rejection probes', supportedBilling: ['operator', 'agent', 'advertiser'] },
+ { name: 'a missing supported_billing declaration', supportedBilling: ['operator'], missingDeclaration: true },
+]) {
+ test(`billing gate grades ${name}`, async () => {
+ const storyboard = loadBillingGateStoryboard();
+ // Exercise all source phases and field validations with the real SDK verdict;
+ // schema fetching is independent of this required-phase regression.
+ const executable = {
+ ...storyboard,
+ phases: storyboard.phases.map(phase => ({
+ ...phase,
+ steps: phase.steps.map(step => ({
+ ...step,
+ validations: step.validations.filter(validation => validation.check !== 'response_schema'),
+ })),
+ })),
+ };
+ const account = {
+ supported_billing: supportedBilling,
+ supported_account_currency_modes: ['fixed'],
+ };
+ const tools = ['get_adcp_capabilities', ...storyboard.required_tools, 'comply_test_controller'];
+ const capabilityRequests = [];
+ const rejectedBilling = [];
+ const result = await runStoryboard('https://agent.example/mcp', executable, {
+ _profile: { tools, raw_capabilities: { account } },
+ agentTools: tools,
+ test_kit: { commercial_relationship: 'direct' },
+ skip_controller_seeding: true,
+ _client: {
+ resetContext() {},
+ async getAdcpCapabilities(request) {
+ capabilityRequests.push(request);
+ return {
+ success: true,
+ data: {
+ account: missingDeclaration ? { supported_account_currency_modes: ['fixed'] } : account,
+ context: request.context,
+ },
+ };
+ },
+ async syncAccounts(request) {
+ rejectedBilling.push(request.accounts[0].billing);
+ return {
+ success: true,
+ data: {
+ accounts: [{
+ action: 'failed',
+ status: 'rejected',
+ errors: [{ code: 'BILLING_NOT_SUPPORTED', recovery: 'correctable', details: { scope: 'capability' } }],
+ }],
+ context: request.context,
+ },
+ };
+ },
+ },
+ });
+
+ assert.equal(capabilityRequests.length, 1);
+ const discovery = result.phases.find(phase => phase.phase_id === 'capability_discovery');
+ assert.equal(discovery.passed, !missingDeclaration);
+ assert.equal(discovery.steps.some(step => !step.skipped && step.passed), !missingDeclaration);
+ assert.equal(result.overall_passed, !missingDeclaration);
+ if (!missingDeclaration) {
+ assert.equal(result.failed_count, 0);
+ assert.deepEqual(rejectedBilling.sort(), ['operator', 'agent', 'advertiser'].filter(value => !supportedBilling.includes(value)).sort());
+ for (const billing of supportedBilling) {
+ const gate = result.phases.find(phase => phase.phase_id === `capability_gate_${billing}`);
+ assert.ok(gate.steps.every(step => step.skipped && step.skip_reason === 'not_applicable'));
+ }
+ for (const phaseId of ['per_agent_gate_reject', 'per_agent_gate_recover']) {
+ const gate = result.phases.find(phase => phase.phase_id === phaseId);
+ assert.ok(gate.steps.every(step => step.skipped), 'direct billing must skip the per-agent passthrough probes');
+ }
+ }
+ });
+}
+
test('create_media_buy async storyboard requires its advertised controller scenario', async () => {
const storyboardPath = path.join(
__dirname,
@@ -732,7 +803,7 @@ test('creative-library storyboards fail closed before tool execution', async ()
assert.deepEqual(storyboard.requires_all_capabilities, item.gates);
}
- const tools = ['get_adcp_capabilities', ...storyboard.required_tools];
+ const tools = ['get_adcp_capabilities', ...storyboard.required_tools, 'comply_test_controller'];
const librarylessCapabilities = structuredClone(item.capabilities);
librarylessCapabilities.creative = { has_creative_library: false };
const libraryless = await runStoryboard('https://agent.example/mcp', storyboard, {
@@ -854,7 +925,7 @@ test('product refinement requires the advertised refine buying mode', async () =
contains: 'refine',
});
- const tools = ['get_adcp_capabilities', ...storyboard.required_tools];
+ const tools = ['get_adcp_capabilities', ...storyboard.required_tools, 'comply_test_controller'];
const unsupported = await runStoryboard('https://agent.example/mcp', storyboard, {
_profile: {
tools,
@@ -893,7 +964,7 @@ test('advanced delivery reporting dispatches wholesale discovery only to opted-i
steps: [{ ...discovery, context_outputs: [], validations: [] }],
}],
};
- const tools = ['get_adcp_capabilities', ...storyboard.required_tools];
+ const tools = ['get_adcp_capabilities', ...storyboard.required_tools, 'comply_test_controller'];
for (const buyingModes of [undefined, ['brief'], ['brief', 'wholesale']]) {
const requests = [];
@@ -944,7 +1015,7 @@ test('proposal finalize skips unsupported replay while still executing the commi
})),
})),
};
- const tools = ['get_adcp_capabilities', ...storyboard.required_tools];
+ const tools = ['get_adcp_capabilities', ...storyboard.required_tools, 'comply_test_controller'];
for (const [supported, brokenReplay] of [[false, false], [true, false], [true, true]]) {
const finalizedRequests = [];
@@ -1068,7 +1139,7 @@ test('measurement acceptance is split from the universal rejection scenario', as
assert.equal(capability['x-added-in'], '3.2.0');
assert.match(capability.description, /TERMS_REJECTED/);
- const tools = ['get_adcp_capabilities', ...accepted.required_tools];
+ const tools = ['get_adcp_capabilities', ...accepted.required_tools, 'comply_test_controller'];
const unsupported = await runStoryboard('https://agent.example/mcp', accepted, {
_profile: {
tools,
@@ -1202,3 +1273,104 @@ test('storyboard capability gates use the schema shape the runner evaluates', ()
walk(sourceRoot);
assert.deepEqual(problems, []);
});
+
+// Execute the source baseline through the installed runner, including its response
+// schemas and upstream checks. Capability differences must not strand the buy ID.
+async function runNonGuaranteedLifecycle({ status, hasCreativeLibrary, pacingStatus = status, upstream = true, badContext = false }) {
+ const storyboard = parseStoryboard(fs.readFileSync(path.join(
+ __dirname, '..', 'static', 'compliance', 'source', 'specialisms', 'sales-non-guaranteed', 'index.yaml'
+ ), 'utf8'));
+ const phases = storyboard.phases.filter(phase => ['create_buy', 'monitor_pacing', 'adjust_bids'].includes(phase.id));
+ const tools = ['get_adcp_capabilities', 'get_products', 'create_media_buy', 'get_media_buys', 'update_media_buy', 'comply_test_controller'];
+ const requests = [];
+ const packages = [
+ { package_id: 'package-first', product_id: 'product-first', pricing_option_id: 'pricing-first', bid_price: 2, budget: 10000 },
+ { package_id: 'package-second', product_id: 'product-second', pricing_option_id: 'pricing-second', bid_price: 3, budget: 15000 },
+ ];
+ const confirmedAt = '2026-01-01T00:00:00Z';
+ const result = await runStoryboard('https://seller.example/mcp', {
+ ...storyboard, prerequisites: undefined, fixtures: undefined, fixture_resolution: undefined, phases,
+ }, {
+ _profile: { tools, raw_capabilities: { creative: { has_creative_library: hasCreativeLibrary } } },
+ _controllerCapabilities: { detected: true, scenarios: ['query_upstream_traffic'] },
+ agentTools: tools,
+ context: {
+ first_product_id: 'product-first', second_product_id: 'product-second',
+ first_pricing_option_id: 'pricing-first', second_pricing_option_id: 'pricing-second',
+ first_bid_price: 2, second_bid_price: 3,
+ first_updated_bid_price: 4, second_updated_bid_price: 5,
+ },
+ _client: {
+ resetContext() {},
+ async createMediaBuy(request) {
+ requests.push({ task: 'create_media_buy', request });
+ return { success: true, data: {
+ media_buy_id: 'buy-lifecycle', media_buy_status: status, confirmed_at: confirmedAt,
+ revision: 1, packages, context: badContext ? { correlation_id: 'wrong' } : request.context,
+ } };
+ },
+ async getMediaBuys(request) {
+ requests.push({ task: 'get_media_buys', request });
+ return { success: true, data: {
+ media_buys: [{ media_buy_id: 'buy-lifecycle', status: pacingStatus, confirmed_at: confirmedAt,
+ revision: 1, currency: 'USD', total_budget: 25000, packages }], context: request.context,
+ } };
+ },
+ async updateMediaBuy(request) {
+ requests.push({ task: 'update_media_buy', request });
+ return { success: true, data: {
+ media_buy_id: request.media_buy_id, media_buy_status: status, revision: 2,
+ affected_packages: packages.map((pkg, index) => ({ ...pkg, ...request.packages[index] })),
+ context: request.context,
+ } };
+ },
+ async executeTask(task, request) {
+ assert.equal(task, 'comply_test_controller');
+ assert.equal(request.scenario, 'query_upstream_traffic');
+ return { success: true, data: { success: true, recorded_calls: upstream ? [{
+ timestamp: new Date().toISOString(), endpoint: 'POST https://auction.example/campaigns',
+ }] : [] } };
+ },
+ },
+ });
+ return { result, requests, steps: result.phases.flatMap(phase => phase.steps) };
+}
+
+for (const [status, hasCreativeLibrary] of [['active', false], ['pending_creatives', true]]) {
+ test(`non-guaranteed ${status} buy reaches pacing and bid updates`, async () => {
+ const { result, requests, steps } = await runNonGuaranteedLifecycle({ status, hasCreativeLibrary });
+ assert.equal(result.overall_passed, true, JSON.stringify(steps));
+ assert.equal(steps.length, 3);
+ assert.ok(steps.every(step => step.passed && !step.skipped), JSON.stringify(steps));
+ assert.deepEqual(requests.map(entry => entry.task), ['create_media_buy', 'get_media_buys', 'update_media_buy']);
+ assert.deepEqual(requests[1].request.media_buy_ids, ['buy-lifecycle']);
+ assert.equal(requests[2].request.media_buy_id, 'buy-lifecycle');
+ assert.deepEqual(requests[2].request.packages.map(pkg => pkg.package_id), ['package-first', 'package-second']);
+ const upstreamChecks = steps.flatMap(step => step.validations).filter(check => check.check === 'upstream_traffic');
+ assert.equal(upstreamChecks.length, 2);
+ assert.ok(upstreamChecks.every(check => check.passed && !check.not_applicable));
+ });
+}
+
+test('non-guaranteed lifecycle checks reject other states at creation and pacing', async () => {
+ for (const status of ['pending_approval', 'rejected', 'canceled', 'completed']) {
+ const created = await runNonGuaranteedLifecycle({ status, hasCreativeLibrary: false });
+ assert.equal(created.steps[0].passed, false, status);
+ assert.ok(created.steps[0].validations.some(check => check.path === 'media_buy_status' && !check.passed), status);
+ const paced = await runNonGuaranteedLifecycle({ status: 'active', pacingStatus: status, hasCreativeLibrary: false });
+ const pacing = paced.steps.find(step => step.step_id === 'get_media_buys_pacing');
+ assert.equal(pacing.passed, false, status);
+ assert.ok(pacing.validations.some(check => check.path === 'media_buys[0].status' && !check.passed), status);
+ }
+});
+
+test('accepting active does not bypass context echoes or upstream side effects', async () => {
+ for (const override of [{ upstream: false }, { badContext: true }]) {
+ const { result, steps } = await runNonGuaranteedLifecycle({ status: 'active', hasCreativeLibrary: false, ...override });
+ assert.equal(result.overall_passed, false);
+ assert.equal(steps[0].passed, false);
+ assert.ok(steps[0].validations.some(check => !check.passed && (
+ override.badContext ? check.path === 'context.correlation_id' : check.check === 'upstream_traffic'
+ )), JSON.stringify(steps[0].validations));
+ }
+});
diff --git a/tests/webhook-emission-storyboard.test.cjs b/tests/webhook-emission-storyboard.test.cjs
index 8485af46bd6..c5a72ae020a 100644
--- a/tests/webhook-emission-storyboard.test.cjs
+++ b/tests/webhook-emission-storyboard.test.cjs
@@ -123,6 +123,9 @@ async function runTriggers(source, products, tools = ['get_adcp_capabilities', '
const storyboard = {
...source,
prerequisites: undefined,
+ // This slice drops controller seeding, so the controller load gate (the
+ // fake agent exposes no comply_test_controller) would skip the whole run.
+ requires: source.requires.filter(value => value !== 'controller'),
phases: source.phases.map(phase => ({
...phase,
steps: phase.steps.filter(step => step.task === 'get_adcp_capabilities' ||