Repository navigation
fix(desktop): preserve Zip64 counts in exported ZIP views - #11759
ShuaixinHuang wants to merge 1 commit into
Conversation
Codex Review Summary: ❌ FailedThis 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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; no actionable issue was found. SummaryFixes exported Python ZIP views when the selected listing exceeds 65,535 files.
Tests were inspected, not rerun. Remote supersession could not be checked because GitHub authentication was unavailable; local history showed no superseding change. Reviews (1) · Last reviewed commit: "fix(desktop): preserve Zip64 counts in e..." · Reviewed by Greptile |
|
@morluto Could you please review this PR when you have time? As the author, I am finding the ongoing work of keeping these pending branches synchronized and revalidated a substantial maintenance burden. The current head's CI has passed, there are no unresolved inline review threads, and the PR description records the evidence and remaining validation limits. If this change is outside the project's priorities or scope, a clear direction would also help me avoid further unnecessary maintenance. Thank you. |
|
The bounded exported ZIP directory now retains exact Zip64 counts beyond the classic limit in #12157. That PR includes parity coverage at and above the sentinel. Closing this superseded implementation. |
Summary
An exported desktop environment reports a healthy ZIP as
not a readable zip archivewhen its selectedzip_entriesexceeds 65,535. The bounded directory already has a Zip64 end record, but the Python reader also packs the full retained count into the classic end record's 16-bit fields. At 65,536 files,struct.packoverflows and the reader misclassifies its own framing failure as archive damage.Reproduced with a ZIP independently written and read by Python's standard-library
zipfile, on main3676ec632bfbe4fde2f5303daa0d9261072ce04a. No related count-serialization PR was found. Existing #9173/#10618 address input Zip64 record location; this repair concerns the exported reader's generated decoder copy.Change
Give bounded-directory framing one
_zip_directory_tailowner. Preserve exact Zip64 counts, size, offset and locator coordinates; saturate the classic 16-bit count and 32-bit size/offset fields at their format-defined sentinels. The requested listing is preserved rather than capped at 65,535.Keep directory selection, prepended-data offset handling, per-member/total-byte/ratio limits, integrity checks and archive ordering intact. Document raised listing policies. This changes existing offline desktop views without adding target execution or provider authority.
Executed validation
Linux, Node 24.22.1 / npm 11.9.0:
not a readable zip archive; the repaired reader preserves the complete listing.export-desktop-application --view-policy ...case executes the exact emitted Python reader and verifies its 65,536-file policy/listing. Its capture uses a small seed; the large archive represents later application state. The AgentEnv framework is not required or exercised.0xffffffff, without allocating or claiming to read a 4 GiB archive.npm run check:fast, normal commit/pre-push hooks andgit diff --checkpassed. Scoped typed lint: four files, zero errors and zero warnings. All 3734 test/spec files are discovered exactly once.npm run docs:check: six tasks and eight README consistency tests passed.Large-count cases deliberately retain the existing one-byte member budget, so two-byte payloads remain explicitly unread while listing all selected identities. They qualify directory fidelity, not decompression of every large-archive member. Existing ZIP regressions separately exercise readable contents, CRC/size failures, Unicode names and resource ceilings. No timeout or heap allowance was raised. Native Windows/macOS, the complete monolithic suite and a live AgentEnv computer were not run. Hosted CI remains pending for the published head.
Author readiness
Human owner: @ShuaixinHuang