You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reject truncated tensors in the Flash Next pack comparator - #919
tools/zig/pack_compare.py could report packs match for truncated Flash Next packs: it clipped both tensor reads to their common prefix. Two identically truncated payloads also passed.
Validate each tensor's byte count against its dtype and shape, file boundary and actual read length before comparison. Invalid tensors count as differences; complete tensors still require matching names, dtypes, shapes and bytes. Empty and scalar tensors remain valid.
Validation on upstream 46a08c18608153bfc566703a88acc883bc6140f4, patch 9ef17f27e1c94bdc2ed8c91d6a6affc7ec36786e:
Six regressions pass with Python 3.14.7 and NumPy 2.5.2. The unchanged original base produced four failures. The path-scoped CI workflow pins both versions.
Full Zig 0.17.0 host, kernel-contract, golden and fuzz checks pass: 214/214 build steps; zero unexpected golden differences. Whole-tree formatting and patch whitespace pass. Lean: 517 inherited findings, zero new.
Range-diff confirms the patch is unchanged after the rebase. Astra found no new integration blocker. All five checks for this rebased head pass: pack comparison, Zig format, No GPU, desktop and mobile.
Found while auditing the packing evidence for #706. This is tensor comparison with length and geometry checks. It does not validate all Safetensors invariants or qualify a 4-bit checkpoint/model.
All five checks pass on 54ab3294, including the six pack-comparison regressions on Linux with Python 3.14.7 and NumPy 2.5.2. Local whole-tree Zig tests also finished: 160/160 steps, 1981 passed and 8 skipped. Formatting, server goldens, fuzz and the lean comparison pass (zero new findings). Main is still c7137bb3.
I marked this comparator-only fix ready for review. The checkpoint and model gates for #706 remain separate.
Rebased onto main 46a08c18 at 9ef17f27; range-diff confirms the comparator patch is unchanged. All five checks pass on this head, including the six Linux regressions with Python 3.14.7 and NumPy 2.5.2. Local whole-tree host/kernel/golden/fuzz validation passes 214/214 build steps, formatting passes, and lean has zero new findings.
Ready for maintainer review. This remains the comparator completeness fix; #706 still needs checkpoint and model qualification.
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
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.
tools/zig/pack_compare.pycould reportpacks matchfor truncated Flash Next packs: it clipped both tensor reads to their common prefix. Two identically truncated payloads also passed.Validate each tensor's byte count against its dtype and shape, file boundary and actual read length before comparison. Invalid tensors count as differences; complete tensors still require matching names, dtypes, shapes and bytes. Empty and scalar tensors remain valid.
Validation on upstream
46a08c18608153bfc566703a88acc883bc6140f4, patch9ef17f27e1c94bdc2ed8c91d6a6affc7ec36786e:Found while auditing the packing evidence for #706. This is tensor comparison with length and geometry checks. It does not validate all Safetensors invariants or qualify a 4-bit checkpoint/model.