Skip to content

fix(desktop): recognize empty ZIP state views - #12163

Merged
morluto merged 3 commits into
audit/parser-zip64from
audit/parser-empty-zip
Nov 19, 2026
Merged

morluto merged 3 commits into
audit/parser-zip64from
audit/parser-empty-zip

Conversation

@morluto

@morluto morluto commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Summary

A standard empty ZIP was classified as binary even though the directory reader accepts it. Desktop state views and the generated verifier now recognize empty classic and ZIP64 archives through the same ZIP signature facts. Nested ZIP members retain the existing viewless behavior. An empty ZIP wrapped in gzip also reaches the same reader.

This refresh credits @wunianze666-netizen's work in #9336 and carries that patch forward on top of #12157. The ZIP64 draft is the base so this review shows only the state detection changes.

Contract and boundary impact

This is passive inspection of selected state files. Host and generated reader dispatch change while the existing directory, recursion, and storage bounds still apply. No CLI or MCP schema migration is required.

Validation performed

  • npm run test:focused -- tests/boundary/providers/desktopEmptyZip.test.ts tests/boundary/providers/desktopGzipPython.test.ts passed 13 tests on Node 24.22.1.
  • npm run check:fast and git diff --check passed.
  • The fixtures exercise the host reader and generated Python. Live application export remains unverified for this draft.

Author readiness

Human owner: @morluto

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@morluto
morluto marked this pull request as ready for review November 19, 2026 02:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T02:57:21.227636Z 5e21f66 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no blocking issues were found.

Summary

Desktop state views and exported Python readers now recognize empty classic and ZIP64 archives without relying on file names.

  • Desktop state views recognize empty classic and Zip64 ZIP archives.

No actionable issues found. Reviewed the related changes in #12157; no higher replacement PR was supplied. Tests were inspected, not run.

Reviews (1) · Last reviewed commit: "refactor(zip): share the local-header si..." · Reviewed by Greptile

@morluto
morluto merged commit 520b9d6 into audit/parser-zip64 Nov 19, 2026
1 check passed
@morluto
morluto deleted the audit/parser-empty-zip branch November 19, 2026 03:00
morluto added a commit that referenced this pull request Nov 19, 2026
…ews (#12157)

* fix(desktop): reject split ZIP volume metadata

Refs #12137

* refactor(zip): read Zip64 disk fields through BinaryReader

* fix(desktop): validate ZIP extra fields before selection

Refs #12146

* fix(desktop): keep bounded ZIP pairing compatible with Python 3.9

* fix(desktop): retain exact counts in bounded Zip64 views

* fix(desktop): follow the declared Zip64 directory frame

* fix(desktop): recognize empty ZIP state views (#12163)

* fix(desktop): recognize empty ZIP state views

(cherry picked from commit 263b25b)

* fix(desktop): reuse empty ZIP admission for wrapped documents

* refactor(zip): share the local-header signature with desktop state

---------

Co-authored-by: wunianze666-netizen <[email protected]>

* test(zip): inherit the portable ZIP count deadline

---------

Co-authored-by: wunianze666-netizen <[email protected]>
@morluto morluto mentioned this pull request Nov 19, 2026
13 of 22 tasks
@morluto morluto added bug Something isn't working area: runtime Process capture and runtime observation labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants