Skip to content

fix: bump ifstruct so oversized JSON numbers score as parse errors - #4

Merged
ykhrustalev merged 1 commit into
release/2026.08.1from
fix/json-oversized-int-literal
Aug 21, 2026
Merged

ykhrustalev merged 1 commit into
release/2026.08.1from
fix/json-oversized-int-literal

Conversation

@ykhrustalev

Copy link
Copy Markdown
Member

Problem
ifstruct's JSON path raised a bare ValueError when a completion's number literal exceeded CPython's 4300-digit int() limit, because _load_complete_json caught only json.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

  • Bumps vendor/ifstruct to the fix, which reports such a response as a parse error instead of raising

Testing

  • Rescored two affected 2000-completion IFStruct batches: all completions score with no exception, and the responses that reach this path report number literal exceeds the 4300-digit int limit
  • pytest packages vendor/ifstruct/tests → 169 passed

Refs Liquid4All/ifstruct#3 — merge that first, then re-point the pin at its merge commit.

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
ykhrustalev force-pushed the fix/json-oversized-int-literal branch from c440f64 to e262805 Compare August 21, 2026 15:07
@ykhrustalev
ykhrustalev marked this pull request as ready for review August 21, 2026 15:07
@ykhrustalev
ykhrustalev changed the base branch from main to release/2026.08.1 August 21, 2026 15:08
@ykhrustalev
ykhrustalev merged commit 8555adf into release/2026.08.1 Aug 21, 2026
8 checks passed
@ykhrustalev
ykhrustalev deleted the fix/json-oversized-int-literal branch August 21, 2026 16:14
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.

1 participant