Skip to content

fix(compliance): gate signal-targeting storyboards on both wholesale feeds - #8838

Merged
bokelley merged 1 commit into
mainfrom
fix/product-signal-targeting-wholesale-gate
Nov 9, 2026
Merged

bokelley merged 1 commit into
mainfrom
fix/product-signal-targeting-wholesale-gate

Conversation

@bokelley

@bokelley bokelley commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #8836.

Problem

media_buy_seller/product_signal_targeting was gated on signals.discovery_modes present: true. Every signals agent supports brief discovery, so a seller advertising media_buy.buying_modes: ["brief"] and signals.discovery_modes: ["brief"] was selected. The storyboard only exercises the wholesale path: get_products with buying_mode: "wholesale" and get_signals with discovery_mode: "wholesale". The schema lets a seller reject both calls when it hasn't declared wholesale. The other wholesale product storyboards, gated on media_buy.buying_modes contains wholesale, correctly skipped the same seller.

cross_path_targeting_provenance had the same gate and also makes both wholesale reads.

Change

Gate. Both storyboards now use:

requires_all_capabilities:
  - path: media_buy.buying_modes
    contains: wholesale
  - path: signals.discovery_modes
    contains: wholesale

The reporter also asked to gate on "package-level signal targeting". No seller-wide capability exists for that, and the spec says so on purpose. targeting.mdx § signal_targeting_groups: "Signal targeting limits are product-scoped, not declared in seller-wide get_adcp_capabilities, because products may be backed by different ad servers or platforms." So package-level signal targeting stays a graded assertion on the discovered product (signal_targeting_allowed, signal_targeting_rules), not an applicability gate. A seller-wide rollup would be a new capability field and would ship in a minor.

Unresolved $context.product_id. The rejection probes consume product_id and pricing_option_id from discovery but were marked stateful: false, so a failed discovery did not cascade-skip them. The runner exempts expect_error steps from its unresolved-context guard, so it sent the literal token. That runner gap is tracked in adcontextprotocol/adcp-client#3668.

The probes are now stateful: true. Their phases set depends_on to the producer phases only, so a readback failure still leaves rejection coverage running.

Tests

  • New tests in tests/sdk-runner-capability-gates.test.cjs:
    • Both storyboards are capability_unsupported with zero dispatches when the seller declares brief-only modes, wholesale on one feed only, or nothing. They are applicable when both feeds declare wholesale.
    • With both feeds declared and get_products returning no products, no create_media_buy is dispatched, no request carries a $context. token, and the probe is prerequisite_failed.
    • Both tests fail against the pre-fix storyboards. The old probe dispatched create_media_buy.
  • npm run test:sdk-runner-capability-gates passes: 64, 51 and 176 tests, 0 failures.
  • These storyboard lints pass with 0 failures: scoping, branch-sets, provides-state-for, fixture-resolution, contradictions, context-entity, controller-requires, sample-request-schema, response-schema, context-output-paths, context-resolution, validations-paths, check-enum, test-kits, compliance-source-authority, compliance-packaged-refs, generate-phase-scope, fixture-discriminators.
  • npm run build:compliance -- --check passes.
  • Local storyboard matrix (npm run test:storyboards): /signals met its floors. /sales and /governance fell below them on failures unrelated to this diff (adcp.governance_enforcement.tasks.3 capabilities schema mismatch, sales_dooh response status, SIGKILLed children). This worktree resolves node_modules from the parent checkout. training-agent-storyboards is green on main at fafe043, so the CI run on this PR is the authoritative gate.
  • The changeset is a patch. Conformance-harness applicability fixes are patch-eligible.

Backports

🤖 Generated with Claude Code

