Repository navigation
fix(desktop): recognize empty ZIP state views - #9336
Closed
wunianze666-netizen wants to merge 1 commit into
Closed
wunianze666-netizen wants to merge 1 commit into
wunianze666-netizen wants to merge 1 commit into
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. |
Contributor
[Medium impact] The PR appears safe to merge; no actionable defect was found. SummaryEmpty classic and Zip64 archives now receive the existing ZIP view in desktop state inspection and exported Python.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
S[Shared ZIP signatures] --> N[Native format detection]
S --> P[Generated Python detection]
N --> F[File or archive entry]
P --> F
F -->|File| R[Existing bounded ZIP reader]
F -->|Nested archive| E[Keep format; refuse view]
R -->|Readable| V[ZIP view, including zero entries]
R -->|Unreadable| U[Keep error; no view]
Reviews (3) · Last reviewed commit: "fix(desktop): recognize empty ZIP state ..." · Reviewed by Greptile |
This was referenced Nov 12, 2026
This was referenced Nov 19, 2026
Owner
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
Keep empty ZIP files readable in desktop state views and exported task verifiers. The ZIP reader already supports them, but format detection calls them binary, so a task asking the user to remove every archive entry cannot be exported. This is an independently reproduced defect; no separate issue is linked.
Problem and expected behavior
The unchanged ZIP reader accepts a standard 22-byte empty ZIP as
{entries: [], entry_count: 0, truncated: false}. On frozen main2ac85788271f8650da0b46d680a41c06e197cde2, state detection and exported Python_viewnevertheless return binary/no view. PKWARE APPNOTE §4.3.1 defines an EOCD-only file as an empty ZIP.An authored capture changes one nonempty archive to this empty archive. The actual compiled state CLI reports
[zip, binary];export-desktop-application --taskexits 1 withinvalid_request. After this fix the same capture reports[zip, zip], exports successfully, and its exact generated reader/verifier grades seed false and final true. The nonempty seed view and source archive bytes are preserved; the exported task reportsfailing_on_seed: ["empty"].Change and scope
Expose the existing ZIP signature byte patterns as canonical data, preserving the general recognizer's behavior. Desktop detection reuses that owner; generated Python byte prefixes come from the same list. Non-local signatures require at least the format's 22-byte EOCD minimum, preserving the existing six-byte truncated-header binary control. The ZIP readers still decide directory validity and existing storage support.
The generated
_is_zippredicate serves both files and entries. Empty nested archives retain formatzipwith the existing viewless-archive refusal, without recursive reading. Existing local-header recognition, decoder limits and extraction policy remain. This is an ordinary passive-format correction; a separate maintainer scope decision is not applicable. No unmerged Zip64 locator or filename implementation is included.Contract and boundary impact
zipvalues now represent empty archives rather than binary/no view. This verification covers the CLI operations, not a new named MCP qualification.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): none; owning guide/spec/plan descriptions are synchronized.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
[false, true], with canonical task id and unchanged source bytes.For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
node scripts/run-exact-tests.mjs run tests/boundary/providers/desktopEmptyZip.test.ts src/domain/desktop/stateFormats.test.ts src/artifacts/artifactFormats.test.ts src/application/desktop/DesktopArchiveTask.test.ts— 39 passed, no skips or name filtering; includes all 7 new regressions.npm run build:cached— baseline 3 successful / 3 cached; candidate 3 successful / 1 cached, actual compilation.npm run check:ci:fast,npm run docs:check,npm run verify:test-discovery,git diff --check— passed; discovery checks registration rather than executing the whole corpus. Repository lint warnings remain.npm run knip— passed. The frozen base includes accepted #9332, which registers the standalone verifier and repairs #9295; no unmerged repair was copied. Full localnpm run checkwas not rerun, so its later architecture/production-Knip/typed-lint chain is not claimed verified here.Windows, Node 24.22.1 and Python 3.11. No performance, token or process-memory improvement is claimed. CI run
42456211901, attempt 1, for current head263b25bd34bc644600a8957f5c1a01b8d0ba49fccompleted successfully (metadata read). Raw logs and the actual integration checkout were not audited; this adds no per-test or platform qualification beyond the local evidence above.Compatibility, safety, and release
Author readiness
Human owner: @wunianze666-netizen
Before merge
type(scope): outcome.