Repository navigation
revert: storyboardContext on AssertionContext (#1142) - #1202
Merged
Merged
Conversation
Reverts #1142. The field was preemptive surface with no consumer: - None of the bundled invariants (`status.monotonic`, `idempotency.conflict_no_payload_leak`, `context.no_secret_echo`, `governance.denial_blocks_mutation`) read `ctx.storyboardContext`. - Programmatic assertions already accumulate cross-step state through `ctx.state` (which is how `status.monotonic`'s `history` works). - Issue #1140 was about YAML validators (the `check:` clause), not assertion handlers — that scope is fully covered by #1141, which reads from `ValidationContext.storyboardContext` (a separate interface that already existed). The asymmetry is correct: declarative validators need context exposure, imperative assertions don't. Custom invariants that need cross-step state should continue using `ctx.state`. Breaking-shape change shipped as minor while 6.x is in its breaking phase. Window-of-removal is hours old — #1142 landed in 6.4.0, no docs advertised it, no third-party consumer has had time to depend. This reverts commit 7b804ea. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Reverts #1142.
Why
#1142 added
storyboardContext?: StoryboardContexttoAssertionContextplus per-step / final-step shallow-copy threading in the runner. After it merged, a closer look showed it's preemptive surface with no consumer:status.monotonic,idempotency.conflict_no_payload_leak,context.no_secret_echo,governance.denial_blocks_mutation) readctx.storyboardContext. Confirmed by grep acrosssrc/lib/testing/storyboard/default-invariants.ts.ctx.state— that's exactly howstatus.monotonic'shistoryMap works. Reading fromstoryboardContextprovides a parallel channel that's never needed.check:clause), not assertion handlers. That scope is fully covered by feat(conformance): add field_less_than and field_equals_context cross-step validators #1141, which reads fromValidationContext.storyboardContext— a separate interface that already existed before feat(conformance): expose storyboardContext in AssertionContext for cross-step validators #1142.The asymmetry is correct, not a gap to fill: declarative validators are stateless and need context exposure; imperative assertions have
ctx.stateand don't. Custom invariants that need cross-step state should continue usingctx.state.Why now
The window for cheap removal is hours old. #1142 landed in 6.4.0 today; no docs advertised the field, no third-party consumer has had time to depend on it. Removing later means a deprecation cycle; removing now is just a clean revert.
The CLAUDE.md principle this reinforces: "Don't add features, refactor, or introduce abstractions beyond what the task requires."
Compatibility
Breaking-shape change to a public optional field on an exported interface. Shipped as minor while 6.x is still in its breaking phase (per project policy — same as the original #1142 changeset).
What was tested
npm run build— cleannpm run format:check— cleannpm run sync-version— cleanNODE_ENV=test node --test test/lib/storyboard-default-invariants.test.js test/lib/storyboard-runner-contract.test.js test/lib/storyboard-track-silent-rollup.test.js test/lib/storyboard-assertion-registry.test.js test/lib/compliance.test.js— 217/217 passTest plan
🤖 Generated with Claude Code