Files
RingBRP/docs
slaguru666andClaude Opus 5 bd9b3bdd27 check-figures: use the capture's position, not a search for its text
R-308. Read the fold as a stranger at its author's request. Two of the three
risks they flagged are sound: isProse drops nothing that carries a citation
(scanned the whole corpus), and the duration exclusion earns its place, since
"runs" now means three things in this corpus and only the cell can tell them
apart.

The third is real. numEnd used line.indexOf(m[1], m.index), which finds the
first copy of the digits at or after the match start rather than the copy that
was captured:

  "The wipe rate of 74 in ten is 74%<!-- cite: ... -->."
     value=74  numAt=17  marked=FALSE

A correctly cited figure reported bare, because numEnd lands mid-sentence and
the marker test reads " in ten is 74%...". Fixed with the d flag: m.indices[1]
gives the capture's real position and there is nothing to search for.

Narrow to reach — it needs the wipe-rate shape, the only one with a wide gap
before its capture, and an integer duplicate inside that gap; a decimal cannot
do it because [^.] will not span a decimal point. Three attempts failed for
that reason before the fourth worked, which is why this is recorded as narrow
rather than theoretical.

Worth fixing anyway because its direction is the bad one: a miss costs one
figure, a false positive on correct prose costs the guard.

Seven-case battery re-run, every restore byte-identical.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 20:35:43 +01:00
..