fix(reader-arc): compound extractor refuses no-digit compare clauses (wrong=0 hazard)

The compound discrete-count extractor's all-or-nothing tail guard is digit-
based, so a no-digit compare clause in a conjunctive list ('buys 4 lbs beans,
6 lbs milk, and twice the amount of carrots as beans') was silently DROPPED —
injecting 4+6 and losing the carrots (a wrong=0 landmine, masked only by the
case refusing elsewhere). The #78 substrate widens the compound extractor's
verb reach, so harden it: refuse the whole compound on any '<factor> the
amount/number of' / 'twice/thrice/times/half the' / 'double/triple' surface.
Verified: 0082 compound now refuses fail-closed; tune+measure wrong=0; PARSED
unchanged (3/2); smoke 176 green.
This commit is contained in:
Shay 2026-07-18 21:44:34 -07:00
parent c217af31ee
commit 2da1a33839

View file

@ -1129,6 +1129,14 @@ _COMPOUND_REFUSE_SUBSTRINGS: Final[tuple[str, ...]] = (
" half as ", " twice as ", " thrice ",
"%", " percent",
" half of ", " quarter of ", " third of ",
# ADR-0250 increment 1 — a compare clause using the "<factor> the
# amount/number of <REF>" surface carries NO digit, so the all-or-nothing
# tail-digit guard below cannot see it and would silently DROP it (e.g.
# "buys 4 lbs beans, 6 lbs milk, and twice the amount of carrots as beans"
# injected 4+6 and lost the carrots — a wrong=0 hazard). Refuse the whole
# compound when any such compare surface appears.
" twice the ", " thrice the ", " times the ", " half the ",
" the amount of ", " the number of ", " double ", " triple ",
)
# Fraction literal pattern (matched against raw statement, not padded).