Skip to content

test(compliance): guard 3.1.x seeded storyboard fixtures against missing discriminators - #8699

Merged
bokelley merged 1 commit into
3.1.xfrom
backport/3.1.x-pagination-fixture-selection-type
Nov 2, 2026
Merged

bokelley merged 1 commit into
3.1.xfrom
backport/3.1.x-pagination-fixture-selection-type

Conversation

@bokelley

@bokelley bokelley commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Refs #8646. Follow-up to #8683.

#8683 (thanks @sujanchalla0510) fixed #8646 on 3.1.x: two get_products_pagination_integrity fixture entries named only publisher_domain, while every branch of core/publisher-property-selector.json requires selection_type. That PR is merged as 66ac6bd. This PR adds a regression test so the same class of fixture bug can't come back on 3.1.x, and it records an audit of every seeded fixture on the branch. It changes no fixtures.

Thanks to @EvgenyAndroid for the analysis in #8646. It gave exact line references in the 3.1.31 and 3.1.30 bundles, the oneOf/required reasoning, the runner and schema-root setup that reproduces it, and the note that 3.1.31's wholesale gating newly exposes it.

The test

tests/storyboard-fixture-discriminators.test.cjs (npm run test:storyboard-fixture-discriminators). I wired it into npm test and the build-check "Storyboard lint tests" step.

No changeset: the diff is a test, a package.json script and a CI step, none of which are protocol release surface. check-changeset-protocol-scope.cjs origin/3.1.x reports no protocol-scoped changes, and the changeset-check workflow skips on that.

Audit

I validated all 156 seeded objects in the 3.1.x storyboards against the 3.1.x schemas.

3.1.x: the only discriminator omissions were the two fixed by #8683, and none remain. There are no other fixture fixes to make in this class.

Other mismatches against the full schema exist on 3.1.x. They aren't in this class, so I left them alone:

  • Sparse top-level fields (name, description, pricing_options, reporting_capabilities, …) are missing by design.
  • format_ids[] entries with only id, no agent_url: 47 product entries and 4 creative entries. The same pattern is still on main (31) and 3.2.x (29). The right agent_url depends on the seller, so the fix isn't unambiguous from the schema. Flagging it for a separate decision.

3.2.x and main (not changed here):

  • 3.2.x and main: format_options[0] with format_kind: "native" in protocols/media-buy/scenarios/refine_frequency_cap_negotiation.yaml and typed_proposal_negotiation.yaml (products[2]). native isn't a canonical format kind (the enum has native_in_feed), so the entry matches no branch.
  • main: 10 fixtures.pricing_options entries have no pricing_model. They are fixture_resolution discover handles rather than verbatim seeds, so they're probably false positives for main's model.
  • main: the 3.1.x get_products_pagination_integrity: fixture publisher_properties entries omit the required selection_type, so an echoing seller fails the storyboard's own schema check #8646 fix is already in its source.
  • Forward-merge note: when this test forward-merges to main, it fails on the native entries until they're fixed. It may also need to learn fixture_resolution. Expect a manual resolution, along with the usual package.json script-list conflict.

Verification (on this branch, after npm ci with the 3.1.x lockfile)

  • The new test passes: 4/4. test:schemas, test:storyboard-response-schema and test:compliance-source-authority pass on the rebased tree.
  • Before the rebase, the same test sat on fix(compliance): add selection_type to 3.1.x get_products pagination storyboard fixtures #8683's identical fixture change, and these passed:
    • build:compliance
    • test:json-schema, test:composed, test:oneof-discriminators, test:immutable-release-artifacts
    • the full build-check storyboard lint chain and every other test:storyboard-* lint
    • test:compliance-packaged-refs, test:pagination-invariant
    • the pre-commit hook: unit tests (288 files / 4401 tests) and typecheck
    • the pre-push storyboard matrix and the 3.0-compat matrix
  • Training agent: I ran get_products_pagination_integrity against the 3.1.x sales tenant, with schema root dist/schemas/3.1.31.
  • test:storyboard-scenario-fixtures has one failure that is already on the 3.1.x tip: inline creatives: a legacy-only seller honouring format_kinds…. The test mutates sample_request.filters.format_kinds, but fix(compliance): support auction-only 3.1 sellers and optional features #8603 removed filters from that step. This PR doesn't touch that test or storyboard.
  • Pre-push hook on the rebased branch ran in full; I skipped no hooks, and 3.1.x has no ADCP_SKIP_STORYBOARD_MATRIX switch. The changeset policy check found no protocol release-surface changes. The current storyboard matrix passed all six tenants above their floors, including every required-clean storyboard, and the 3.0-compat matrix passed too.

🤖 Generated with Claude Code

@bokelley
bokelley requested a review from a team as a code owner November 2, 2026 21:11
…ing discriminators

