Repository navigation
fix: plugin packaging fails on deduplicated dependency files - #197819
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review Please review the final head, 76a3dc9. The real npm hardlink regression fails on the parent and passes with the repair; all 57 affected packaging cases, required changed-file checks, and local Codex review are green. The temporary diagnostic observer is excluded. Actual Linux candidate packaging remains pending in hosted CI. |
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. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesCopy approved patched dependencies into the existing temporary directory before npm packs them, separating hardlinked files without changing the installed dependency. Example: Acorn 8.19.0 has identical declaration files sharing an inode in Linux CI.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This PR provides a focused repair for a concrete packaging failure still present on main; no actionable correctness or security findings were identified. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared plugin packaging owner validates installed workspace patches, produces temporary dependency tarballs, and installs them into staged npm and ClawHub packages. flowchart LR
A[Frozen workspace dependency] --> B[Patch identity validation]
B --> C[Temporary independent copy]
C --> D[npm pack]
D --> E[Integrity checked tarball]
E --> F[Staged plugin package]
F --> G[Temporary input cleanup]
Technical reviewBest possible solution: Keep the existing validated packaging owner and normalize its npm input through an independent temporary copy. Do we have a high-confidence way to reproduce the issue? The supplied real-npm controls describe a deterministic hardlink trigger, and the committed CLI regression exercises that input; this read-only review did not execute it. Is this the best way to solve the issue? The repair addresses the incompatible inode layout at the shared packing boundary, reuses existing cleanup, and adds no parallel packaging implementation or dependency change. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b46197029a3a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +15, Other +3. Total +18 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 November 12, 2026, 11:09 AM ET / 16:09 UTC. |
|
Merged via squash.
|
Backport #197819 (81192e4), preserving the candidate package policy. Copy the frozen dependency into the existing temporary pack tree; retain hardlink regression coverage. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
What Problem This Solves
Fixes plugin package preparation failing when a patched dependency contains identical files deduplicated into hardlinks, as with Acorn’s declaration files in Linux CI.
User Impact
Codex packaging can include its approved Acorn patch without failing before the Docker seed tests. Package contents and public dependency versions stay the same; installed dependencies are not modified.
Why This Change Was Made
npm’s tar writer fails with
Z_STREAM_ERRORwhen the declaration paths share an inode. Copy the approved patched package into the existing temporary packing directory before invoking npm; its existing cleanup owns the copy. This adds three production lines and 15 test lines, with no new configuration, cache, retry, dependency patch, or version change.#196785 (
7ea57a8cba1aa8ada672ef967956bd87ea316558) exposed the defect by adding patched Acorn bundling to Codex. The last green full-run source already had the same Node version and Linux hardlink install policy. This is a newly exposed packaging regression, not an attribution of earlier unrelated Docker failures.Evidence
ZlibError/Z_STREAM_ERRORin npm 11.19.1’s tar 7.5.22 under Node 24.22.1. The observer is not part of this change.pnpm check:changed(including script and tooling-test types), and fresh Codex P2 review passed. Exact-head ordinary CI passed (30 successful jobs, 31 skipped), and final-head ClawSweeper has zero open items. Docker was skipped in ordinary CI. Actual Linux Docker coverage and the first scheduled full run containing all repairs remain explicit post-merge obligations; neither is claimed green.Landing uses the native
scripts/prworkflow; no maintainer fallback is planned.