Skip to content

fix(compliance): grade inline creative paths on each seller's advertised format representations - #8235

Merged
bokelley merged 3 commits into
mainfrom
conductor/cli-test-fixtures-protocol-main
Oct 16, 2026
Merged

bokelley merged 3 commits into
mainfrom
conductor/cli-test-fixtures-protocol-main

Conversation

@bokelley

@bokelley bokelley commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem

inline_creatives_without_sync required a product carrying canonical format_options[] and treated the legacy format_ids[] path as optional. Three seller shapes were graded wrongly (adcp-client#3268):

  • canonical-only — graded, but the always-on legacy path ran anyway and failed.
  • legacy-only, including non-projectable legacy formats — the required canonical path failed outright.
  • dual-emission — a broken legacy path was masked, because optional: true lets a failing phase pass.

Separately, the three provenance storyboards seeded schema-invalid products (adcp-client#3269): they omitted the schema-required publisher_properties and reporting_capabilities, and their CPM pricing option carried a rate field the schema ignores — so the product advertised no price at all.

Behavior

One canonical discovery (canonical_format_discovery, optional) captures the product's whole format declaration plus its product and pricing identifiers from a single get_products response. Three mutually exclusive, required canonical paths consume those captures, and the legacy path runs independently:

phase kind guard
canonical_format_discovery optional —
canonical_unnamed_option_inline_path required !context.canonical_declaration || context.canonical_declaration.format_option_id
canonical_product_scoped_inline_path required !…format_option_id || …publisher_domain
canonical_publisher_scoped_inline_path required !…format_option_id || !…publisher_domain
legacy_format_discovery optional —
legacy_format_inline_path required !context.legacy_format_id_value
verify_format_coverage required any_of [inline_creative_path_exercised]

Each path discovers and buys from one response, so a seller whose brief-mode results reorder or change between calls is never failed for it — get-products-response.json grants no ordering or stability guarantee, and core/product.json makes is_custom: true ids request-scoped. Execution, readback and the final contribution assertion stay fatal.

Namespace correctness. A publisher-catalog-backed option previously received a product-scoped reference, which core/format-option-ref.json rejects (publisher_domain: false on the product branch) — a valid seller failed. The two ref paths now emit the whole declaration as the format_option_refs[] item and inject only the literal scope from storyboard-root constants via context_inputs. additionalProperties: true lets format_kind/params ride along, publisher_domain + format_option_id travel intact, and because substitution hands over the context object by reference while applyContextInputs clones the request first, the scope write cannot mutate run context.

format_option_id is not required — core/canonical-format-option.json requires only format_kind and params, so an unnamed option is graded on its own path rather than silently skipped.

The unnamed guard leads with an existence clause so a legacy-only seller, which captures no canonical declaration, does not fall into the unnamed path and fail falsely.

The legacy probe stays unfiltered. A non-projectable legacy format has no canonical kind to match, so filtering it by format_kinds would exclude the very sellers this corrects. Its fixed 300x250 image asset is documented in-file as an applicability limit instead. Canonical probes do filter on format_kinds: ["image"], which is safe because every canonical option carries a kind.

Mismatch detector, not a selector. Canonical discovery carries field_value: image on the first declaration. The phase is optional and a failed step publishes no context, so a non-image first declaration stands all three canonical paths down rather than buying a 300x250 image against, say, a video declaration. It does not make a video-first catalog gradable: a canonical-only video-first seller makes zero creates and fails the coverage assertion. filters.format_kinds narrows which products are returned and does not order format_options[], so the first-product / first-declaration / fixed-price applicability limit is stated in prerequisites, with order-independent kind and dimension selection recorded there as a separate limitation.

Linter. resolveSchemaNode is untouched. An earlier attempt widened it and that introduced placeholder drift rather than revealing it — for account-ref it resolved to the account_id-only branch, so sandbox stopped being a boolean — and it also widened the pre-existing allOf -> branches[0] shortcut, which is wrong for an intersection. The fix is one hunk in placeholderFor's object arm: a node declaring no properties of its own falls back to its first object branch. No allowlist entry is required; the lint reports no new drift.

Validation

  • 26/26 regressions in tests/cli-scenario-fixtures.test.cjs, registered in the CI-invoked test:governance-task-slices script: canonical-only, legacy-only, dual, discovery results that change between calls, a representation absent from one call, unnamed format_option_id, failed discovery call, broken advertised path, missing/original replacement readback, and no-usable-representation.
  • Each guarantee spot-checked for non-vacuity: reinstating the stable-id requirement fails 5 tests; corrupting the update response fails 6; adding optional: true to an execution phase fails 4.
  • 18 storyboard lint suites, changeset scope check, changesets status, build:compliance, and tsc all clean.
  • Live against the reference training agent, ADCP_COMPLIANCE_DIR=dist/compliance/latest:
result
baseline (released 3.2.3 bundle, none of these edits) 6P / 2F / 3S — legacy path hard-failed, 3 steps prerequisite_failed
this branch 7P / 2F / 0S — both failures understood: the independent capabilities baseline below, and a deliberately visible, non-gating legacy discovery probe standing down for this canonical-only seller

All three provenance storyboards run clean: 9P, 7P, 6P, zero failures.

Known independent live baseline failure

The remaining get_capabilities failure is pre-existing and unrelated to this PR:

get_capabilities: Response matches get-adcp-capabilities-response.json schema
  — adcp.governance_enforcement.tasks.3.modes: Too big: expected array to have <=1 items
  • Offending value (server/src/training-agent/task-handlers.ts:19786, sales tenant, index 3): { task: 'create_media_buy', modes: ['signed_context', 'online_execution_check'] }
  • Expected schema: adcp.governance_enforcement.tasks.items is a discriminator/oneOf on task. The create_media_buy branch sets modes.minItems: 1 and no maxItems; only the build_creative / activate_signal / acquire_rights / update_rights branches set maxItems: 1. Two modes on create_media_buy are schema-legal — the validator resolves the union to a maxItems: 1 branch instead of the discriminated one.
  • Reproduces identically on the released bundle, which contains none of these edits:
    ADCP_COMPLIANCE_DIR=node_modules/@adcp/sdk/compliance/cache/3.2.3 \
    TENANT_PATH=sales PUBLIC_TEST_AGENT_TOKEN=storyboard-local-token \
    npx tsx server/tests/manual/run-storyboards.ts \
      --storyboard-id media_buy_seller/inline_creatives_without_sync

The capability-validator fix is deliberately not included here.

Notes for reviewers

  • Open PR fix(compliance): pin sandbox: true on storyboard account refs that name a sandbox fixture (#8179) #8216 pins sandbox: true on storyboard account refs across these same four files. Orthogonal fix, not a duplicate — whichever merges second will need a textual conflict resolution.
  • The design uses only @adcp/sdk features present in both 15.8.1 and 15.9.2: phase optional, phase-level skip_if with nested context paths, contributes_to + assert_contribution/any_of. No SDK change is required for this source to be correct.

🤖 Generated with Claude Code

…sed format representations

inline_creatives_without_sync required a product carrying canonical
format_options[] and treated the legacy format_ids[] path as optional, so
canonical-only, legacy-only and non-projectable-legacy sellers were graded
wrongly (adcp-client#3268).

The storyboard now has three execution paths - canonical selected through
packages[].format_option_refs, canonical with no stable format_option_id, and
legacy format_ids[] - each preceded by its own optional discovery phase. A path
runs only when its own discovery captured the selector it needs, and buys with
the product, pricing option and selector captured from that same get_products
response. Gate and buy therefore come from one response, so a seller whose
brief-mode results reorder or change between calls is never failed for it.
Execution phases stay required, so once a representation was actually captured,
inline create, update and readback on it must work.

format_option_id is not required: core/canonical-format-option.json requires
only format_kind and params, so a product may advertise a usable canonical
option with no stable id. That seller is graded on the unnamed-option path
instead of being silently skipped.

The three provenance storyboards seeded schema-invalid products
(adcp-client#3269): they omitted the required publisher_properties and
reporting_capabilities, and their CPM pricing option carried a `rate` field the
schema ignores, so the product advertised no price at all. They now declare
fixed_price and an image format option matching their creative probes.

Drops the now-obsolete known-failing entry for get_products_legacy_format,
whose stated removal condition was gating that branch on an observed
format_ids representation.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
aao-secretariat[bot]
aao-secretariat Bot previously approved these changes Oct 16, 2026

@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 — compliance-only fixture change, no blocking findings.

This PR redesigns the inline_creatives_without_sync scenario into three discovery+execution path pairs and repairs three schema-invalid provenance fixtures. The reviewer verified the fixes against schema (product.json requires publisher_properties/reporting_capabilities; cpm-option uses fixed_price not rate), confirmed the gating logic is sound (skip_if on required phases, legacy path gated on the captured format_ids[0].id leaf, optional discovery phases carry no branch_set), and noted a 395-line test file covering 16 cases including both masked-failure regressions. Changeset present and minor, in-scope for compliance assets. No static/schemas/source/**, oneOf, or wire-shape change; KNOWN_FAILING_STEPS removal matches the new gating.

Gate check: gated_paths is false, no high-risk paths, no no-auto-approve team match, no prior decision. Row 2 does not fire because no gated path is touched (the REVIEW_REQUIRED status only matters when gated_paths is true). No critical/high/medium findings. Falls through to row 9 → approve.

…mespace

Ports the verified 3.2 design for the inline creative storyboard.

One canonical discovery captures the product's whole format declaration
alongside its product and pricing identifiers, and three mutually exclusive
canonical paths run off that single response: product-scoped
format_option_refs, publisher-scoped refs carrying publisher_domain, and an
unnamed option authored with format_kind alone. The legacy format_ids[] path
runs independently. Each path discovers and buys from one get_products
response, so a seller whose brief-mode results reorder or change between calls
is never failed for it.

A publisher-catalog-backed option previously received a product-scoped
reference, which core/format-option-ref.json rejects, so a valid seller failed.
format_option_id is no longer required either, because
core/canonical-format-option.json requires only format_kind and params.

The unnamed guard leads with an existence clause so a legacy-only seller, which
captures no canonical declaration, does not fall into the unnamed path and fail
falsely. Execution, readback and the final contribution assertion stay fatal.

The legacy probe stays unfiltered: a non-projectable legacy format has no
canonical kind to match, so filtering it by format_kinds would exclude the very
sellers this corrects. Its fixed 300x250 image asset is documented as an
applicability limit instead.

resolveSchemaNode now descends into { type, discriminator, oneOf } unions when
building placeholders, which a whole-declaration ref placeholder requires. That
makes one pre-existing drift in account_timezone_buyer_selected visible; the
allowlist was regenerated locally with --allow-grow and records that the entry
is newly visible, not newly introduced.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
aao-secretariat[bot]
aao-secretariat Bot previously approved these changes Oct 16, 2026

@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 subsequent pass with no blocking or medium findings.

This PR rebuilds inline_creatives_without_sync.yaml into one canonical discovery plus three mutually-exclusive canonical paths (unnamed / product-scoped / publisher-scoped) and an independent legacy path. The reviewer verified the skip_if guards cleanly partition all four declaration states (:203, :405, :651 disjoint and complementary), that whole-declaration refs validate against the real core/format-option-ref.json (confirmed by ajv at tests/cli-scenario-fixtures.test.cjs:1158), and that the lint change correctly short-circuits on node.properties before descending into oneOf/anyOf/allOf.

Changeset checks pass: a protocol-scoped changeset is present, and the minor→patch retype is appropriate for a compliance-grading bugfix. The allowlist entry is tracked pre-existing drift, not newly introduced. No oneOf discriminator regression, no immutable-artifact modification, no schema↔docs drift.

Gate checks: gated_paths is false, high_risk is false, no no-auto-approve team match. The prior decision was also approve with no findings; this delta pass surfaces no new critical/high/medium findings. Row 9 applies.

Note: review_decision is REVIEW_REQUIRED, but since gated_paths is false, row 2 does not fire.

… correct claims

Applies the fresh review's required corrections and root's dispositions.

The resolveSchemaNode composite guard introduced placeholder drift rather than
revealing it. For account-ref, a `{ type: "object", oneOf: [...] }` node with no
top-level properties, it eagerly resolved to oneOf[0] - the account_id-only
branch - so every other key fell through to a string placeholder and `sandbox`
stopped being a boolean. It also widened the pre-existing `allOf -> branches[0]`
shortcut, which is wrong for an intersection. resolveSchemaNode is restored
untouched and the fix moved into placeholderFor's object arm, where the
format-option-ref failure actually lives: a node declaring no properties of its
own falls back to its first object branch. The allowlist is restored to its
previous contents and the lint reports no new drift.

Canonical discovery gains a mismatch detector: field_value image on the first
declaration. The phase is optional and a failed step publishes no context, so a
non-image first declaration stands all three canonical paths down instead of
buying a 300x250 image against, say, a video declaration. It is a guard, not a
selector - a canonical-only video-first seller makes zero creates and fails the
coverage check, which is the honest result for this fixture. Regressions cover
both the mixed and canonical-only cases and fail without the detector.

Test corrections: the same-kind catalog case gates on catalog ambiguity for the
creative's kind rather than on entry [0] carrying an id, and proves the seller
would refuse a selector-less buy by withholding the selector - which also
required the stub to require a ref that actually names an id, since context_inputs
recreates a scope-only ref that selects nothing. The legacy filter case runs
against the conformant stub so the filter is the only variable and asserts the
mechanism. A tautological probe count is replaced by the branch each storyboard
takes, and a missing per-lane buy returns a graded error instead of throwing.

Claim corrections: filters.format_kinds narrows which products are returned and
does not order format_options[], so it cannot guarantee a first image
declaration - the first-product/first-declaration applicability limit is stated
in prerequisites, with order-independent kind and dimension selection recorded
as a separate limitation rather than widened into this fix. The legacy probe's
normative paraphrase is reduced to the fixture population it must keep
reachable. The whole-declaration ref documents format-option-ref.json's
additionalProperties tolerance as intended, and explains that whole-object
substitution cannot also author a sibling scope without a spread or projection
construct the DSL lacks - a deliberate construction, not a runner defect. The
clone guarantee is recorded as dynamically verified on published @adcp/sdk
15.8.1 and 15.9.2. Narrative discovery and execution counts corrected to two
and four.

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

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Approve

Approve — clean subsequent pass, no blocking or medium findings.

This PR fixes CLI scenario/compliance fixtures, a storyboard-schema lint script, and test harness code (9 files, +1374/-110). The reviewer found nothing actionable.

What I checked:

  • Lint change (scripts/lint-storyboard-sample-request-schema.cjs:52-53): narrows the prior resolveSchemaNode edit to placeholderFor's object arm — object nodes with properties keep existing resolution, discriminated unions fall back to first object branch, null branch falls through to prior behavior. firstObjectBranch pre-exists. Stale allowlist entry correctly dropped since resolveSchemaNode is now untouched.
  • Changeset: patch type is appropriate — compliance fixture/lint/test fixes only, no published wire-shape change. Prose corrected to reference the actual schema (core/product-format-declaration.json). No schema↔docs drift (no static/schemas/source/** changes), no oneOf regression, no dist artifact mutation.
  • Scenario YAML: adds a field_value mismatch detector in an optional phase that stands canonical paths down rather than gating the run.
  • Test additions: video-first negative controls, Object.freeze capture guard, ambiguity-aware selector logic — all sound.

Gate check: high_risk false; gated_paths false (review_decision REVIEW_REQUIRED does not trigger row 2 when gated_paths is false); no no-auto-approve team match; no critical/high/medium findings; prior decision was approve. Rows 1-8 do not fire → row 9 approve.

bokelley added a commit that referenced this pull request Oct 16, 2026
…resentations (#8236)

Backport of 3ec9123 (#8235) to the 3.2.x maintenance line, carrying the
coordinated redesign of canonical discovery that followed review on all lines.

inline_creatives_without_sync required a product carrying canonical
format_options[] with a stable format_option_id and treated the legacy
format_ids[] path as optional, so canonical-only sellers with unnamed options
and legacy-only sellers were graded wrongly (adcp-client#3268).
core/product.json requires format_ids, format_options, or both - not both.

One canonical discovery captures the product, the pricing option, the canonical
format_kind and the WHOLE first format_options[] declaration from a single
get_products response. Three mutually exclusive canonical execution phases read
that captured declaration through dotted skip_if references to decide which
selector shape the seller published - product-local ref, publisher-catalog ref
carrying the complete {publisher_domain, format_option_id} pair, or no selector
at all for a declaration with no stable id. The legacy format_ids[] path keeps
its own discovery and runs independently. Execution phases stay required, and a
closing assert_contribution fails any run where no path completed.

Capturing the declaration whole is what makes this safe: format_option_id and
publisher_domain are both optional on a declaration, and a capture that does
not resolve fails its step and discards every other capture with it, so
capturing either leaf alone made it a precondition for a path that must not
require it. That was the reordering false failure review found: a seller
answering one brief with different canonical shapes across calls had no
canonical gate open at all. With one discovery the shape is observed once.

A publisher-catalog-backed product previously received a scope "product" ref
with no publisher_domain. core/format-option-ref.json's product-local branch
forbids publisher_domain, so that ref was unresolvable and a conformant seller
had to reject it. It is now graded on its own path.

The three provenance storyboards seeded schema-invalid products
(adcp-client#3269): they omitted the required publisher_properties and
reporting_capabilities, declared no format at all, and their CPM pricing option
carried a `rate` field the schema ignores, so the product advertised no price.
They now declare fixed_price and an image format option matching their probes.

Supporting changes:

- Canonical discovery checks products[0].format_options[0].format_kind is
  image. filters.format_kinds narrows to products that ACCEPT a kind and says
  nothing about declaration order, so a conformant multi-kind product may lead
  with another kind; capturing it would ship this fixture's 300x250 image asset
  under the wrong format_kind for a seller to correctly reject, on a
  non-optional phase. The check DETECTS that mismatch; it does not select a
  matching declaration. A canonical-only seller leading with another kind is
  therefore not graded on any canonical path and fails the coverage gate - that
  behaviour is pinned by a regression so the check is never mistaken for
  order-independent format selection. The first-declaration and fixed-300x250
  applicability predates this change and is now stated in prerequisites.
- scope is the only ref member no response supplies, so it comes from a
  storyboard-root constant injected with context_inputs. Not a runner defect:
  whole-object $context substitution works, but the grammar has no object
  spread or projection, so a substituted object cannot also carry a literal
  sibling. Order is what makes it safe - applyContextInputs structuredClones
  the request before setPath, so the captured declaration is never mutated.
  Both ref branches set additionalProperties true; receivers must tolerate the
  declaration's own members and must not read its nested format_kind as a
  package-level selector route.
- The unnamed gate carries an existence clause. A dotted reference onto an
  absent key is falsy, so the bare form ran this phase for a legacy-only
  seller and failed it on unresolved context.
- lint-storyboard-sample-request-schema synthesized {} for a $context
  placeholder whose target is a discriminated union written as
  { type, discriminator, oneOf } (core/format-option-ref.json), because the
  shape lives on the branches rather than the root. placeholderFor's object
  arm now takes the shape from the first object branch when the root carries
  no properties. The allowlist is unchanged. A broader resolveSchemaNode guard
  was tried first and reverted: it regressed account_timezone_buyer_selected
  by resolving account-ref.json to its account_id-only branch, turning sandbox
  into a string - an introduced regression, not pre-existing drift.
- Legacy discovery stays unfiltered. In product-format-declaration.json the
  "once a format_id has been projected" condition attaches to the prohibition
  on raw (agent_url, id) matching, not to normalization itself; the narrower
  reason the filter is omitted is that a legacy-only product whose id has no
  canonical projection has no canonical kind to match, so a seller honouring
  the filter would exclude itself from its only gradeable path.
- Drops the obsolete known-failing entry for get_products_legacy_format.
- The changeset is `patch`, not main's `minor`. A minor changeset on 3.2.x
  would cut 3.3.0 off the maintenance line and collide with main's 3.3.

Runner floor: the canonical gates read captured context, and on a runner whose
skip_if grammar cannot evaluate it every canonical path would execute rather
than exactly one. Verified end-to-end on the pinned @adcp/sdk 14.0.0-rc.53 and
reported green on 15.9.2; no claim is made about which earlier release first
carried the grammar.

27 fixture regressions, 19 storyboard lints, build:compliance --check and the
changeset scope check pass.

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
@bokelley
bokelley merged commit 4c8b529 into main Oct 16, 2026
106 of 108 checks passed
@bokelley
bokelley deleted the conductor/cli-test-fixtures-protocol-main branch October 16, 2026 15:49
sujanchalla0510 pushed a commit to sujanchalla0510/adcp that referenced this pull request Oct 18, 2026
Merge the published v3.2.5 maintenance release (tag v3.2.5,
3512882, the adcontextprotocol#8171 Version Packages
merge on 3.2.x) into main as a record-only merge.

The merge keeps main's tree (ours strategy) and adds only the 3.2.5
release records:

- dist/schemas/3.2.5/, dist/compliance/3.2.5/ and the signed
  dist/protocol/3.2.5.tgz{,.crt,.sha256,.sig} tuple, byte-identical to
  the tag.
- CHANGELOG.md: the 3.2.5 block, verbatim from the tag.
- static/compliance/published-versions.json: register 3.2.5, matching
  the 3.2.x manifest.
- dist/schemas/index.json and latest.json: regenerated by
  build:schemas; latest_stable, v3 and v3.2 now 3.2.5.

The 3.2.4..3.2.5 source changes (adcontextprotocol#8163, adcontextprotocol#8236) are already on main in
their main form (adcontextprotocol#8161, adcontextprotocol#8235), so no 3.2.x source is taken. The
second parent records that reconciliation so the next 3.2.x forward
merge does not re-conflict on it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
sujanchalla0510 pushed a commit to sujanchalla0510/adcp that referenced this pull request Oct 18, 2026
…main

Merge the published v3.1.29 maintenance release (tag v3.1.29,
f082c7a, the adcontextprotocol#8247 Version Packages
merge on 3.1.x) into main as a record-only merge. v3.1.29 descends from
v3.1.28 (f4d53b8, adcontextprotocol#8069), so both releases' records come in.

The merge keeps main's tree (ours strategy) and adds only:

- dist/schemas/3.1.28/, dist/schemas/3.1.29/, dist/compliance/3.1.28/,
  dist/compliance/3.1.29/ and the signed dist/protocol/3.1.28.tgz* and
  3.1.29.tgz* tuples, byte-identical to the tag.
- CHANGELOG.md: the 3.1.29 and 3.1.28 blocks, verbatim from the tag,
  above main's 3.1.27 block.
- dist/schemas/index.json: regenerated by build:schemas; v3.1 and
  latest_by_minor 3.1 now 3.1.29. latest.json is unchanged (3.2.5).

The 3.1.27..3.1.29 source changes (adcontextprotocol#7907, adcontextprotocol#8020, adcontextprotocol#8234, adcontextprotocol#8237, adcontextprotocol#8245)
are 3.1-line adaptations of fixes main already carries in its own form
(adcontextprotocol#7580, adcontextprotocol#7583, adcontextprotocol#7617, adcontextprotocol#8235; main's root request-signing vectors are
already unpadded base64url), so no 3.1.x source, tests or tooling are
taken. The second parent records that reconciliation so the next 3.1.x
forward merge starts from v3.1.29.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant