Commit 4e02b96
committed
fix(pm): discover gates invoked as
`collectInvocations` recognised exactly two spellings — a `check:*` npm script
and a script whose basename carries `check-`. A gate following neither was not
a family at all: absent from the matched list, the convention list, the
unreachable list, and from all three residue buckets, because it never entered
the universe those partition. `node scripts/pm/bare-root-worklist.mjs
--self-test` shipped a red on the required lane for a diff whose seven derived
families were all run and all green, and no local derivation could have named
it.
The third matcher keys on the flag rather than on a name: `--self-test` is the
script's own declaration that this invocation verifies the script instead of
doing its work. Two scripts in this tree are invoked BOTH ways, which no
filename rule can separate. A `check-` basename is skipped here so an existing
family is never split into two keys.
A self-test family follows no import. `bare-root-worklist.mjs` statically
imports `dispatch-gates.mjs`, whose module-body literals are join bases and
tier globs; inheriting them handed one gate 2553 fabricated (gate, file)
pairs — the same fabrication `check-dispatch-gates.mjs` exists to avoid by
spawning the tool rather than importing it.
Measured over 6465 tracked files: 140 -> 149 families, 52774 -> 52880 pairs
(+106), zero lost, zero re-attributed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZxnode scripts/<x>.mjs --self-test
1 parent cd93277 commit 4e02b96
1 file changed
Lines changed: 328 additions & 9 deletions
0 commit comments