Repository navigation
bounded parsing for safety - #3
Merged
Merged
Conversation
MichaelMure
force-pushed
the
bounded-parsing
branch
from
October 10, 2026 10:57
76f6529 to
143b8be
Compare
There was a problem hiding this comment.
MichaelMure has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the oversized-edit allocation path before merging; it can exhaust memory before returning the new limit error.
Findings
Summary
Adds 16 MiB, entry/header, and item limits to parsing and edits. File loads now emit entries while parsing and share an entry budget across includes.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A["File bytes"] --> B["Byte limit"] B --> C["parseFile: entry and item limits"] C --> D["Editable File"] D --> E["Build replacement text and output"] E --> F["parseFile checks edited output"] F -->|Accepted| G["Replace File contents"] F -->|ErrLoadLimit| H["Keep original contents"] I["Env.Load"] --> J["parseEntries with shared budget"] J --> K["Emit entry, then follow include"] K -->|Included file| J K -->|Continue parent| JReviews (1) · Last reviewed commit: "bounded parsing for safety" · Reviewed by Greptile