Adds tests/storyboard-fixture-discriminators.test.cjs. It collects every
object a 3.1.x storyboard seeds through comply_test_controller (top-level
fixtures blocks and inline seed_* steps), validates each against its domain
schema with Ajv discriminator support, and fails on any discriminated union
that is missing its tag or names an unknown one. Fixtures stay sparse: other
gaps are left to the seller's baseline merge.

This is the class behind #8646: publisher_properties entries with only
publisher_domain match no branch of core/publisher-property-selector.json,
so a seller echoing the seeded product fails the storyboard's own response
schema check. With the preceding fixture fix the 3.1.x tree has no other
instance (156 seeded objects checked).

Wired into npm test and the build-check storyboard lint step.

Refs #8646

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.

No blocking findings. Clean diff across 5 files (patch-level changeset, conformance fixture + additive test, CI wiring).

Checked:

  • static/compliance/source/universal/get-products-pagination-integrity.yaml:53,62 — adds selection_type: "all" to both seeded publisher_properties entries, matching the discriminated oneOf branch in core/publisher-property-selector.json, so verbatim echo now resolves correctly.
  • tests/storyboard-fixture-discriminators.test.cjs (269 new lines) — seededObject id-reinsertion, inline-vs-fixture walk, discriminatorErrors filtering, and the checked > 100 guard against a silently-dead walk are all correct; fail-first unit cases pin the #8646 shape.
  • Versioning correct (patch changeset, only static/compliance/source/**, no dist/**).
  • CI wiring (build-check.yml, package.json test) is additive.

high_risk false, gated_paths false, no author team gate, no prior decision. No escalation triggers (rows 1–8) fire → row 9 approve. Pre-existing unrelated test:storyboard-scenario-fixtures failure on 3.1.x tip noted but out of scope for this PR.

@bokelley
bokelley force-pushed the backport/3.1.x-pagination-fixture-selection-type branch from f5b92db to c358d85 Compare November 2, 2026 21:25
@bokelley bokelley changed the title fix(compliance): add selection_type to 3.1.x pagination storyboard fixtures and guard seeded discriminators test(compliance): guard 3.1.x seeded storyboard fixtures against missing discriminators Nov 2, 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 — additive conformance-harness test, no blocking findings.

No critical/high/medium findings. This subsequent pass adds a new guard test (tests/storyboard-fixture-discriminators.test.cjs) plus its wiring into package.json and .github/workflows/build-check.yml. Reviewer verified the control flow: the seededObjects walk skips re-walking the top-level fixtures block (L207-209) to avoid double-counting, inline seed steps are gated on params.fixture (L203), discriminator mechanism matches Ajv's discriminator: true, and both fragment refs resolve.

Gate checks: no no-auto-approve team match; gated_paths false; review_decision APPROVED. high_risk false. Prior decision was approve with no findings — clean iteration continues. None of rows 1-8 fire; falls through to row 9.

@bokelley
bokelley merged commit 3561440 into 3.1.x Nov 2, 2026
12 checks passed
@bokelley
bokelley deleted the backport/3.1.x-pagination-fixture-selection-type branch November 2, 2026 22:32
bokelley added a commit that referenced this pull request Nov 3, 2026
…#8705)

typed_proposal_negotiation and refine_frequency_cap_negotiation seeded
products[2] with format_kind "native", which is not a canonical format
kind, so the declaration matched no product-format-declaration branch.
Use native_in_feed, the canonical in-feed native kind, and add the params
every format declaration requires.

Port the 3.1.x seeded-fixture discriminator guard (#8699) to main. On
main a fixtures entry can be a discover-only fixture_resolution handle
(DR-0010) that is never seeded, so the guard skips those and grades every
entry whose effective strategies include seed.

Co-authored-by: Claude Opus 5.5 <[email protected]>
bokelley added a commit that referenced this pull request Nov 3, 2026
Reverts 1aa9ca0 ("Version Packages (#8700)"). The release PR head
d68f6cc was generated on 66ac6bd, but #8699 (3561440) merged into
3.1.x 39 seconds before #8700 was admin-merged. The merge's base parent and
tree therefore differ from the reviewed head, so the publication run
quarantined it (scripts/check-release-state.cjs), and the committed signing
certificate is bound to 66ac6bd rather than the merge's first parent, so
the original signed tuple can never publish from 3.1.x.

Nothing was published: no v3.1.32 tag or GitHub release, and R2 holds no
schemas/3.1.32/, compliance/3.1.32/ or protocol/3.1.32 objects (verified).
This revert restores the exact tree of 3561440 so the release workflow
regenerates a fresh, re-signed 3.1.32 Version Packages candidate on the new
head, which then needs a fresh non-author human approval on its exact head
(RELEASING.md "Maintained 3.1 publication authority").

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.

1 participant