Skip to content

[WJ-1060] Avoid exponential parsing of nested unclosed blocks - #129

Open
jsthope wants to merge 15 commits into
scpwiki:mainfrom
jsthope:main
Open

[WJ-1060] Avoid exponential parsing of nested unclosed blocks#129
jsthope wants to merge 15 commits into
scpwiki:mainfrom
jsthope:main

Conversation

@jsthope

@jsthope jsthope commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

see WJ-1060

This PR improves handling of malformed and unclosed blocks by memoizing terminal EndOfInput failures for block and block-star rules.
And by including relevant parser state in the cache key including bibliography state.

@jsthope
jsthope requested a review from emmiegit as a code owner July 29, 2026 11:09
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.34884% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.40%. Comparing base (782ce11) to head (655243d).

Files with missing lines Patch % Lines
src/parsing/parser.rs 93.93% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
+ Coverage   71.17%   71.40%   +0.22%     
==========================================
  Files         220      220              
  Lines        6234     6266      +32     
==========================================
+ Hits         4437     4474      +37     
+ Misses       1797     1792       -5     
Flag Coverage Δ *Carryforward flag
ftml 64.39% <ø> (ø) Carriedforward from 6018e60

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
src/parsing/rule/mod.rs 73.33% <100.00%> (+8.11%) ⬆️
src/tree/bibliography.rs 50.00% <100.00%> (+2.50%) ⬆️
src/parsing/parser.rs 87.54% <93.93%> (+1.38%) ⬆️

... and 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/parsing/rule/mod.rs Outdated
Comment thread src/parsing/rule/mod.rs Outdated
Comment thread src/parsing/parser.rs Outdated
Comment thread src/parsing/parser.rs Outdated
Comment thread src/test/large.rs
@emmiegit

emmiegit commented Aug 1, 2026

Copy link
Copy Markdown
Member

Good enhancements! I had a few comments.

@jsthope
jsthope requested a review from emmiegit August 1, 2026 06:08
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.

2 participants