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
eslint-fatal-guard's checkGuardAdoption reads a DOCBLOCK MENTION as adoption — deleting a gate's real import leaves the self-test printing "both gates still routed through it" #10458
Filed unassigned from the #10449 dev seat (session session_01DdCnBGcHeufjrq7drTD3wt, branch claude/issue-10449-ratchet-stack-headroom). Found while building a parallel adoption check next to
this one — the new check had the same bug, an ablation caught it, and the same ablation applied to the
existing one reproduces below. Not fixed there: #10449 is stop-the-bleed on parser stack headroom, a
different defect class, and this file is load-bearing enough to deserve its own diff.
The claim that is not true
scripts/eslint-fatal-guard.mjs's checkGuardAdoption() (L190+) exists because "a guard imported once
is not a guard still called", and its result is asserted by check-query-options-erasure-ratchet.mjs --self-test, which CI runs ahead of the gate itself. On success
the self-test prints:
✓ self-test: … fatal-parse guard proved both ways over real ESLint output, both gates still routed through it.
That last clause is the one this card is about. It is produced by two source-text tests:
Neither is applied to code. src is the raw file, comments included.
Measured, on origin/main @ 46cfa5b
scripts/check-slot-lookup-ratchet.mjs mentions the guard twice — once in prose, once for real:
27:// on the same input. scripts/eslint-fatal-guard.mjs carries the measurement and
48:import { lintFilesStrict } from './eslint-fatal-guard.mjs';
Delete line 48 only, leaving the docblock at line 27 exactly as it is:
ON-DISK: real import lines=0 ; docblock mentions=1
$ node scripts/check-query-options-erasure-ratchet.mjs --self-test
✓ self-test: … fatal-parse guard proved both ways over real ESLint output, both gates still routed through it.
exit=0
Green, and the sentence it printed is false. The prose satisfies the regex. The second test does not
save it either: that gate no longer calls anything, so there is no .lintFiles( to catch, and a gate that
counted messages from lintText() instead would clear both tests while doing zero guarding.
Nothing asserts the guard is CALLED. The tests are "the name appears" + "the unguarded call does
not". There is no positive lintFilesStrict( assertion, so "imports it and never uses it" is a hole
the docblock's own thesis names and the code does not close.
Both are the failure direction AGENTS.md calls worse than no verifier: it reports success. And it is
specifically a false green on the meta-check — the thing whose whole job is noticing that a gate went
quiet.
Severity: latent today
Both gates really do route through lintFilesStrict() on main right now, so nothing is currently
unguarded. This is the guard that would fail to notice if that stopped being true — and #10123's whole
argument is that the symptom of losing it is identical output.
Suggested shape (the taking seat's call)
Mirror what landed for the sibling check in the #10449 PR:
src=stripComments(readFileSync(...));// js-comment-mask, not raw textif(!/eslint-fatal-guard\.mjs/.test(src))…// import, now comment-proofif(!/lintFilesStrict\s*\(/.test(src))…// and it must actually be CALLEDif(/\.lintFiles\s*\(/.test(src))…// unchanged
⚠️ Whoever takes it should ablate it, not just run it: this bug is invisible to a green run by
construction. Delete the import line, leave the docblock, and require the self-test to red.
⚠️ Adjacent but not the same: #10453 (#9367's naive strip surviving in two packages/cli contract tests)
and #10427 (scanSource desyncing on nested template literals). This site does not strip comments at
all, so it is a third population rather than a residue of either.
Refs: #10123 (the card that created the guard) · #9367 (the comment-mask conversion) · #10449 (where this
was found).
Filed unassigned from the #10449 dev seat (session
session_01DdCnBGcHeufjrq7drTD3wt, branchclaude/issue-10449-ratchet-stack-headroom). Found while building a parallel adoption check next tothis one — the new check had the same bug, an ablation caught it, and the same ablation applied to the
existing one reproduces below. Not fixed there: #10449 is stop-the-bleed on parser stack headroom, a
different defect class, and this file is load-bearing enough to deserve its own diff.
The claim that is not true
scripts/eslint-fatal-guard.mjs'scheckGuardAdoption()(L190+) exists because "a guard imported onceis not a guard still called", and its result is asserted by
check-query-options-erasure-ratchet.mjs --self-test, which CI runs ahead of the gate itself. On successthe self-test prints:
That last clause is the one this card is about. It is produced by two source-text tests:
Neither is applied to code.
srcis the raw file, comments included.Measured, on
origin/main@46cfa5bscripts/check-slot-lookup-ratchet.mjsmentions the guard twice — once in prose, once for real:Delete line 48 only, leaving the docblock at line 27 exactly as it is:
Green, and the sentence it printed is false. The prose satisfies the regex. The second test does not
save it either: that gate no longer calls anything, so there is no
.lintFiles(to catch, and a gate thatcounted messages from
lintText()instead would clear both tests while doing zero guarding.Two distinct holes
//mention of the filename — including the one already sitting incheck-slot-lookup-ratchet.mjs— satisfies the import test on its own. The repo's answer tocomment-vs-code is
scripts/js-comment-mask.mjs("the ONE answer", written for exactly this class inSix source-scanning gates strip comments with a naive regex that a
/*inside a string literal blinds — the repo already has the string-aware masker they should use #9367); this file predates its adoption and still scans raw text.stripCommentsis the right pickhere — the check reports gate names, never offsets.
not". There is no positive
lintFilesStrict(assertion, so "imports it and never uses it" is a holethe docblock's own thesis names and the code does not close.
Both are the failure direction AGENTS.md calls worse than no verifier: it reports success. And it is
specifically a false green on the meta-check — the thing whose whole job is noticing that a gate went
quiet.
Severity: latent today
Both gates really do route through
lintFilesStrict()onmainright now, so nothing is currentlyunguarded. This is the guard that would fail to notice if that stopped being true — and #10123's whole
argument is that the symptom of losing it is identical output.
Suggested shape (the taking seat's call)
Mirror what landed for the sibling check in the #10449 PR:
construction. Delete the import line, leave the docblock, and require the self-test to red.
packages/clicontract tests)and #10427 (
scanSourcedesyncing on nested template literals). This site does not strip comments atall, so it is a third population rather than a residue of either.
Refs: #10123 (the card that created the guard) · #9367 (the comment-mask conversion) · #10449 (where this
was found).
Generated by Claude Code