Repository navigation
Derive the dispatch-gates declaration case count in check-skill-compatibility-version's self-test - #17414
Merged
Conversation
…ck-skill-compatibility-version's self-test
The self-test's success line hand-transcribed "7 dispatch-gates declaration
cases" while the declFailures block registers 6 decl(...) calls, so the
printed count overstated the real population by one and could drift again
the moment a decl() call is added or removed. decl() now increments a
declCases counter and the success line prints ${declCases} instead of the
literal, mirroring check-skill-frame-sync.mjs's popCases/pop() pattern.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
baozhoutao
marked this pull request as ready for review
September 10, 2026 12:57
baozhoutao
enabled auto-merge
September 10, 2026 12:57
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.
Closes #15291
What changed
check-skill-compatibility-version.mjs's self-test success line hand-transcribedplus 7 dispatch-gates declaration cases, while thedeclFailuresblock itdescribes registers only 6
decl(...)calls — a count accurate on the day it waswritten, wrong the moment a 7th
decl()is added or one is removed. Mirroring theexisting precedent in
check-skill-frame-sync.mjs(popCases/pop()),decl()now increments a
declCasescounter and the success line prints${declCases}instead of the literal.
Before / after green line
Before (
origin/main572c33a2c4):After (this PR):
The line moving from
7to6is the expected, correct behaviour change — thedecl(...)block really registers 6 cases today. This is exactly why the issue wasnot folded into #15288 (batch 7a), whose proof depended on the self-test's success
line staying byte-identical to
main.Verification — both legs
decl(...)call moves the number. A probedecl('leg-1 probe: an added decl() call must move declCases', true);appended after the existingblock moved the printed count from 6 to 7:
at the top of the file (outside
selfTest()) left the printed count at 6:the two-line fix shown above (
git diffconfirmed clean before committing).decl(count in thedeclFailuresblock onorigin/main572c33a2c4: 6(lines 796, 798, 800, 808, 812, 817).
Scope
Only
scripts/check-skill-compatibility-version.mjstouched.check-skill-frame-sync.mjs(the model for this fix) is untouched. This is not assertion-floor work (#13799) —
the derived value is not pinned as a floor, only printed.
Clause-②: no
Generated by Claude Code