Found while implementing #15414 (PR #15506), out of that card's scope: closing it changes which gates are derived onto every scripts/** card, which is a dispatch-cost decision, not a population fix.
The gap
scripts/check-self-test-wired.mjs declares its population to the dispatch derivation:
const ROOT_DIR_WATCH_HINTS = ['scripts/**/*.mjs', 'scripts/**/*.mts', 'scripts/**/*.sh'];
Its own comment explains why it must: the corpus root arrives as join(ROOT, 'scripts'), a bare single-segment word, so extractWatchHints recovers no scripts/ literal from the file and the family "walks all of scripts/ and appeared on no card that edited any of it".
scripts/check-self-test-workflow-commands.mjs has the identical dependency — its verdict is the real stdout+stderr of self-tests under scripts/ — and carries no such declaration.
Measured on a06faebbe
$ node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack scripts/check-nul-bytes.mjs
node scripts/check-self-test-wired.mjs
node scripts/check-self-test-wired.mjs --self-test
(check-self-test-workflow-commands: absent)
A card that edits a script under scripts/ and changes what its --self-test prints does not get the gate whose whole subject is what those self-tests print.
Why it was not fixed in #15506
That PR made the workflow-commands gate consume the shared population instead of walking for itself, and preserved its existing .github/workflows derivation exactly (verified byte-identical). Adding scripts/** hints would newly place this gate — roughly 14s of spawned self-tests — on every scripts/** card in the tree. That is a real per-dispatch cost and a policy call, not a silent rider on a population repair.
The counter-argument is worth recording: check-declared-population-live's own doctrine says an inherited population "belongs to the module it was declared in and is judged there", which reads as an argument that the scripts/ half is correctly declared once, by the module that owns the read. Whoever takes this should settle that first, because it decides whether there is a defect here at all.
Related: #15414, PR #15506.
Generated by Claude Code
Found while implementing #15414 (PR #15506), out of that card's scope: closing it changes which gates are derived onto every
scripts/**card, which is a dispatch-cost decision, not a population fix.The gap
scripts/check-self-test-wired.mjsdeclares its population to the dispatch derivation:Its own comment explains why it must: the corpus root arrives as
join(ROOT, 'scripts'), a bare single-segment word, soextractWatchHintsrecovers noscripts/literal from the file and the family "walks all ofscripts/and appeared on no card that edited any of it".scripts/check-self-test-workflow-commands.mjshas the identical dependency — its verdict is the real stdout+stderr of self-tests underscripts/— and carries no such declaration.Measured on
a06faebbeA card that edits a script under
scripts/and changes what its--self-testprints does not get the gate whose whole subject is what those self-tests print.Why it was not fixed in #15506
That PR made the workflow-commands gate consume the shared population instead of walking for itself, and preserved its existing
.github/workflowsderivation exactly (verified byte-identical). Addingscripts/**hints would newly place this gate — roughly 14s of spawned self-tests — on everyscripts/**card in the tree. That is a real per-dispatch cost and a policy call, not a silent rider on a population repair.The counter-argument is worth recording:
check-declared-population-live's own doctrine says an inherited population "belongs to the module it was declared in and is judged there", which reads as an argument that thescripts/half is correctly declared once, by the module that owns the read. Whoever takes this should settle that first, because it decides whether there is a defect here at all.Related: #15414, PR #15506.
Generated by Claude Code