Repository navigation
test(compliance): match the 3.1.x legacy format_kinds case to #8603's storyboard - #8707
Conversation
… 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]>
There was a problem hiding this comment.
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.
Fixes the
test:storyboard-scenario-fixturesfailure on the 3.1.x tip that #8699 reported.What
#8603 removed
filters: { is_fixed_price: true }from theget_products_legacy_formatstep ofprotocols/media-buy/scenarios/inline_creatives_without_sync.yaml, so the step no longer has afiltersobject. The test "inline creatives: a legacy-only seller honouring format_kinds would lose all coverage if filtered" (tests/cli-scenario-fixtures.test.cjs) still didstep.sample_request.filters.format_kinds = ['image']. That threwTypeError: 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:
It checks no less than before:
format_kinds, so the simulation stays a simulation.get_products_legacy_formatstep, so a renamed step can't make the case pass vacuously.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.xpasses with no changeset.Verification (after
npm ciwith the 3.1.x lockfile)test:storyboard-scenario-fixturesgoes from 37/38 (this case failing with the TypeError) to 38/38.the legacy path must never open. It still detects the regression it exists for.build:compliancepasses. 3.1.x'sbuild-compliance.cjshas no--checkmode.test:schemaspasses. Everytest:storyboard-*lint passes, including thebuild-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-refsandtest:pagination-invariantpass too.typecheck. The pre-push hook skipped the storyboard matrix by itself because no training-agent or compliance files changed. I skipped no hooks.🤖 Generated with Claude Code