Repository navigation
fix(archive): preserve integrity errors with updated ZIP decoder - #997
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis 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 review: needs changes before merge. What this changesThis PR updates the native ZIP decoder to 9.0.3 and adapts oversized-entry errors to preserve public error classifications. Example: Read a 16-byte ZIP entry declared as 1 byte with maxBytes=1.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: the dependency update is useful, but an intermediate byte budget still receives the wrong public error type. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherArchive APIs admit ZIP metadata, decode selected payloads through native or JavaScript readers, and return bounded buffers or publish a validated staging tree. flowchart TD
A[Archive API] --> B[Metadata admission]
B --> C[Native ZIP decoder]
B --> D[JavaScript ZIP decoder]
C --> E[Limits and integrity classification]
D --> E
E --> F[Buffer or staged publication]
Technical reviewBest possible solution: Preserve byte-limit precedence for intermediate budgets while retaining decoder integrity enforcement and unpublished extraction failures. Do we have a high-confidence way to reproduce the issue? The existing 16-byte fixture with declaredSize=1 and maxBytes=2 follows the decoder's verified InvalidData path into ArchiveFormatError; this was established from source without running target code. Is this the best way to solve the issue? Updating the decoder and adapting its errors is appropriate, but declared size alone cannot determine whether an intermediate caller budget was exceeded. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 44cd047b54e6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 12:40 AM ET / 04:40 UTC. |
Summary
Main CI began failing strict Cargo audit after crates.io yanked
zip 9.0.0. Update to the unyanked9.0.3patch with the same Rust 1.88 minimum and existing feature selection.The new ZIP reader rejects data exceeding its declared size before returning the bytes. Preserve fs-safe's public error contract: malformed entries produce
ArchiveFormatError, while exceeding the caller's byte budget takes precedence asArchiveLimitError. Extraction still rejects the archive without publishing partial output. Keep the upstream integrity check and strict audit enabled.Validation
cargo audit --deny warnings.run_879dfe43c44cf51f59a42f3ad8594a0e.run_6a181486346992f4551d0312f41ed7ec.A fresh merged-main release dry run will verify packaging after this merge. No release, tag, or publication is requested.