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 7, 2026, 2:26 PM ET / 18:26 UTC. ClawSweeper reviewWhat this changesThe CLI updater records initialization failures as finished failed runs while preserving execution-owned recovery and disposing successfully initialized progress reporting. Merge readiness✅ Ready for maintainer review This PR remains necessary: current main still exposes both initialization failure gaps. The earlier rollback finding is resolved, and no actionable correctness or security findings remain. Priority: P2 Review scores
Verification
How this fits togetherThe CLI updater records progress and outcomes in OpenClaw's shared update ledger. Status commands and the Control UI consume those records to display updates and determine whether configuration controls remain suspended. flowchart TD
A[CLI update request] --> B[Admit update run]
B --> C[Initialize progress and triage]
C -->|Initialization fails| D[Record terminal failure]
C -->|Initialization succeeds| E[Execute update and recovery]
E --> F[Existing completion owner]
D --> G[Status and configuration controls]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +7, Tests +117. Total +124 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: Finish pre-execution failures through the existing ledger owner while leaving rollback and migrated-state completion with their established owners. Do we have a high-confidence way to reproduce the issue? Yes: current-main source exposes both failure paths after ledger admission, and the supplied failed-first evidence exercises them. This review verified the source mechanism without running target code. Is this the best way to solve the issue? Yes: extending the existing failure boundary is a narrow repair, and the execution-start guard preserves the recovery ownership that the earlier review identified. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8aa070eec3f3. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
ce64c93 to
3e2a584
Compare
3e2a584 to
e5401c5
Compare
|
@clawsweeper re-review Addressed the helper-pending rollback finding in The PR body now records 77 passing Linux tests on byte-identical final source, including six real native-helper process cases with synthetic supervisors, plus the scoped independent review and limitations. No helper contract or safety check was weakened. Please reassess this head and the updated evidence. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
acbb7f0 to
6d6f74c
Compare
|
Merged via squash.
|
…law#139288) * fix(update): release failed initialization runs from active status * fix(update): preserve helper-owned rollback completion --------- Co-authored-by: TheAngryPit <[email protected]>
Related: #139284. This is the CLI initialization workstream; it does not close the umbrella.
What Problem This Solves
Resolves a problem where a failed CLI update can leave configuration controls suspended when initialization throws before update execution begins. The command exits, but its admitted update run remains active.
Why This Change Was Made
Bring progress creation and failure-triage preparation under the existing update-run failure owner. Initialization errors finish the admitted run before being rethrown; progress is disposed only if it was created. Already-terminal runs keep their outcome, and a command that transferred ledger ownership to migrated finalization does not reopen the old database.
This changes no schema, recovery command, configuration selector, or service policy. It does not recover a killed updater or explain the original interruption in the umbrella issue. The existing parent/child and migrated-finalization owners remain responsible for those paths.
User Impact
Failed initialization leaves a terminal failed update report instead of an active run that can indefinitely suspend configuration writes. The original error remains visible. Neither reproduced initialization failure starts update, configuration, service, or plugin work.
Evidence
Current head:
6d6f74cafa4f3fa8215ecf5fa2e0233ffb19c7b2.Rollback ownership follow-up
The review correctly identified that the outer catch could overwrite helper-pending recovery with a terminal failure. The outer boundary now handles only failures before execution starts; the existing execution owner retains rollback and migrated-finalization responsibility. No helper, service policy, or ledger schema changed.
updateCommandwith the real isolated ledger and a typed helper-pending finalization failure. Before the fix it failed because the run was alreadyfailed; after the fix the run staysrunningand accepts the helper's laterrolled-backoutcome. Finalization is stubbed in this regression; it is not represented as native helper proof.node scripts/run-vitest.mjs src/cli/update-cli.test.ts -t 'leaves restored-generation completion|finishes the admitted run|does not reopen the ledger after migrated' --reporter=dot;node scripts/run-vitest.mjs src/cli/update-cli/update-command-run.test.ts src/cli/update-cli/update-command-rollback.test.ts src/cli/update-cli/update-command-post-update-recovery.test.ts --reporter=dot;node scripts/run-vitest.mjs src/infra/update-managed-service-handoff-lifecycle.test.ts -t 'restores the verified previous.*generation after updater exit 79' --reporter=dot.Earlier initialization evidence
cb4c06ee78fb61891b87ff95b288efb24df55dee. The two failure-first regressions failed on that unmodified production implementation: both retainedrunning / requestedinstead of a terminal failed run. They pass with the repair, using the real isolated update ledger.qaRuntimeprofile and exercised the actual builtopenclaw.mjs update --dry-run --no-restart --yesentry point twice, in separate synthetic homes. A task-local loader injected one exception at progress creation or triage preparation without modifying the built files. Both commands exited 1 with the original diagnostic; a subsequent uninstrumentedupdate status --jsonreported no active run and a retainedfinished / failed / update-failedresult, with no step left in progress. No operator installation, configuration, or service was changed.3e2a5843aa993febc1cd320c59e8ec485c056e80. macOS arm64, Node 26.8.1, pnpm 12.3.4, Vitest 5.0.0:node scripts/run-vitest.mjs src/cli/update-cli.test.ts src/cli/update-cli/update-command.test.ts --reporter=dotpassed 461 tests across 2 files, with no skips. SHA-256 checks confirmed both tested files were byte-identical to that candidate. This ran through Crabbox's SSH provider in a task-only directory, not through an operator's installed Gateway or OCM. The proof directory was moved to Trash afterward.e5401c52041994914e85605a04c1d13662e5eaf8. Hosted lint on the previous candidate found the production file two lines above its limit. Removing the redundant async/await callback wrapper preserves the returned promise and failure/cleanup ordering, while satisfying the existing limit. Targeted type-aware lint and formatting passed. A fresh independent review found no actionable P0–P2 findings for this cleanup. 49 selected Windows tests passed, 412 were filtered out, covering initialization, triage preparation, ledger/migrated finalization, phases, and post-core paths. The native full run was not repeated after this source cleanup and is not presented as byte-identical proof of the new head.These results are not claims that the full build, full repository test suite, native UI, or hosted CI passed. The macOS run is native source-test evidence; the separate instrumented built-CLI run proves the reported initialization boundary. Current-head hosted CI remains a separate gate.
Maintainer update
6aa09cbadb594c3d46d5bd49a28c514df1b256b0while preserving the contributor's authored commits and merge history. The final two-file patch has the same stable patch ID as the contributor's head; no behavior rewrite was needed.b4ce0df975fab5f1a5bc234ad9643c6de40c9eb0: progress initialization and triage preparation each retainedrequested/runninginstead offinished/failed. The same run passed helper-owned rollback, migrated-finalization ownership, and both existing post-core ownership cases. The two update files are unchanged between that main revision and the rebase base.check-lint-core-1reportedFile has too many lines (704)inupdate-command.ts;openclaw/ci-gatereportedcheck-lint-hosted-core-shard finished with failure (selected=true). Current main's existing simplifications bring the rebased file to 698 counted lines. Changed-file lint and the completepnpm check:changednow pass without weakening a rule.6d6f74cafa4f3fa8215ecf5fa2e0233ffb19c7b2: CLI orchestration, command, run owner, rollback, post-update recovery, post-core continuation, triage, and the real ledger. The repository test wrapper also completed its required runtime build. Fresh Codex autoreview against the exact merge base found no actionable P0–P2 findings.