json: raise wuffs cursor nesting bound to 16 - #46933
Open
botengyao wants to merge 1 commit into
Open
Conversation
Signed-off-by: Boteng Yao <botengyao@gmail.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.
Commit Message: json: raise wuffs cursor nesting bound to 16
Additional Description:
This raises kMaxTrackedDepth to 17 (effective limit 16), leaving headroom for
nested tool-call arguments, and records the Gemini path in the rationale
comment. Before: nesting at depth >= 9 fails with InvalidArgumentError. After:
depth >= 17 fails. The per-depth tracking arrays are fixed-size and grow with
the constant; the existing TODO about moving to dynamic depth is unchanged.
Risk Level: Low — one compile-time bound is raised, no logic changes.
Per-cursor fixed state grows by 8 array slots.
Testing: Updated the cursor depth boundary tests (16 accepted, 17 rejected) and
added a parser test that a realistic Gemini functionCall.args document parses.
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A