Filed unassigned by the os-dev seat implementing #11576 (PR #12266). Observation-class; recording the residual, not claiming it.
What
#9367 converted six source-scanning gates off the naive comment-strip regex and onto the string-aware scripts/js-comment-mask.mjs. #10453 then found the same regex surviving in two packages/cli contract tests — "the fix converted the six gates, not the scans that live beside serve.ts".
There is a third residue, in a pair neither card covered. Both canonical-envelope page gates carry the regex, byte-identical to each other and to the family #9367 retired:
packages/platform-objects/src/pages/canonical-expression-envelopes.test.ts:94packages/cloud-connection/src/canonical-expression-envelopes.test.ts:94
functionstripComments(source: string): string{returnsource.replace(/\/\*[\s\S]*?\*\//g,'').replace(/^[\t]*\/\/.*$/gm,'');}Each feeds the export const X: Page = population scan that decides which pages that package's gate audits.
Why it matters here specifically
js-comment-mask's header prices this exact regex: a block-comment opener inside a string literal opens a phantom comment running to the next real terminator, deleting every line of real code in between. Measured over ~4,739 files, 16 disagreed with a real parser, 15 in the FABRICATES direction, up to 10,252 comment bytes handed to a caller as live code in one file.
The consequence for these two gates is the silent-success direction, and it is the same defect their own package gate exists to prevent: a phantom comment swallowing an export const X: Page = declaration removes that page from the gate's population, and the gate then reports green over a page it never audited. That is #11576's defect class re-entering through the detector rather than through the authoring.
Nothing currently catches it: scripts/check-parse-guard.mjs — which exists because "two private stripComments families drifted apart" — scans scripts/, not package test sources, which is exactly why #10453 had to be filed by hand for the packages/cli pair.
Not observed failing
No current page declaration in either package trips the phantom-comment shape, so both gates are green today and correctly so. This is the latent class, not a live break — the same posture #9367 and #10453 were filed in.
Possible closures
No recommendation recorded. Noting only that this is the second hand-filed residue of the same conversion, which is itself the argument for B.
Filed unassigned by the os-dev seat implementing #11576 (PR #12266). Observation-class; recording the residual, not claiming it.
What
#9367 converted six source-scanning gates off the naive comment-strip regex and onto the string-aware
scripts/js-comment-mask.mjs. #10453 then found the same regex surviving in twopackages/clicontract tests — "the fix converted the six gates, not the scans that live besideserve.ts".There is a third residue, in a pair neither card covered. Both canonical-envelope page gates carry the regex, byte-identical to each other and to the family #9367 retired:
packages/platform-objects/src/pages/canonical-expression-envelopes.test.ts:94packages/cloud-connection/src/canonical-expression-envelopes.test.ts:94Each feeds the
export const X: Page =population scan that decides which pages that package's gate audits.Why it matters here specifically
js-comment-mask's header prices this exact regex: a block-comment opener inside a string literal opens a phantom comment running to the next real terminator, deleting every line of real code in between. Measured over ~4,739 files, 16 disagreed with a real parser, 15 in the FABRICATES direction, up to 10,252 comment bytes handed to a caller as live code in one file.The consequence for these two gates is the silent-success direction, and it is the same defect their own package gate exists to prevent: a phantom comment swallowing an
export const X: Page =declaration removes that page from the gate's population, and the gate then reports green over a page it never audited. That is #11576's defect class re-entering through the detector rather than through the authoring.Nothing currently catches it:
scripts/check-parse-guard.mjs— which exists because "two privatestripCommentsfamilies drifted apart" — scansscripts/, not package test sources, which is exactly why #10453 had to be filed by hand for thepackages/clipair.Not observed failing
No current page declaration in either package trips the phantom-comment shape, so both gates are green today and correctly so. This is the latent class, not a live break — the same posture #9367 and #10453 were filed in.
Possible closures
maskCommentsfromscripts/js-comment-mask.mjs, as Six 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 did for the six gates. Cross-package import from a test needs thecheck:cross-package-test-inputsspelling those gates already use for their ownsrc/walk.check:parse-guard's population beyondscripts/so the next copy is caught mechanically rather than by a passing dev. This is the one that closes the class; #9367's naive comment strip survives in twopackages/clicontract TESTS — the fix converted the six gates, not the scans that live besideserve.ts#10453 and this card are both evidence that hand-filing does not keep up.No recommendation recorded. Noting only that this is the second hand-filed residue of the same conversion, which is itself the argument for B.