…feeds (#8836)

product_signal_targeting and cross_path_targeting_provenance were gated on
`signals.discovery_modes present: true`. Every signals agent supports brief
discovery, so a seller declaring brief-only discovery on both protocols was
selected. It then failed on the wholesale get_products and get_signals reads
those storyboards make, which it is allowed to reject.

Both storyboards now require wholesale in media_buy.buying_modes and in
signals.discovery_modes, through requires_all_capabilities. Package-level
signal targeting stays a product-scoped assertion. The spec declares no
seller-wide capability for it.

The negative probes that consume discovered context were stateful: false, so a
failed discovery did not cascade-skip them. The runner then sent the literal
`$context.product_id` because expect_error steps are exempt from its
unresolved-context guard (adcontextprotocol/adcp-client#3668). The probes are
now stateful, and their phases depend only on the producer phases, so a
readback failure does not suppress rejection coverage.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Approve

Approve.

Clean fix to two signal-targeting compliance storyboards. The gate was previously signals.discovery_modes present: true — satisfied by every signals agent via brief discovery — which wrongly selected brief-only sellers and sent them wholesale calls they reject. The gate now uses requires_all_capabilities on media_buy.buying_modes contains wholesale and signals.discovery_modes contains wholesale, matching the actual wire reads.

Verified:

  • New phase-level depends_on sets are complete for both storyboards (reject_unknown_signal→discover_wholesale_product; reject_cross_path_substitution→discover_native_signal+register_buyer_audience cover every $context token consumed).
  • stateful: false→true flip correctly cascade-skips a probe on discovery failure instead of shipping a literal $context.product_id.
  • Changeset is patch, present, scoped to static/compliance/source/**; applicability/statefulness only, no wire-shape change — patch-eligible.
  • Tests exercise the gate for both storyboards plus the cascade-skip for product_signal_targeting.

No Critical/High/Medium findings. Non-blocking follow-up: the cross_path cascade-skip (two producers, three tokens) lacks a dedicated test — only its gate case is covered — but the mechanism is shared with the tested product_signal_targeting case.

No gated paths, no high-risk flag, no team gate, no blocking findings. review_decision: REVIEW_REQUIRED does not block since gated_paths: false. Falls through to row 9.

@bokelley
bokelley merged commit 8f849f9 into main Nov 9, 2026
57 checks passed
@bokelley
bokelley deleted the fix/product-signal-targeting-wholesale-gate branch November 9, 2026 12:55
aymeric45 pushed a commit to aymeric45/adcp that referenced this pull request Nov 11, 2026
Brings the 3.1.33 release records and immutable artifacts to main:
dist/schemas/3.1.33, dist/compliance/3.1.33, dist/protocol/3.1.33.tgz*,
the 3.1.33 CHANGELOG block, and regenerated schema discovery pointers.

Metadata resolved per the playbook's auto-resolve rules: main's
package.json, package-lock.json and static/schemas/source/index.json;
CHANGELOG via forward-merge-release-records.cjs changelog; schema
discovery via forward-merge-release-records.cjs schema-discovery.

Content: main keeps its own implementation of the two fixes that landed
separately on each line (product_signal_targeting wholesale gate: adcontextprotocol#8838
vs adcontextprotocol#8840; tag/VAST creative storyboards, adcp#8770: adcontextprotocol#8841 vs adcontextprotocol#8846).
Conflicted files resolved to main's side after reviewing each 3.1.x
hunk, and the 3.1-only asset_types gating that auto-merged into
creative_lifecycle_webhooks, native_in_feed, deterministic-testing,
cli-scenario-fixtures.test.cjs and sdk-runner-capability-gates.test.cjs
reverted to main's state. static/compliance/source and tests/ are
identical to origin/main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
aymeric45 pushed a commit to aymeric45/adcp that referenced this pull request Nov 11, 2026
Forward-merges the published 3.2.10 release (v3.2.10 = a6163fb, the
3.2.x head) and the three 3.2.x maintenance commits since v3.2.9: adcontextprotocol#8826,
adcontextprotocol#8839 and adcontextprotocol#8847, released by the adcontextprotocol#8886 Version Packages merge.

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

adcontextprotocol#8839 and adcontextprotocol#8847 are cherry-picks of main's adcontextprotocol#8838 and adcontextprotocol#8841. Their
storyboards and tests auto-merged to main's bytes; nothing changes.

Content conflicts, all from adcontextprotocol#8826 and all resolved to main's file. adcontextprotocol#8826 is
an SDK 14 narrowing of adcontextprotocol#8336 and adcontextprotocol#8428 for the 3.2 runner; main carries both
in full on SDK 17:
- advanced_delivery_reporting.yaml: main's adcontextprotocol#8336 storyboard, with the
  adcontextprotocol#8376 price snapshot and the separate time_based_delivery_reporting scope.
- collection_selection.yaml, owner_sold_channel_carriage.yaml: main's adcontextprotocol#8428
  independently qualified catalog scopes. The 3.2.x side's
  native_collection_product discovery gate is dropped.
- docs/reference/known-limitations.mdx: main's catalog reporting and
  collection bullets already state the scope and fixture_unsatisfied
  semantics the 3.2.x paragraph describes.
- tests/sdk-runner-capability-gates.test.cjs: main's reporting gate test
  (both reporting storyboards). The 3.2.x single-storyboard variant is
  dropped.

Auto-merge reverted: the non-conflicting adcontextprotocol#8826 collection gate test
("<name> grades only sellers whose catalog offers selectable collections")
asserts the 3.2-only native_collection_product handle, which main's
storyboards do not declare.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compliance: product_signal_targeting runs against brief-only sellers (gate accepts any signals.discovery_modes)

1 participant