Repository navigation
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: needs maintainer review before merge. Reviewed September 11, 2026, 8:05 PM ET / September 12, 2026, 00:05 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR excludes symlink permissions from launcher-backup comparisons while preserving other integrity checks and adds a regression test for differing macOS umasks. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix absent from current main and v2026.9.4. The updated macOS evidence satisfies the previous proof request, and source review found no blocking defect. Priority: P0 Review scores
Verification
How this fits togetherThe npm updater backs up the installed launcher before replacing OpenClaw. Launcher fingerprints verify those backups and later restoration, so an irrelevant metadata difference can prevent an otherwise valid update. flowchart TD
A[Installed launcher] --> B[Copy launcher backup]
A --> C[Capture stable fingerprint]
B --> D[Compare backup fingerprint]
C --> D
D -->|Match| E[Activate staged package]
D -->|Mismatch| F[Preserve existing installation]
E --> G[Verify restoration if needed]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +2, Tests +28. Total +30 across 2 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Use copy-stable launcher identity and keep guided recovery available for installations still running an affected older updater. Do we have a high-confidence way to reproduce the issue? Yes: current source compares umask-dependent symlink modes after recreating the backup, and supplied macOS traces demonstrate the mismatch. This reviewer did not execute the reproduction. Is this the best way to solve the issue? Yes: excluding only symlink mode repairs the existing comparison owner without changing target, ownership, regular-file integrity, or recovery authorization. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c38897f55440. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
What Problem This Solves
Fixes an issue where users running
openclaw updateon macOS would seePackage rollback launcher backup changedduring the global npm install swap when the installed launcher symlink and its backup were created under different umasks.Fixes #145072
Why This Change Was Made
Launcher symlink modes on macOS reflect the process umask, so they are not stable identity data across the update copy boundary. The launcher fingerprint now preserves the symlink type, owner, group, and target while ignoring only symlink mode; regular-file permission fingerprints and changed-target checks remain unchanged.
User Impact
Global npm updates on macOS no longer abort for an equivalent launcher symlink whose mode changed during backup. Actual launcher target changes and regular-file integrity changes continue to be rejected.
Evidence
pnpm test src/infra/package-update-swap.integrity.test.ts— 38 tests passed.d781c156cb7738ce64eba162178bef85e715a989: source mode0700, backup mode0755, same target,fingerprintEqual=false, and the changed-target negative control was rejected.4cdbf2fcb1b8a707e5db5205235d4a8b9719f663reportsfingerprintEqual=truefor the equivalent symlink and still rejects the changed-target negative control.copyPackagePathEntryandcreatePackageIntegrityReader().launchercall chain at the local filesystem/npm-swap boundary.v24.18.0, npm11.17.0): the candidate tarball was built from exact head4cdbf2fcb1b8a707e5db5205235d4a8b9719f663(SHA-256d6ffd22ec8e79311f1263de3c8432217d8a287df3123d5c8d013dba5fb9553d6) and exercised through the real global npm update pipeline under isolated state/config paths.The first row is intentional: an already-installed pre-fix updater cannot repair its own fingerprint comparison on the first hop. The second row proves the repaired updater tolerates the macOS umask-only symlink-mode difference while preserving symlink type, owner, group, and target. Service management was skipped because the proof used isolated state/config paths; package swap and recovery were exercised directly.
Testing proof
Published updater proof runner
The following is the redacted runner used for the published-updater × candidate cell.
CANDIDATE_TGZis the candidate tarball built from the exact head SHA above.AI-assisted: built with Codex