compliance(storyboards): fixture-hash normalization + requires_scenarios spec#2688
Merged
Merged
Conversation
…ios spec Two hygiene follow-ups from #2679 expert review. Fixture hash normalization (#2682): - normalizeFixturesForHashing sorts arrays within each documented fixture category by its primary id before stableStringify. - Categories + primary ids: products/product_id, pricing_options/ pricing_option_id, creatives/creative_id, plans/plan_id, media_buys/media_buy_id. - Unknown fixture category throws: schema-doc and lint updates must land together so a new seed category can't silently create a false-negative env-fingerprint bucket. - Closes false-negative envelope before #2670 part 2 removes sb=<doc.id> and makes env-fingerprint precision load-bearing. Spec: flag flow across requires_scenarios (#2683): - storyboard-schema.yaml now normatively describes how branch_set contribution flags flow between parent and linked scenarios. - Parent-flag flow: contributed in X, asserted in X or in any scenario Y listed in X.requires_scenarios. - Reverse flow prohibited — scenarios MUST be internally self- grading to preserve standalone lintability and prevent cycles in the composition graph. - Scenario IDs must match the referenced file's top-level id: and the file MUST exist at build time. Tests: contradiction suite 25 (3 new — array-order stability, content-difference still discriminated, unknown category throws + documented categories round-trip). Follow-up #2687 filed for unresolved_scenario_reference grading (symmetric with the duplicate-id throw already in place). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two hygiene follow-ups from #2679's expert review:
Fixture hash normalization (#2682)
`fingerprintEnv` now sorts arrays within each documented fixture category by its primary id before `stableStringify`. Two storyboards with semantically equivalent fixtures — `products: [A, B]` vs `products: [B, A]` — land in the same env bucket. Closes the false-negative envelope before `#2670 part 2` removes `sb=<doc.id>` and makes env-fingerprint precision load-bearing.
Sort keys (mirrors the schema's `fixtures:` block):
Unknown fixture categories throw — a new seed category added to the schema without updating `FIXTURE_CATEGORY_PRIMARY_ID` is a hard error. Forces schema-doc and lint updates to land together so a silent false-negative bucket can't emerge.
requires_scenarios spec (#2683)
`storyboard-schema.yaml` now normatively describes the flow of `branch_set` contribution flags between a parent storyboard and its linked scenarios:
Matches the `orphan_contribution` lint behavior shipped in #2679. The lint was the de facto spec; this PR closes the gap.
Test plan
Follow-up filed
🤖 Generated with Claude Code