Repository navigation
fix(update): allow package-manager hardlinks in swaps - #85569
Conversation
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-23 03:34 UTC / May 22, 2026, 11:34 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Current main source still rejects hardlinked package-root swaps, and the PR body provides Docker/npm 11 live output showing the same hardlinked global package-root update succeeding after the fix. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the scoped package-manager hardlink allowance after maintainer security-boundary review, while keeping generic and dependency-free install moves fail-closed on hardlinked sources. Do we have a high-confidence way to reproduce the issue? Yes. Current main source still rejects hardlinked package-root swaps, and the PR body provides Docker/npm 11 live output showing the same hardlinked global package-root update succeeding after the fix. Is this the best way to solve the issue? Yes, with maintainer security review. The second commit narrows the install helper so dependency-free installs still reject hardlinked sources, which is the maintainable shape for the reported package-manager update bug. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 679a46d01e65. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Brave Review Wisp Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
f0026ba to
8e4c61d
Compare
|
Verification for maintainer fixup on 8e4c61d: Behavior addressed: package-manager hardlinks are now an explicit install/swap policy instead of being inferred inside installPackageDir from hasDeps.
Evidence after fix: focused local tests passed; changed checks passed; autoreview reported no accepted/actionable findings; GitHub CI is clean for required/pass lanes with CodeQL neutral and unrelated skipped matrix entries. |
Summary
movePathWithCopyFallbackreject guard unchanged for non-package-manager callersFixes #85559.
Real behavior proof
Behavior or issue addressed: npm 11+/pnpm-style global OpenClaw installs can contain hardlinked files under the installed package root. Before this change, the updater/install swap path used
sourceHardlinks: "reject"and could fail before replacing the package root. This patch scopessourceHardlinks: "allow"to the package-manager-owned swap paths while preserving the generic reject guard.Real environment tested: Docker
node:24-bookworm, Node v24.16.0, npm 11.13.0, Linux container, real global npm install under/usr/local/lib/node_modules/openclaw. The proof used local OpenClaw tarballs built from this PR head: baseline2026.5.22and target2026.5.23-proof.0.Exact steps or command run after fix:
Evidence after fix:
Observed result after fix: The package root contained a real hardlinked file before the update, and
openclaw update --tag /proof/target.tgz --yes --jsoncompleted withstatus: ok. Theglobal install swapstep replaced the package root successfully and the installed CLI reportedOpenClaw 2026.5.23-proof.0afterward.What was not tested: I did not run a separate pnpm global update E2E locally. The Docker proof covers npm 11 global install/update with a real hardlinked package root in the same package-manager swap path, and the regression tests cover both update and install swap helpers with actual filesystem hardlinks.
Verification
Security notes
movePathWithCopyFallback.