1
0
Fork 0
Commit graph

2 commits

Author SHA1 Message Date
abbfe5f0fd docs(redos): sweep every regex surface, not just the lexicon
0.3.3 swept the 83 lexicon patterns arm-by-arm and left the other tables on
0.3.2's hand-written rows -- the class of sweep that misses arms. Generalise the
generator over all eleven regex-bearing modules and make the collector mechanical
on both axes: walk each module namespace for compiled patterns (a pattern added
later is swept without anyone listing it) and derive each one's call mode by
grepping the module source, since `.sub()`/`.finditer()` visit every start
position where `.match()` cannot. Patterns reached only through a helper
parameter get the worst mode, marked `*`, so the fallback can over-measure but
never miss.

Sweeps 137 patterns across 11 tables where 0.3.3 covered 83 in one.
2026-08-01 19:57:59 +02:00
23475f9ec6 docs(redos): preserve the arm-by-arm sweep that found the 0.3.3 patterns
The generator, not just its results. It synthesises an almost-match sample from
each regex's own skeleton and uses every token-boundary prefix as a repeating
unit, so `[`, `[system]` and `[system](` are each probed as separate arms.

Committed because the next step depends on it: 0.3.2 swept the other detector
tables with hand-crafted rows, and this session showed that class of sweep
misses arms -- a generic-payload pass found only one of the two patterns here.

Docstring carries the caveat the script cannot enforce: the ratio is computed
from two points, so a hit near the noise floor is a coin flip. Post-fix it flags
sub-agent:delegate-bypass at x2.8; measured over four doublings the exponent is
0.96-1.05, i.e. linear, 0.2s at the cap. Re-measure before concluding.

Not part of the package -- docs/, stdlib-only, no effect on the wheel.
2026-07-31 21:55:51 +02:00