You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refraction tools: three regexes with quadratic scaling (baselined by the #3214 sweep) #3222
Part of #3122. Found by the #3214 sweep (tests/tools/tool_regex_redos.py), which records these in tests/cobol_mainframe/tool_regex_redos_baseline.json so that CI fails only on new offenders.
#
site
pattern
input it runs over
measured (local, 2026-09-19)
1
cobol_dag_architect.py ~L96 re.finditer
\bOPEN\s+((?:INPUT|OUTPUT|I-O|EXTEND)\b[^.]*)\.
whole program
0.76s on 40k chars of OPEN INPUT with no period
2
cobol_graveyard_finder.py ~L308 re.findall (re.I)
(?:==)?([A-Z0-9_\-]+)(?:==)?\s+BY\s+…
one COPY statement's REPLACING clause (short in practice)
1.0s at 160k chars of SELECT X ASSIGN X , ~16x for 4x the input
Patterns 1 and 3 have the shape #3205 fixed for EXEC CICS … END-EXEC.: an unbounded run up to a required terminator is rescanned from every start. Pattern 2 is an unbounded name before a required BY.
Direction. Bound each run the way #3205 did, then drop its baseline entry.
Proof.
python tests/tools/tool_regex_redos.py --ci reports each entry as "no longer reproduces".
python tests/tools/refraction_snapshot.py check, plus --corpus … locally, shows the generated output unchanged, or the PR explains the change.
Activity
test(refraction): pinned mainframe corpora, generated-output snapshot…
fix(refraction): bound the three quadratic tool regexes (#3222) (#3230)