Uh oh!
There was an error while loading. Please reload this page.
fix(scripts): move check-ci-filter-parity's self-test fixtures inside selfTest() - #11631
Merged
Merged
Conversation
…elfTest() The fixture builder, its condition constant and its declaration-table helper sat at module scope while being used only by selfTest(). dispatch-gates.mjs blanks self-test BODIES before scanning a gate's module body for the path literals it reads, so a module-scope fixture helper escapes that blanking and its fixture globs are read as the gate's declared population. The two subtree globs the core/crosspkg defaults spell put this gate in the MATCHED column for 5326 tracked files it never opens. Its real population is .github/workflows/ci.yml and its own source. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx
os-steve
marked this pull request as ready for review
August 24, 2026 10:16
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Fixes#10841
scripts/check-ci-filter-parity.mjskept its self-test fixture apparatus at modulescope: the
REAL_TEST_IFcondition constant, thefixtureWorkflowbuilder, and thetabledeclaration-table helper. All three are used only byselfTest()— everycall site is inside it — but
dispatch-gates.mjsblanks self-test bodies beforescanning a gate's module body for the path literals it reads, so a fixture helper
hoisted out of that body escapes the blanking and its fixture globs are read as the
gate's declared population.
This moves the three declarations inside
selfTest(). No behaviour change: samefixtures, same 39 assertions, same real run. Triage's remedy 1, taken at its widest
sensible boundary — the whole fixture apparatus rather than just the two defaults —
so the site is closed for the class and not only for the two instances. Remedy 3
(teaching
maskSelfTestsabout module-scope self-test-only constants) is ascripts/pm/dispatch-gates.mjschange and is untouched here.Premise re-verified on today's tree
The card was measured on 2026-08-21 at PR #10801's merged ref. Re-derived here on
origin/main3637731e2— 152 families today, up from the 150 quoted in dispatch,after
dispatch-gates.mjsgained import-following (#11512) and the--self-testinvocation matcher (#11554):
line number: they are the
core/crosspkgdefaults offixtureWorkflow, whichsat at column 0.
packages/**card and ascripts/**card each derived
check-ci-filter-parityas a MATCHED family before this change.#11554's rule — a self-test family follows no import — does not reach this site. That
rule decides which modules a family inherits hints from; this leak is a literal in
the gate's own module body, which every family scans directly. Same species, one level
in.
Price
Census over all 6511 tracked files against all 152 families, using the derivation's own
coveringKeyper (family, file):Gain and re-attribution are counted separately, per the standard #11512 and #11554 were
held to. There is no re-attribution here at all.
The genuine hints did not shrink
The family's hint set goes from four entries to one:
All three are self-test fixtures.
@objectstack/probeis the fixture declarationtable's package name; it was already inert for matching (no tracked path under it) and
contributed 0 of the 5326. It falls out of the same move and is reported for
completeness, not counted as gain.
The gate's real population is asserted rather than eyeballed — its surviving pairs are
exactly two, enumerated in full:
That is the whole of what the gate opens:
readFileSync(join(root, CI_WORKFLOW))inmain()andlist(), plusCROSS_PACKAGE_TEST_INPUTSimported from the sibling gate.The census compared the hint set of every family, not just this one, precisely
because a lead that stops appearing looks exactly like a lead that was never earned: no
other family moved in either direction.
Non-vacuity, both directions
Reverse-verified from the committed fix by restoring the pre-fix file out of
origin/main, under atrap ... EXIT INT TERMrestore. The mutation was proven ondisk — sha256 changed, and the
fixtureWorkflowdeclaration anchor moved from column 0to column 2 and back — and the restore proven byte-identical (sha256 equal to the fixed
file,
git statusclean for the path):packages/core/src/index.tspackages/**scripts/check-nul-bytes.mjsscripts/**.github/workflows/ci.yml.github/workflows/ci.ymlNo rebuild leg applies here:
dispatch-gates.mjsreads this gate withreadFileSyncon the source path, never through a package
exportsmap or adist/artifact, sothere is no build step standing between the edit and the measurement.
Gates
Derived union for this diff —
node scripts/pm/dispatch-gates.mjswith no paths, sothe change set comes from the merge base rather than from a hand-written list — run at
head
f30da6d0e(the final commit), exit codes captured before any pipe:pnpm check:cross-package-test-inputspnpm check:entry-guard✓ check:entry-guard: 142 scripts/ file(s) — every entry guard goes through invoked-as.mjspnpm check:parse-guardpnpm check:pnpm-filter-targetsnode scripts/check-ci-filter-parity.mjsOK: all 95 declared cross-package glob(s) (80 unique) are covered by core or crosspkgnode scripts/check-ci-filter-parity.mjs --self-test✓ check-ci-filter-parity --self-test: 39 assertionsnode scripts/check-cross-package-test-inputs.mjsPlus the two standing families:
pnpm check:nul-bytes(0 —check-nul-bytes: OK (scanned 6506 text file(s) ... no raw ASCII control bytes)) andpnpm check:pm-dispatch-gates(0 —✓ dispatch-gates self-test: 579 cases pass.),the latter because this change is measured by that tool.
Run through
scripts/pm/os-verify-lock.sh; its verdict line wasVERDICT command-exit 0 · held the lock 66s · waited 0s.No changeset
scripts/only — a dev-tooling gate that is not published and releases nothing, so thisPR carries the
skip-changesetlabel instead of a changeset file.Generated by Claude Code
Generated by Claude Code