Skip to content

feat(artifacts): read Zstandard ZIP members - #7780

Merged
morluto merged 2 commits into
morluto:mainfrom
ShuaixinHuang:codex/resubmit-zip-zstd
Oct 28, 2026
Merged

morluto merged 2 commits into
morluto:mainfrom
ShuaixinHuang:codex/resubmit-zip-zstd

Conversation

@ShuaixinHuang

Copy link
Copy Markdown
Contributor

Problem and result

Replaces #7065 at the author's request, rebuilt on pinned main 18a8e71c. Only the original five ZIP feature files remain; the old branch's shared CI repairs and unrelated import changes are excluded.

Read/extract ZIP members using Zstandard compression method 93 through zip.js's codec API and Node's native streaming decoder. zip.js still owns ZIP framing, CRC and declared size checks; artifact budgets, containment, member identity and cancellation remain enforced. No new dependency, ZIP parser or historical method-20 support is added.

The original feature semantics are unchanged. The documentation paragraph is fitted around current upstream HEX/uImage content without reverting that content.

Verification

Windows x64, Node 24.22.1 / npm 11.16.0, fresh locked dependencies and verified matching Windows native 6.8.0 prerequisite:

  • Two complete focused files passed 64 tests / 4 existing Windows skips: 39 reader cases and 25 compiled CLI integrity/inventory/extraction cases. The matching three-task build passed.
  • Coverage includes exact member bytes, integrity/declared-size failures, corrupt or truncated Zstandard frames, decoder-window bounds, unsupported methods, cancellation and reader reuse.
  • npm run docs:check: six tasks passed, followed by 9/9 README consistency tests.
  • Normal pre-commit lint/format and pre-push typecheck/lint 2/2 passed (242 ms); worktree clean.
  • npm run check: 5/6 tasks, with ordinary Knip failing only on unchanged HexRecordRegionMetadata. The same sole error was independently reproduced on clean pinned 18a8e71c; fix: remove unused hex record metadata type #7718 already addresses it. The aggregate command is not green; no unrelated cleanup is included.

The four platform skips remain unexecuted locally. Fixtures construct ZIP records and use Node's Zstandard codec; no independent external ZIP corpus, analysis engine, Linux/macOS local execution or full-suite pass is claimed. The replacement is 5 files, 411 additions / 9 deletions. Its hosted CI must complete independently; green checks on old #7065 do not qualify this new head.

Author readiness

Human owner: @ShuaixinHuang

  • 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.

The human owner explicitly confirmed review and responsibility for this PR and requested formal maintainer review in this session on 2026-10-25.

The existing human review and responsibility declaration is retained for this same feature, with an upstream refresh and removal of unrelated historical patches.

Before merge

  • Same ordinary static archive compatibility feature; no expanded authority or dependencies.
  • Valid, malformed, integrity, resource and cancellation controls retained.
  • Current evidence, unavailable coverage and original PR linked.
  • Latest-head hosted checks complete.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-28T11:34:08.011241Z
We couldn’t complete this review. Comment @codex review to try again.
ba3f4f9 PR opened
ℹ️ 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 Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest change appears safe to merge; the previous finding is fixed and no new blocking issues were found.

Summary

Adds ZIP method-93 support through Node’s streaming Zstandard decoder while keeping zip.js responsible for ZIP integrity checks.

  • ZIP artifact readers can now read members compressed with Zstandard method 93.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  ZIP["ZIP method-93 member"] --> Framing["zip.js reads ZIP records"]
  Framing --> Decoder["Node Zstandard decoder<br/>128 MiB window cap"]
  Decoder --> Checks["zip.js checks CRC and size"]
  Checks --> Output["Member bytes"]
  Decoder --> Dictionary["Missing dictionary"]
  Dictionary --> Failure["Unsupported-dictionary failure<br/>Original cause retained"]
Loading

Reviews (2) · Last reviewed commit: "fix(artifacts): classify ZIP dictionary ..." · Reviewed by Greptile

Comment thread src/artifacts/ZipArtifactReader.ts Resolved
@morluto
morluto merged commit fc24b08 into morluto:main Oct 28, 2026
4 checks passed
@morluto morluto mentioned this pull request Nov 11, 2026
3 tasks done
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants