Repository navigation
fix: clarify Doctor refusal diagnostics and update recovery - #168905
Conversation
Preserve actionable update repair guidance after state migration and append bounded, path-free caller names to nested maintenance admission refusals. The original activation failure remains unconfirmed. Refs #168750
|
🦞👀 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. What this changesThis PR recommends profile-aware update repair after migrated-state failures and adds bounded caller names to nested-effect refusal diagnostics. Example: An update using profile work fails with state-migrated-no-rollback and an unverified running Gateway.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep this PR open: it provides maintainer-approved recovery guidance and useful diagnostics, and the corrected head has no actionable introduced defect. The underlying activation failure remains unresolved. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor's database maintenance owner enforces admission; update reporting consumes recorded recovery and serving facts to produce terminal guidance, saved next actions, and Markdown reports. flowchart TD
A[Activation Doctor] --> B[Maintenance admission]
B --> C[Bounded refusal diagnostic]
C --> D[Update recovery facts]
D --> E[Recovery guidance]
E --> F[Terminal and saved reports]
F --> G[Existing update repair command]
Technical reviewBest possible solution: Land the focused recovery and diagnostic improvement while keeping the activation incident open for an identified caller-level fix. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the incomplete guidance and context-free refusal; the original managed-handoff activation failure has no high-confidence reproduction. Is this the best way to solve the issue? Reusing the existing repair command and enriching the enforced refusal is appropriate for this scope; resolving the activation failure still requires identifying its re-entering caller. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 825beaa497c4. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +11, Tests +89. Total +100 across 5 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 2:19 AM ET / 06:19 UTC (Revision 2). |
Keep the existing unsafe-recovery triage guidance alongside the added update repair instruction. The post-update integration cases now require both commands in the recorded action and rendered report. Refs #168750
…68905) (extracted hotfix) Original subject: fix(update): route migrated-no-rollback failures to update repair and name nested maintenance effects (#168905). Extracted from #168905 (49ca813): took only the src/cli/update-cli/update-recovery-guidance.ts hunks and their tests (update-recovery-guidance.test.ts, two assertions in update-command-post-update-recovery.test.ts). On the branch a state-migrated-no-rollback failure either reports "readiness observation ended" or tells the operator to run `openclaw doctor` / re-run `openclaw update`, when the correct next step is `openclaw update repair` from the installed version. Left out the openclaw-state-db async-lifecycle nested-effect naming change, which is diagnostic-only and unrelated to the guidance bug. Extracted-from: 49ca813 Co-authored-by: Peter Steinberger <[email protected]>
Release provenance: 89329f6 -> #168587 Release provenance: e6a9022 -> #168905 Release provenance: 15f3f12 -> #162266 Release provenance: 20805b8 -> #169430 Release provenance: 568fec8 -> #169102 Release provenance: 39dba6d -> #160440 Release provenance: 5df28c7 -> #168393 Release provenance: 10bcd8e -> #168164 Release provenance: dc5f1f5 -> #168446 Release provenance: 9f1e441 -> #168044 Release provenance: 5a235fc -> #168651
… name nested maintenance effects (openclaw#168905) After an update ends in state-migrated-no-rollback, the next action now points to openclaw update repair (fresh authority, Doctor rerun, config reload, plugin convergence) while keeping triage guidance for unverified recovery. The maintenance authority nested-effect error now names the offending caller (bounded, no paths or arguments) so field reports identify the cause. Root cause of the nested effect in openclaw#168750 is not yet reproduced. Refs openclaw#168750.
…68905) (extracted hotfix) Original subject: fix(update): route migrated-no-rollback failures to update repair and name nested maintenance effects (#168905). Extracted from #168905 (49ca813): took only the src/cli/update-cli/update-recovery-guidance.ts hunks and their tests (update-recovery-guidance.test.ts, two assertions in update-command-post-update-recovery.test.ts). On the branch a state-migrated-no-rollback failure either reports "readiness observation ended" or tells the operator to run `openclaw doctor` / re-run `openclaw update`, when the correct next step is `openclaw update repair` from the installed version. Left out the openclaw-state-db async-lifecycle nested-effect naming change, which is diagnostic-only and unrelated to the guidance bug. Extracted-from: 49ca813 Co-authored-by: Peter Steinberger <[email protected]> 10.3 resolution: 10.3 lacks the deferred post-install verification advisory and keeps the split healthy-candidate branches, so only the readiness exclusion and the two `openclaw update repair` routes were applied. (cherry picked from commit e6a9022)
… name nested maintenance effects (openclaw#168905) After an update ends in state-migrated-no-rollback, the next action now points to openclaw update repair (fresh authority, Doctor rerun, config reload, plugin convergence) while keeping triage guidance for unverified recovery. The maintenance authority nested-effect error now names the offending caller (bounded, no paths or arguments) so field reports identify the cause. Root cause of the nested effect in openclaw#168750 is not yet reproduced. Refs openclaw#168750. (cherry picked from commit 49ca813) Co-authored-by: RomneyDa <[email protected]>
…enclaw#168905) Co-authored-by: RomneyDa <[email protected]>
Refs #168750
What Problem This Solves
An activation Doctor failure can leave migrated state with incomplete config or plugin maintenance, while the nested-effect error gives no useful admission context and recovery guidance can stop at inspection or generic triage.
User Impact
Migrated-state failures recommend the profile-aware
openclaw update repaircommand while retaining backup and writer-custody warnings. An unverified Gateway also retains the existingtriageguidance. Nested-effect refusals includeaccess=effectand up to four caller function names, capped at 160 characters; stack paths and arguments are omitted.Why This Change Was Made
The original nested-effect cause remains unconfirmed: 35-minute fake-timer probes with nested maintenance, update admission, and database closure did not reproduce it. This change preserves admission enforcement and adds a bounded diagnostic for the next field report.
The repair command acquires fresh authority, reruns Doctor, reloads config, and converges plugins. Its instruction supplements the existing advice for an unverified Gateway. The initial PR head accidentally suppressed that triage advice for migrated failures; the follow-up restores the original condition and strengthens the existing integration test to require both commands in the recorded action and report. Non-migrated recovery keeps its previous behavior.
Overall production: +17/-6 lines (net +11); tests: +94/-5 (net +89). The CI follow-up itself changes two files, +3/-2 lines.
Evidence
node scripts/run-vitest.mjs src/cli/update-cli/update-command-post-update-recovery.test.ts --maxWorkers=1: exact pre-PR treec6d71fae0ed1passed all 40 tests (172.86s wall); initial head5f3f079721ecpassed 38 and failed both reported triage assertions (94.72s wall); corrected tree passes all 40, including assertions for bothtriageandupdate repair(162.44s wall). The triage regression was introduced by this PR, not inherited.update-command-resultwere exercised locally: 38 files pass. One separate failure remains inupdate-command-fresh-doctor-authority.test.ts, healthy case: config I/O fails withPlugin inventory has retired. It reproduces on unchanged5f3f079721ec(1 failed/1 passed, 37.55s wall), before recovery guidance is produced. No retry, timeout, skip, or assertion weakening was used.5f3f079721ec; that earlier run took 2040.97s including 13m35s of runtime preparation.check:changed --base 5f3f079721ec7aa9e8caf8442e0bfcbeec3d99cfwith the previously proven inherited Knip scan explicitly omitted. The full original check and an unchanged-base replay both report the same unused exports incli-session-history.claude.ts,approval-handler-runtime.ts, the GitHub connections files, andskill-workshop-page.test-support.ts. No baseline or suppression edits. Formatting, lint, typechecks, schema/version checks, runtime import cycles, and remaining guards pass. Prior Madge proof found zero cycles; imports are unchanged by the correction.run-loop-startup.test-support.tsis outside this diff and left alone per maintainer direction. Isolated Codex review was attempted again but remains unavailable (HTTP 401); lead review of this PR head is still needed. All proof used local isolated test state. CI on the new head is not claimed as completed.