Repository navigation
fix(update): derive recovery guidance from the recorded serving verdict - #164193
Conversation
Use the recorded recovery observation for terminal and durable next-action guidance. Preserve failed update outcomes, unsafe restart status, and migrated-state constraints.
|
🦞👀 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 October 3, 2026, 5:04 AM ET / 09:04 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR makes failed-update guidance in terminal output and saved reports use the recorded serving verdict while preserving restart and rollback restrictions. Merge readiness✅ Ready for maintainer review The fix remains useful: fetched main still contains the contradictory recovery advice. No actionable correctness or security defect was found, and the previous review recorded no findings. Priority: P2 Review scores
Verification
How this fits togetherThe updater records Gateway readiness and recovery constraints after an update attempt. Its reporting subsystem turns those facts into terminal output, saved reports, and operator guidance. flowchart TD
A[Failed update] --> B[Recovery verifier]
B --> C[Recorded serving observation]
D[Restart and rollback constraints] --> E[Recovery guidance]
C --> E
E --> F[Terminal output]
E --> G[Saved report]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +27, Tests +83, Docs +6. Total +116 across 5 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: Keep serving observations and recovery authority separate, with one shared verdict resolver supplying consistent operator guidance. Do we have a high-confidence way to reproduce the issue? Yes from source: fetched main can pair successful recovery verification with failure wording derived from unsafe restart status. This review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes. Reusing the report's existing serving predicate is a narrow repair that avoids competing health interpretations and preserves recovery constraints. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dd66b6780734. LabelsLabel changes: No label changes. Label 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)
|
…ct (openclaw#164193) After a validation failure before package replacement the updater verified the existing Gateway as serving but its next-action text (terminal and Markdown report) said the Gateway did not pass verification: the guidance owner confused unsafe-restart authority with failed serving verification. Guidance now reads the recovery report's recorded serving verdict; failed-update status and restart/migration restrictions are unchanged. Closes openclaw#161924. Thanks @DonnieFi for the report.
Closes #161924
What Problem This Solves
Fixes contradictory update recovery advice when validation fails before package replacement but the existing Gateway is verified serving: the next action no longer says that it failed verification.
User Impact
Terminal output and the saved Markdown report identify the serving version, say there is nothing to restore, and direct the operator to fix the update failure before retrying
openclaw update. The update remains failed. Restart safety, migrated-state restrictions, and genuinely failed verification retain their existing meaning.This affects updaters that include the fix; candidate code cannot change an older installed updater's already-running report renderer. No new config keys, environment variables, CLI options, dependencies, or schema changes.
Why This Change Was Made
The next-action owner inferred serving failure from unsafe restart authority. It now consumes the same recorded recovery observation and serving-version resolver as the recovery report. The recovery verifier remains the fact producer; neither renderer infers health from the update phase or grants recovery authority.
Thanks @DonnieFi for the detailed reproduction.
Evidence
verified servingbesidedid not pass verification; the healthy case failed and the real failed-verification control passed.--maxWorkers=1; wall times 102.54 s, 118.74 s, and 37.78 s. The final guidance shard passed 27 tests in 12.69 s (about 4.3 s of test time).update-command-system-service.test.tssuite (6 cases) was skipped on macOS. The batch timeout and solo recheck are documented below.node scripts/check-changed.mjspassed on the final tree (920.02 s), including production types, all 27 core test-type graphs, lint, formatting, and the selected guards.src/cli/update-cli.candidate-activation.test.tspassed all 19 tests: 966.72 s wall time, 943.13 s Vitest duration; the previously timed-out case passed in 65.716 s. No timeout or assertion changes.Slow pre-existing suites (waived)
These suites predate this change and their slow timings are explicitly waived. Times sum Vitest's reported case durations from the local proof runs; the initial candidate-activation total includes the batch timeout documented above.
src/commands/doctor-config-flow.billing-route.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli.admission-ledger.test.tssrc/cli/update-cli.candidate-activation.test.tssrc/cli/update-cli.package-lifecycle.test.tssrc/cli/update-cli/update-command-rollback.test.tssrc/infra/update-candidate-canary.test.tstest/scripts/pr-worktree-provision.test.ts