Repository navigation
fix(model): validate GGUF extents before capacity - #9631
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
|
Raw GGUF and Safetensors lengths/counts are now checked against physical file bounds before capacity admission or numeric conversion. GGUF framing uses the complete 24-byte tensor minimum. Decoded header counts survive capacity refusal as partial Evidence; scalar bigint metadata is unchanged. Validation: 138 model boundary tests passed; check:fast passed. Coverage uses local format fixtures and sparse files, without model execution. |
blankym
added a commit
to blankym/rea
that referenced
this pull request
Nov 10, 2026
3 tasks done
7 of 22 tasks
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.
Summary
Truncated GGUF files with oversized tensor counts or string lengths were rejected as exceeding the report budget before their declared extents were checked. Validate those extents first, using the existing reader, so impossible declarations report malformed input. Declarations whose minimum extents fit still receive the representation-capacity refusal.
The same owner already follows this ordering for arrays; Safetensors is a working sibling comparison. No new limits or abstractions are introduced.
Validation and scope
Both malformed-input regressions failed before their respective fixes. With Node 24.22.1, 139 tests across the model, cancellation and identity suites passed; the model suite passed 133 tests after the final capacity control was added. Sparse-file controls exercise fitting extents without allocating the declared payload in memory. Scoped formatting and diff checks passed.
This is a local header-parser correctness repair. No model execution or real model/toolchain qualification, new authority, provider, dependency, installer or generated metadata. Maintainer scope decision is not applicable to this existing format boundary.
Author readiness
Remaining-work integration
Raw GGUF and Safetensors lengths/counts are now checked against physical file bounds before capacity admission or numeric conversion. GGUF framing uses the complete 24-byte tensor minimum. Decoded header counts survive capacity refusal as partial Evidence; scalar bigint metadata is unchanged.
Validation: 138 model boundary tests passed; check:fast passed. Coverage uses local format fixtures and sparse files, without model execution.