Files
reverse-engineering-anything/tests/boundary/process
IvenKooandmorluto 27db243533 fix(static): keep quoted sample text out of the tech-debt marker scan (#11712)
fix(static): read comments instead of quoted text in the tech-debt scan

`npm run scan:todos` matched raw text, so a marker quoted inside a sample
string counted as debt: on `main` at a10037ef1 the only finding is the
JavaScript sample in
`tests/boundary/filesystem/mcpClientValidationGuard.test.ts`, and the
`Deep static checks` lane is red for every PR that runs it.

Decide what a comment is before counting a marker. JavaScript and TypeScript
are parsed with `@babel/parser`, whose comment ranges also survive a quote
inside a regex literal; `bridge/**/*.py` and `bridge/**/*.java` use a small
scanner that skips quoted and triple-quoted strings. Markers are matched per
occurrence, so a quoted marker earlier on the line no longer consumes a real
one, and an unparsable file stays conservative: every marker counts.

Fixes #11717.

Verified: `npm run scan:todos` exits 0 on this tree; the extended
`tests/boundary/process/scanTodos.test.ts` (3 tests) covers a clean tree, a
quoted sample with a real marker on the same line, and comments in
TypeScript, Python and Java. `check:fast` passes.

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-18 17:54:40 -05:00
..