Skip to content

fix(python): bound excluded-element preflight - #9

Merged
jt55401 merged 1 commit into
mainfrom
fix/python-preflight-backtracking
Aug 28, 2026
Merged

fix(python): bound excluded-element preflight#9
jt55401 merged 1 commit into
mainfrom
fix/python-preflight-backtracking

Conversation

@jt55401

@jt55401 jt55401 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the Python excluded-element preflight regex with a deterministic quote-aware scanner
  • reject incomplete excluded opening tags without regex backtracking
  • add regressions for quoted delimiters and a distilled pathological input

Corpus reproducer

Common Crawl record d8851c6675546bf3 (125,610 bytes) now rejects in about 1.2 ms. The previous regex exceeded 12 seconds on the distilled reproducer and consumed a core for more than ten minutes in Study 1.

Verification

  • 56 Python unit tests passed
  • 118 shared conformance fixtures passed
  • Python compilation passed
  • git diff --check

@jt55401
jt55401 merged commit 47d9273 into main Aug 28, 2026
6 checks passed
@jt55401
jt55401 deleted the fix/python-preflight-backtracking branch August 28, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant