Repository navigation
fix(update): roll back npm candidate after Doctor failure - #135462
Conversation
Prefer npm before ClawHub only among declared plugin identities, preserving explicit source/version intent, artifact integrity and capability consent. Keep the exact installed beta cohort and require typed target absence before fallback. Preserve authored environment references through both Doctor writers, resolve snapshot destinations at operation time, and keep migration-only metadata out of redacted snapshots. Avoid loading channel runtimes for unused pairing account facts while retaining captured migration-owner attribution. Record activation safety at package/Git mutation boundaries. Keep installed-CLI recovery, verify runtime/native-service identity, fence Windows autostart, preserve child status, and avoid duplicating consumed notifications or rejecting completed install switches. Surface update-specific disconnect diagnostics without changing explicit-restart guidance in Model Setup. Retain the upgrade-survivor first-hop, approval and installed-version oracles. Repair CI's type-only Doctor cycle and stale source-policy, final-Doctor and Teams whitespace expectations without weakening timeouts, gates or the main-owned Markdown fix. PR: #134490
Remove superseded version-only verification copy and the unused idle label from the eager catalog. Keep identity-aware verification and all recovery guidance unchanged, align translation fixtures, and restore the existing merged startup budget without increasing its baseline or limits.
Carry unresolved non-retained plugin capability refusals from missing-install repair through post-core convergence as typed outcomes, preserving the existing update failure and restart boundary. Keep usable retained artifacts and transient fetch failures on their existing notice/warning paths. Give test invocations a native process HOME before config imports and worker creation. Preserve bounded live/profile context, report selection, installed tool caches, and process-group/pipe-owned namespace cleanup or truthful retention. Keep unknown or mixed explicit real-home selections closed. Resolve the repo-owned staging helper from its owning cwd and await complete PID readiness before cancelling native report fixtures. Align the survivor recovery oracle with typed consent errors that intentionally have no Doctor reason. Preserve strict plugin/code/version/core-step checks and historical warning-only reports; successful-update admission still rejects refusals. Keep the local TestHomeMode alias private and satisfy helper lint. PR: #134490
…ration Carry the prepared, provenance-validated ClawHub package instead of discarding it into a boolean. Suppress the declared installed counterpart without deriving an npm identity from overlaid display metadata or hiding an npm namesake. Keep lazy prepared catalog facts and first-normalized-record icon behavior. Retain explicit ClawHub-only actions and npm-first dual-source actions, and cover the selected source's pinned inspection metadata with existing tables. The incoming duplicate-row cases fail before the provenance fact is retained. PR: #134490
Register the three runtime dependencies in the canonical extraction and trust inventory. Extracted planners and publishers now load the real home policy, context, and selection modules without stubs or weaker assertions. The existing extracted-anchor regression fails before this change and the full wrapper suite passes afterward.
Read the explicitly selected profile with a non-login Bash command so system and user login startup cannot replace the source HOME first. Keep positional profile quoting, child-only HOME/USERPROFILE, existing profile opt-in and test/native-home isolation unchanged. The existing six profile-home matrix cases failed on Linux CI run 33536959196, job 99953769387. New exact-head Linux CI remains required; this local repair does not refresh or admit the prior native proof. PR: #134490
|
🦞👀 Pull request received. I will update this pull request when review starts. |
6e43294 to
0857eb2
Compare
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
|
Updater-owner decision for the exact-head ClawSweeper review: accepted. For this npm transaction, candidate Doctor remains service-external while the package and launcher swap is rollbackable. The existing post-update finalizer continues to own successful managed-service refresh and restart. Failed candidate verification restores package artifacts, reports Exact-head evidence: |
|
Merged exact reviewed head The retained merge receipt is |
…35462) * fix(update): preserve configuration and verify upgrade recovery Prefer npm before ClawHub only among declared plugin identities, preserving explicit source/version intent, artifact integrity and capability consent. Keep the exact installed beta cohort and require typed target absence before fallback. Preserve authored environment references through both Doctor writers, resolve snapshot destinations at operation time, and keep migration-only metadata out of redacted snapshots. Avoid loading channel runtimes for unused pairing account facts while retaining captured migration-owner attribution. Record activation safety at package/Git mutation boundaries. Keep installed-CLI recovery, verify runtime/native-service identity, fence Windows autostart, preserve child status, and avoid duplicating consumed notifications or rejecting completed install switches. Surface update-specific disconnect diagnostics without changing explicit-restart guidance in Model Setup. Retain the upgrade-survivor first-hop, approval and installed-version oracles. Repair CI's type-only Doctor cycle and stale source-policy, final-Doctor and Teams whitespace expectations without weakening timeouts, gates or the main-owned Markdown fix. PR: openclaw#134490 * test(msteams): align the corrected main whitespace fixture * perf(ui): remove unreachable update translations Remove superseded version-only verification copy and the unused idle label from the eager catalog. Keep identity-aware verification and all recovery guidance unchanged, align translation fixtures, and restore the existing merged startup budget without increasing its baseline or limits. * fix(update): retain consent failures and isolate validation homes Carry unresolved non-retained plugin capability refusals from missing-install repair through post-core convergence as typed outcomes, preserving the existing update failure and restart boundary. Keep usable retained artifacts and transient fetch failures on their existing notice/warning paths. Give test invocations a native process HOME before config imports and worker creation. Preserve bounded live/profile context, report selection, installed tool caches, and process-group/pipe-owned namespace cleanup or truthful retention. Keep unknown or mixed explicit real-home selections closed. Resolve the repo-owned staging helper from its owning cwd and await complete PID readiness before cancelling native report fixtures. Align the survivor recovery oracle with typed consent errors that intentionally have no Doctor reason. Preserve strict plugin/code/version/core-step checks and historical warning-only reports; successful-update admission still rejects refusals. Keep the local TestHomeMode alias private and satisfy helper lint. PR: openclaw#134490 * fix(plugins): preserve declared catalog identity during upgrade integration Carry the prepared, provenance-validated ClawHub package instead of discarding it into a boolean. Suppress the declared installed counterpart without deriving an npm identity from overlaid display metadata or hiding an npm namesake. Keep lazy prepared catalog facts and first-normalized-record icon behavior. Retain explicit ClawHub-only actions and npm-first dual-source actions, and cover the selected source's pinned inspection metadata with existing tables. The incoming duplicate-row cases fail before the provenance fact is retained. PR: openclaw#134490 * fix(ci): include home isolation in PR anchor closure Register the three runtime dependencies in the canonical extraction and trust inventory. Extracted planners and publishers now load the real home policy, context, and selection modules without stubs or weaker assertions. The existing extracted-anchor regression fails before this change and the full wrapper suite passes afterward. * fix(test): preserve source home when loading profiles Read the explicitly selected profile with a non-login Bash command so system and user login startup cannot replace the source HOME first. Keep positional profile quoting, child-only HOME/USERPROFILE, existing profile opt-in and test/native-home isolation unchanged. The existing six profile-home matrix cases failed on Linux CI run 33536959196, job 99953769387. New exact-head Linux CI remains required; this local repair does not refresh or admit the prior native proof. PR: openclaw#134490 * fix(update): roll back npm candidate after Doctor failure * fix(update): roll back npm candidate after Doctor failure * fix(update): separate package rollback evidence * fix(update): preserve rollback sentinel compatibility * fix(update): keep staged Doctor service-external * test(update): verify exact post-Doctor restoration * test(update): narrow restored version assertion * test(update): cover all rollback residue prefixes * fix(update): preserve package rollback diagnostics --------- Co-authored-by: Peter Steinberger <[email protected]>
Summary
packageRollbackVerifiedseparate fromserviceRestartSafe. Package restoration does not make old code safe after Doctor or hooks may have changed state.Root cause and safety boundary
The staged npm swap previously removed the old package and launcher backups immediately after activation. A later candidate Doctor failure therefore left the rejected candidate active.
This change delays commit until Doctor passes. On failure, the package owner restores and verifies the previous package and launchers, removes transaction residue after verified recovery, and reports the package result without granting restart permission. The live diagnostic retains
packageRollbackVerified; the cross-version restart sentinel persists the prior strict{ serviceRestartSafe: false, reason }shape so an older restored runtime can read the recovery guidance.The dependency, #134490, merged at
80ae248de1c050d2508f378245b2f1add18f47ed. This branch includes canonicalmainthroughaccb53f8753cd4ce3abc39802871c8b5bf55bf63; the reviewed and published head is6d0c911f0243fad01014386d6d4eed6319c3a56d.Evidence
d413210bc7420923d101ce64211511cdac7b9464retained the synthetic2.0.0-proof.candidatepackage and all candidate launcher digests after a blocking Doctor, proving the harness does not unconditionally report rollback.6d0c911f0243fad01014386d6d4eed6319c3a56dpassed blocking Doctor, thrown Doctor, successful Doctor, and activation-failure scenarios. The failing paths restored the old package tree and allopenclaw,.cmd, and.ps1launcher digests with no package, shim, or staging residue; the success path retained the candidate and cleaned backups.run_68ea6c22bb7dinstalled source2026.8.1and distinct candidate2026.8.2-proof.6d0c911f0243. A permissioned legacy config made candidate Doctor block.update.runrestored the original package version, tree, manifest, entrypoint, root identity, and launcher; removed every canonical package/shim stage and backup prefix; returnedpackageRollbackVerified: truewithserviceRestartSafe: false; and left the managed service stopped. The restored old package then served/healthzand/readyzwith HTTP 200 in an isolated read-only probe.80ae248de1c050d2508f378245b2f1add18f47edpackage read the persisted guidance with its strict schema, produced no stderr, and observed the restart-sentinel markers. No start or restart occurred.6d0c911f0243fad01014386d6d4eed6319c3a56dartifact bundle passed the combined success, rollback, activation-failure, thrown-Doctor, residue, older-schema, and untouched-main contract with 0.99 confidence.Crabbox cleanup is complete: lease
cbx_08099179d5fd(swift-shrimp) reportedleaseStopped=true, and the subsequent AWS lease list was empty. The earlierrun_fa1456f8958dended during partial-clone object retrieval with HTTP 429 before product execution; its exact leasecbx_224e5670b357was released and is retained only as setup-failure evidence.Validation
pnpm check:changedpassed after the final relevant integration.pnpm release:checkcompleted its build, runtime-postbuild, plugin SDK, and UI stages. Plugin-inventory and native-locale diagnostics reproduced on canonical-main controls and are not attributed to this updater diff.35867add25f632d500a03ae154d42ffdb567525f384377fa43a98e73f429f91b.security-fastandopenclaw/ci-gate.Scope
This PR is limited to staged npm activation after candidate Doctor and truthful package-rollback diagnostics. It does not add pnpm or Bun rollback, service-health rollback, post-swap runtime/service-state restoration, a state checkpoint, or Docker fixture repair.