Repository navigation
fix(update): complete package lifecycle outside dist inventory - #133908
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 5:35 AM ET / 09:35 UTC. ClawSweeper reviewWhat this changesThe PR moves package lifecycle state out of the closed Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessNo introduced blocking correctness defect was identified. The prior lifecycle-lock finding is addressed by threading the caller timeout into the shared coordinator; this member-authored, upgrade-sensitive PR remains for maintainer review and exact-head package acceptance. Priority: P2 Review scores
Verification
How this fits togetherPackage updates install a new OpenClaw package, verify its flowchart LR
Package[Packed package] --> Marker[Pending lifecycle marker]
Marker --> Entry[Updater or CLI launcher]
Entry --> Coordinator[Lifecycle coordinator]
Coordinator --> Scripts[Preinstall and postinstall]
Scripts --> Verify[Package verification]
Verify --> CLI[Usable OpenClaw CLI]
Decision needed
Why: The change intentionally alters upgrade-time lifecycle recovery and can prevent a global CLI from starting when recovery fails; protected maintainer handling requires an explicit judgment. Before merge
Agent review detailsSecurityNone. PR surfaceSource +170, Tests +312, Docs 0, Config +4, Other +63. Total +549 across 40 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land one package-root marker contract only after exact-head package acceptance verifies both normal lifecycle completion and fail-closed recovery across supported package managers. Do we have a high-confidence way to reproduce the issue? No live reproduction was run in this read-only review. The reported upgrade path is concretely encoded in focused lifecycle and updater tests, but current-main source could not be fully inspected from the partial clone. Is this the best way to solve the issue? Yes: a package-root marker avoids treating lifecycle state as unverified AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dc93e411b0af. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
…ade-guard # Conflicts: # scripts/postinstall-bundled-plugins.mjs
|
Thanks @obviyus! Proof: A pnpm 11 global install can upgrade from 2026.7.1-2 through the package lifecycle marker without old dist-inventory rejection; focused lifecycle, updater, launcher, tarball, postinstall, Docker-package, and Windows fixture checks passed.
|
Problem
A pnpm 11 global update from OpenClaw 2026.7.1-2 to 2026.8.1 fails verification and rolls back. The 2026.8.1 package puts
openclaw-install-guardinsidedist/, but the old updater treats every uninventorieddist/file as invalid.Root cause
Package lifecycle state was stored inside the closed
dist/inventory. That made a valid pending lifecycle marker look like package corruption to an older updater.Fix
.openclaw-lifecycle-pending.dist/index.js, andopenclaw.mjs.dist/openclaw-install-guardpath.Product proof
unexpected packaged dist file dist/openclaw-install-guard, exited nonzero, and remained on 2026.7.1-2.Validation
node scripts/run-vitest.mjs src/infra/package-lifecycle.test.ts src/infra/package-update-steps.pnpm11-guard.test.ts src/index.entrypoint.test.tsgit diff --checkScope
dist/verifier unchanged.ClawSweeper