Repository navigation
fix: bump ifstruct so oversized JSON numbers score as parse errors - #4
Merged
Merged
Conversation
A completion whose number literal exceeds CPython's int() digit limit made the ifstruct validator raise a bare ValueError instead of reporting a parse error, so one degenerate response failed the entire scoring batch with a 500.
ykhrustalev
force-pushed
the
fix/json-oversized-int-literal
branch
from
August 21, 2026 15:07
c440f64 to
e262805
Compare
ykhrustalev
marked this pull request as ready for review
August 21, 2026 15:07
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.
Problem
ifstruct's JSON path raised a bareValueErrorwhen a completion's number literal exceeded CPython's 4300-digitint()limit, because_load_complete_jsoncaught onlyjson.JSONDecodeError. A model that hit a decode loop and spent its whole generation budget on one number took down the entire scoring request, not just its own completion.Solution
vendor/ifstructto the fix, which reports such a response as a parse error instead of raisingTesting
number literal exceeds the 4300-digit int limitpytest packages vendor/ifstruct/tests→ 169 passedRefs Liquid4All/ifstruct#3 — merge that first, then re-point the pin at its merge commit.