Repository navigation
Stream ZIP release members with ZIP64 headers - #534
Merged
Pedro Henrique Penna (ppenna) merged 2 commits intoOct 14, 2026
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix addresses the reported failure and includes an effective regression test.
0 open findings
What changed in this PR
Fixes ZIP release creation for streamed members exceeding the ZIP64 size limit.
Changes:
- Forces ZIP64 headers for streamed ZIP members.
- Adds a regression test using a reduced ZIP64 threshold.
| File | Description |
|---|---|
scripts/nvx_tools/archive.py |
Enables ZIP64 for streamed members. |
scripts/test_nvx_tools.py |
Verifies large streamed members archive correctly. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pedro Henrique Penna (ppenna)
merged commit Oct 14, 2026
8438357
into
microsoft:dev
29 checks passed
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.
Bug
create_reproducible_release_archivewrites.ziprelease archives by opening each member withZipFile.open(info, "w")withoutforce_zip64.ZipInfo.file_sizeis left at its default of 0, so Python writes a non-ZIP64 local header. When a member's uncompressed size exceedszipfile.ZIP64_LIMIT(2 GiB by default),close()raisesRuntimeError: File size too large, try using force_zip64. Thearchive-releasecommand then fails and no archive is produced. The.tar.gzpath is not affected.Change
Pass
force_zip64=Truewhen opening each streamed ZIP member inscripts/nvx_tools/archive.py. The streaming copy, the checksum and snapshot validation, and the reproducible metadata are unchanged.Testing
Added
test_zip_release_archive_streams_members_past_zip64_limit, which patcheszipfile.ZIP64_LIMITto 1024 bytes and archives a 4096-byte member. On the unfixed code it fails withRuntimeError: File size too large, try using force_zip64. With the fix it passes.Checks run:
cd scripts && python -m unittest test_nvx_tools.SharedFileTests.test_zip_release_archive_streams_members_past_zip64_limit(exit 0, OK)cd scripts && python -m unittest test_nvx_tools.SharedFileTests.test_release_archives_are_reproducible_with_fixed_layout_and_modes(exit 0, OK)Regression test: fails on base twice (/RuntimeError: File size too large, try using force_zip64/), passes on fix twice (
cd scripts && python -m unittest test_nvx_tools.SharedFileTests.test_zip_release_archive_streams_members_past_zip64_limit)Fixes #502