Skip to content

test(compliance): match the 3.1.x legacy format_kinds case to #8603's storyboard - #8707

Merged
bokelley merged 1 commit into
3.1.xfrom
fix/3.1.x-inline-creatives-format-kinds-test
Nov 3, 2026
Merged

bokelley merged 1 commit into
3.1.xfrom
fix/3.1.x-inline-creatives-format-kinds-test

Conversation

@bokelley

@bokelley bokelley commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the test:storyboard-scenario-fixtures failure on the 3.1.x tip that #8699 reported.

What

#8603 removed filters: { is_fixed_price: true } from the get_products_legacy_format step of protocols/media-buy/scenarios/inline_creatives_without_sync.yaml, so the step no longer has a filters object. The test "inline creatives: a legacy-only seller honouring format_kinds would lose all coverage if filtered" (tests/cli-scenario-fixtures.test.cjs) still did step.sample_request.filters.format_kinds = ['image']. That threw TypeError: Cannot set properties of undefined (setting 'format_kinds') before the runner started.

The test now leaves the storyboard as #8603 left it, and its simulation of "narrow the legacy probe" adds the filter to the request:

step.sample_request.filters = { ...step.sample_request.filters, format_kinds: ['image'] };

It checks no less than before:

  • The mechanism assertions are unchanged: the legacy phase never opens, the coverage gate is the step that fails, and the run fails overall.
  • Two guards are new:
    • The authored legacy probe must not already carry format_kinds, so the simulation stays a simulation.
    • The test must find exactly one get_products_legacy_format step, so a renamed step can't make the case pass vacuously.
  • The old filter also carried is_fixed_price, which the stub seller ignored. The simulated request now differs from before only by that ignored field.

No changeset: the change is test-only. check-changeset-protocol-scope.cjs origin/3.1.x passes with no changeset.

Verification (after npm ci with the 3.1.x lockfile)

  • The fixed test: test:storyboard-scenario-fixtures goes from 37/38 (this case failing with the TypeError) to 38/38.
  • Control: with the narrowing line removed, the case fails with the legacy path must never open. It still detects the regression it exists for.
  • Build: build:compliance passes. 3.1.x's build-compliance.cjs has no --check mode.
  • Schemas and lints: test:schemas passes. Every test:storyboard-* lint passes, including the build-check "Storyboard lint tests" chain (sample-request-schema, response-schema, context-output-paths, validations-paths, refine-finalize-validation-ids, update-media-buy-affected-packages, compliance-source-authority). test:compliance-packaged-refs and test:pagination-invariant pass too.
  • Hooks: the normal pre-commit hook passed: root unit tests, the scoped server unit suite and typecheck. The pre-push hook skipped the storyboard matrix by itself because no training-agent or compliance files changed. I skipped no hooks.
  • Training agent: not run. No storyboard changed, and the test drives the runner against a stub seller.

🤖 Generated with Claude Code

… storyboard

#8603 removed is_fixed_price, the only filter on the inline-creatives
get_products_legacy_format step, so the step no longer carries a filters
object. The "legacy-only seller honouring format_kinds" case still
assigned filters.format_kinds onto it and threw a TypeError before the
runner started.

Add the filter to the request instead of assuming the object exists. The
case now also asserts that the authored probe does not already narrow
and that it found exactly one legacy discovery step, so the simulation
cannot pass vacuously. The mechanism assertions are unchanged.

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 test-only fix.

Reviewed the single 8-net-line change to tests/cli-scenario-fixtures.test.cjs. It repairs a real TypeError: Cannot set properties of undefined (setting 'format_kinds') introduced when #8603 removed the get_products_legacy_format step's filters object. The simulation now builds the filter via spread (L20) instead of mutating a missing object, and adds two load-bearing guards: the authored probe must not already carry format_kinds (L19) and exactly one legacy step must exist (L25), preventing a vacuous pass after a rename. No changeset is correct for a test-only change, and no worker/queue/IO surface is touched.

No Critical/High/Medium findings. No team gate, no gated paths, high_risk false. Falls through to row 9 — approve.

@bokelley
bokelley merged commit dee4718 into 3.1.x Nov 3, 2026
12 checks passed
@bokelley
bokelley deleted the fix/3.1.x-inline-creatives-format-kinds-test branch November 3, 2026 15:53
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