fix: support bounded larger JSON quote ownership and explain limits - #626
Open
mohgupta-ship-it wants to merge 3 commits into
Open
mohgupta-ship-it wants to merge 3 commits into
mohgupta-ship-it wants to merge 3 commits into
Conversation
Signed-off-by: Mohit Gupta <mohgupta@nvidia.com>
Signed-off-by: Mohit Gupta <mohgupta@nvidia.com>
Signed-off-by: Mohit Gupta <mohgupta@nvidia.com>
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.
Prepared by Codex on behalf of Mohit.
Valid JSON above 65,536 source characters could leave structural quotes unproven and produce incomplete instruction analysis. This change supports complete candidates through 131,072 raw source characters using an iterative grammar validator, and explains remaining capacity limits with
json_quote_ownership_limitand source coordinates.The larger-input validator advances without recursion or decoded-value allocation, bounds its normalized validation copy, and checks cancellation throughout strings, numbers, whitespace, and container parsing. Quotes gain ownership only after the entire candidate validates. The established small-input decoder and independent frontmatter bound remain in place; a failed small decode is never retried through the new path.
Real commands and reconstructed instructions remain subject to the existing analyzers. Other parser, reconstruction, window, or runtime limitations can still make analysis incomplete. Capacity diagnostics preserve existing findings and CLI/MCP rejection, including after mocked successful semantic analysis. Unknown future reason codes also remain conservative in CLI, MCP, and SARIF consumers.
Compatibility: otherwise supported benign values between the old and new limits can now complete and change strict CLI exit status. Historical rejection expectations require an explicit versioned migration; no duplicate legacy reason is emitted to satisfy old predicates. The migration note marks this as an unreleased change after the 2.12.0 baseline.
Validation at
aceb7ba7fb3fe99c8987b51f900665aa73b32103:git diff --checkpassed.