Skip to content

[finding] check-skill-compatibility-version self-test prints a transcribed 7 dispatch-gates declaration cases while the block declares 6 — a stale count nothing derives or compares #15291

Description

@claude

What

scripts/check-skill-compatibility-version.mjs's self-test green line claims 7 dispatch-gates declaration cases, but the block declares 6:

✓ check-skill-compatibility-version self-test: ${cases.length} cases pass, plus 7 dispatch-gates declaration cases.

Measured on origin/main at 4dd5041bd: the declFailures block between const declFailures = []; and for (const f of declFailures) contains exactly 6 decl(...) calls (source lines 796, 798, 800, 808, 812, 817). The 7 is a hand-transcribed literal — nothing derives it and nothing compares it, so it went stale silently and stays stale.

Why it matters

The line is what a reader takes as the count of declaration cases that ran. A count that overstates by one is the reverse of the property the rest of this gate enforces everywhere else: it reports one more case as having held than the file contains. Unlike the neighbouring ${cases.length}, it cannot be wrong in a way any run notices.

Class

Same class as #15231 (check-wildcard-fallthrough prints a transcribed 17 cases while the body asserts 18) — a printed count nothing derives or compares. Not the same defect as the assertion-floor work on #13799: the row-battery floor pins that the CASES ran, and says nothing about a number printed for a separate assertion block.

Suggested repair

Derive it, the way the sibling gate check-skill-frame-sync.mjs already does — it counts its population cases into popCases and prints ${popCases} rather than a literal. A declCases counter incremented inside decl() closes this one the same way and cannot go stale again.

Provenance

Found while implementing #13799 batch 7a (PR #15288, scripts/check-skill-compatibility-version.mjs is one of that PR's five files). Deliberately NOT repaired there: it is a different defect class from that card's assertion floors, and correcting it would change the self-test's green line, which batch 7a's review reads as byte-identical to main's to prove no behaviour changed. Filed unassigned for triage.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions