Repository navigation
test: guard function ZIP extraction contracts - #8543
netlify-coding[bot] wants to merge 2 commits into
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly identifies the main change: adding tests that guard ZIP extraction behavior and contracts. |
| Description check | ✅ Passed | The description directly explains the ZIP extraction regression tests, covered behaviors, verification results, and known limitations. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2… |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Autopilot is currently an internal CodeRabbit preview.
Comment @coderabbitai help to get the list of available commands.
commit: |
| } | ||
|
|
||
| // Build the headers directly so malformed entries and duplicate names survive fixture creation. | ||
| export const createZip = (entries: ZipEntry[]): Buffer => { |
There was a problem hiding this comment.
This code is pretty wild. Could we use yazl for this instead? iirc we have a pattern for this in netlify/build.
Opened by Netliloop run #306 (reduce-change-failure-risk)
Why
Replacing extract-zip moved archive handling into the CLI without direct regression tests. Thirteen deliberate regressions each pass the original 647 unit tests and fail the new suite, exposing gaps in file-write protection, failure cleanup, and extraction compatibility.
What changed
tests/change; production code is unchanged.How we verified
202b06f: unit tests pass on Linux (Node 22/24), macOS and Windows (Node 24); integration and end-to-end pass on Node 22/24. All 38 checks completed: 35 successful, 3 informational neutral. Seven Unix cases skip on Windows.CI=true npm run test:unit: 665 passed on Node 24.15.0. The 18 new tests also pass on Node 22.13.0; every new test has a demonstrated failing mutation control.npm run typecheck,npm run lint,npm run format:check, andgit diff --check: passed.Reproduce the real archive-to-HTTP proof: PASS, with temporary fixtures removed
On Linux/macOS, from this branch with Node ≥22.13.0, npm 11.19.1, and Python 3:
Passing output includes
"outcome": "PASS"and"temporaryFixturesRemoved": true. The archive producer intentionally emits one duplicate-name warning.To reproduce the independent fixture-helper validation, download the Node generator and Python reader under their displayed names into the same proof directory, then run:
Passing output starts with
PASS: Python zipfile independently validated helper archive.The mutation harness runs with
python3 verify-zip-mutations.py "$PWD"; it temporarily changes onlysrc/utils/zip.ts, refuses pre-existing edits, and restores it infinally. All thirteen original-suite results must exit 0; all thirteen new-suite results must exit 1.What is left to test
Risk
Low — only tests change; incorrect assertions can block CI but cannot alter production behavior.
No Linear issue was created: application authorization returned HTTP 401 on both attempts. Scheduled tracking belongs in FRB, which owns the extraction replacement (FRB-2334). Restore application authorization and create “Guard CLI function ZIP extraction against regressions”, labeled
netliloop-pr, with this PR and the low-risk assessment. The separate directory-creation limitation needs follow-up; the primitives issue FRB-2340 is not claimed as fixed.