You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(scripts): admit the equality --self-test dispatch to the floor census (#15517)
`measure-self-test-floor`'s DISPATCH criterion matched only `includes()` and
`has()`, so six tracked scripts that dispatch on an already-extracted flag
(`flag === '--self-test'`) were outside the census entirely -- five of them
gates lint.yml already invokes with `--self-test`. An absence from a census is
not a clearance: no batch of #13799 could be dispatched against those files, and
nothing recorded that they were never floored.
The criterion is now published in two halves, MEMBERSHIP and EQUALITY, the way
the failure-producer criterion already is, so a control can read each on its
own. The equality half admits `==`/`===`, all three quote styles and the literal
on either side, and only when the compared operand is a BARE IDENTIFIER: a
comparison against a property or a call result is a tool examining the flag as
data (`renderedArgv(' --self-test').args === '--self-test'`, live in
`scripts/pm/dispatch-gates.mjs`), and admitting those would seed the census with
its own instruments.
Two fixtures and nine inline controls, running on every invocation like the
rest: a gate dispatching by equality must enter the population (and must not
match the membership half, so the verdict cannot pass for the wrong reason),
each spelling variant is admitted, and a file that only MENTIONS the flag -- in
prose, in a comparison against a call result, and as a literal handed to a child
process -- must not enter it, while matching unmasked so the control reads the
comment masking rather than assuming it.
Measured: the census goes from 170 to 176 files, the six named files enter, no
row leaves, and no pre-existing row is reclassified. All six classify NONE, so
#13799's population grows by six; flooring them is that card's work, not this
one's, and none of the six is touched here.
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
Co-authored-by: Claude <noreply@anthropic.com>
'CONTROL FIXTURE INVALID: the equality fixture also carries a membership dispatch, so the verdict above would pass without the equality half being read at all');
'POSITIVE CONTROL FAILED: a file that only MENTIONS the flag -- in prose, in a comparison against a call result, and as a literal handed to a child -- entered the population; the census would then be seeded with the very tools that reason about self-tests');
599
+
say(DISPATCH.test(NON_DISPATCH_MENTION_GATE),
600
+
'CONTROL FIXTURE INVALID: the mention fixture does not match even UNMASKED, so the verdict above says nothing about comments being masked away');
0 commit comments