Commit 833fd1c
feat(devx): watch the comment-stripper family so a new private copy reds (#12372)
`scripts/js-comment-mask.mjs` exists because two private `stripComments`
families drifted apart in opposite directions. Nothing watched ADOPTION:
`check:comment-mask-corpus` verifies the shared mask against a real parser,
which is a claim about the module and says nothing about its callers. The
module landed, some callers were converted by hand, and the residue was
found by hand three separate times.
Add `scripts/check-comment-mask-adoption.mjs`: a spelling gate over
`packages/**` + `examples/**` that reds when a NEW private comment-stripper
appears, while the 23 measured pre-existing ones sit in a shrink-only
ledger and are not required to move first. Converting them is per-row and
deliberately not this gate's call.
Three points the implementation turns on:
* The scan masks comments with the very module it protects. Measured on
1f6b8bb the naive-block-regex probe matches 17 files raw and 14
masked: the three converted `canonical-expression-envelopes.test.ts`
files now mention the old regex only in the prose explaining why they
moved. An unmasked gate would red forever on the files that complied.
* A recorded row the scan no longer finds FAILS as stale, which turns "no
findings" into "the recorded set is exactly reached". Ablating one
detector reddens the production run with 3 stale rows instead of going
quietly green.
* The population is declared as subtree globs, so the gate is reachable by
`dispatch-gates` and the bare-root species is unreachable from it.
Not a widening of `check:parse-guard`: that gate governs the three
TypeScript parser entry points and its own header refuses a root broader
than `scripts/**` twice; widening its population would still catch no
stripper.
Claude-Session: https://claude.ai/code/session_01UjM2ia8Av1v5NqfqQEQmC6
Co-authored-by: Claude <noreply@anthropic.com>1 parent ff56a85 commit 833fd1c
2 files changed
Lines changed: 471 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
357 | 393 | | |
358 | 394 | | |
359 | 395 | | |
| |||
0 commit comments