Repository navigation
fix(update): warn when plugin migrations remain pending - #170392
Conversation
Recheck deferred plugin obligations after the final Doctor pass and keep remaining upgrades visible as actionable Doctor advisories. Print skipped plugin names and reasons alongside update summary counts. Preserve migration ownership and best-effort core update behavior. Remove one stale max-lines exemption after verifying the file is below its cap. Fixes #170334
|
🦞👀 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 records actionable warnings for plugin migrations still pending after Doctor and prints skipped plugin names and reasons. Example: ACPX and Codex migrations remain pending after post-update Doctor.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR adds useful update diagnostics absent from current main, and no introduced correctness defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherUpdate finalization consumes plugin convergence outcomes and the canonical migration ledger, runs fresh Doctor, and produces plugin status and user-facing diagnostics before Gateway activation. flowchart TD
A[Update command] --> B[Plugin convergence]
B --> C[Fresh Doctor]
C --> D[Canonical migration ledger]
D --> E[Plugin advisories]
B --> F[Skipped plugin diagnostics]
E --> G[Update outcome]
F --> G
Technical reviewBest possible solution: Keep the reporting improvement and use Related rather than Fixes until the reporter's completed-migration case is confirmed resolved. Do we have a high-confidence way to reproduce the issue? Source establishes that successful Doctor execution can leave pending obligations without adding plugin advisories and that skipped outcomes previously printed only counts; the reporter's later completed-row case was not reproduced. Is this the best way to solve the issue? The existing finalizer, migration formatter, and convergence outcomes are appropriate owners for this reporting change, but it does not establish that already-completed historical warnings disappear. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e4f463159d0a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +28, Tests +75, Docs +2, Other -1. Total +104 across 7 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel 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 Reviewed October 12, 2026, 7:47 PM ET / 23:47 UTC. |
…fter update (openclaw#170392) After the update's Doctor pass, the finalizer rereads the deferred plugin-migration ledger; still-pending doctor-only/after-session migrations (e.g. acpx, codex) become per-plugin update warnings with the exact recovery command instead of a silent success. Skipped plugin updates now print each plugin and its skip reason. Fixes openclaw#170334.
…rades as pending (#170413) * fix(update): retire settled plugin migration warnings from update reports Doctor's config preflight reports a plugin data/settings upgrade as pending, then post-session plugin repairs (acpx, codex) can settle it later in the same pass. The stale warning still reached the updater, which persisted it as a run warning and repeated it in the success summary with "Let the current update finish" guidance after the update had finished. - Doctor drops warnings the ledger shows settled before publishing its update result (new doctor-health-update-result sibling keeps doctor-health under cap). - Finalization retires persisted warning rows a later pass settled or superseded, so the run record and report match the pending ledger. - Post-core convergence is the last migration pass: guidance now says to run the repair command instead of waiting. - The post-core plugin summary names the reason for each informational skip. Fixes #170334 * fix(update): publish an empty warning list when every plugin migration settled * fix(update): leave skipped plugin reasons to the post-core summary owner * fix(update): report a still-pending plugin migration once after post-plugin convergence * test(update): type the settled plugin warning expectation * fix(update): keep warning guidance compatible with recovery bootstrap * fix(doctor): omit absent diagnostics from update publication (cherry picked from commit 7039a32) Backport note: the release line lacks #170392 (post-plugin convergence rereading the ledger and reporting pending migrations as plugin warnings) and the main-only deferredInspectionCheckIds Doctor capture. Dropped the finallyReportedPluginIds supersede path so readiness advisories cannot retire a still-pending Doctor migration warning, omitted deferredInspectionCheckIds from the publication helper, kept the release-line Doctor intro/outro, and adapted the resume-completion test: a still-pending migration is reported once as the final Doctor warning.
Replace this branch's adapted port of #170413 (72d5e35) with the semantic adaptation used on release/2026.10.5 (46d65ed, cherry-picked from 7039a32). The release line lacks #170392 (post-plugin convergence reporting still-pending migrations as plugin warnings), so drop the finallyReportedPluginIds supersede path: readiness advisories can no longer retire a still-pending Doctor migration warning, and the still-pending case is reported once as the final Doctor warning. Backport adaptation: net of reverting 72d5e35 and cherry-picking 46d65ed; kept this branch's formatted doctor-health tests and triage test layout, which already matched 46d65ed semantically.
…ions and optional cron cleanup (#171818) * fix(update): success summary repeats settled plugin data/settings upgrades as pending (#170413) * fix(update): retire settled plugin migration warnings from update reports Doctor's config preflight reports a plugin data/settings upgrade as pending, then post-session plugin repairs (acpx, codex) can settle it later in the same pass. The stale warning still reached the updater, which persisted it as a run warning and repeated it in the success summary with "Let the current update finish" guidance after the update had finished. - Doctor drops warnings the ledger shows settled before publishing its update result (new doctor-health-update-result sibling keeps doctor-health under cap). - Finalization retires persisted warning rows a later pass settled or superseded, so the run record and report match the pending ledger. - Post-core convergence is the last migration pass: guidance now says to run the repair command instead of waiting. - The post-core plugin summary names the reason for each informational skip. Fixes #170334 * fix(update): publish an empty warning list when every plugin migration settled * fix(update): leave skipped plugin reasons to the post-core summary owner * fix(update): report a still-pending plugin migration once after post-plugin convergence * test(update): type the settled plugin warning expectation * fix(update): keep warning guidance compatible with recovery bootstrap * fix(doctor): omit absent diagnostics from update publication (cherry picked from commit 7039a32) Backport note: the release line lacks #170392 (post-plugin convergence rereading the ledger and reporting pending migrations as plugin warnings) and the main-only deferredInspectionCheckIds Doctor capture. Dropped the finallyReportedPluginIds supersede path so readiness advisories cannot retire a still-pending Doctor migration warning, omitted deferredInspectionCheckIds from the publication helper, kept the release-line Doctor intro/outro, and adapted the resume-completion test: a still-pending migration is reported once as the final Doctor warning. (cherry picked from commit 46d65ed) Backport adaptation: ported to the 2026.9.33 extended-stable line from the 2026.10.5 adaptation of main's #170413. The 9.33 line has no doctor-health-startup.js or install-owner.js, so doctor-health keeps its release-line exit path and only imports the new publication helper; the config change logging moved with the helper, retiring doctor-health's inline formatUpdateDoctorConfigChange/createSubsystemLogger imports. The helper carries no deferredInspectionCheckIds capture. The 9.33 triage tests are parametrized per update marker; their post-core-convergence cases now expect direct repair guidance, while package-swap cases keep "Let the current update or repair finish". * fix: keep updates moving when optional cron inspection or snapshot cleanup fails (#170754) * fix: keep updates moving through optional cron inspection failures * fix(cron): preserve inspection failures through cleanup * test(cron): prove both failure causes through native workers (cherry picked from commit 1864a74) Backport adaptation: partial backport to the 2026.9.33 extended-stable line. Takes the memory-core dreaming cron inspection catch, the cron read-only snapshot cleanup change (a completed read survives deferred cleanup; a failed read keeps both the inspection and cleanup failures), and the cleanup tests. Drops the store-repair.ts maintenance-reader reuse hunk and its doctor/cron/index.test.ts case, which need #162200 (absent here; 9.33 keeps Doctor cron inspection in src/cron/store/doctor.ts), and drops the matching reader-reuse sentence from the update docs. The 9.33 cold-cleanup test predates main's fault-injection support, so it is adapted in place: its read case completes and now resolves while the registered snapshot retries through cleanupSnapshotOperations, and its copy case asserts the aggregate of the worker copy failure and the snapshot cleanup failure.
…rades as pending (openclaw#170413) * fix(update): retire settled plugin migration warnings from update reports Doctor's config preflight reports a plugin data/settings upgrade as pending, then post-session plugin repairs (acpx, codex) can settle it later in the same pass. The stale warning still reached the updater, which persisted it as a run warning and repeated it in the success summary with "Let the current update finish" guidance after the update had finished. - Doctor drops warnings the ledger shows settled before publishing its update result (new doctor-health-update-result sibling keeps doctor-health under cap). - Finalization retires persisted warning rows a later pass settled or superseded, so the run record and report match the pending ledger. - Post-core convergence is the last migration pass: guidance now says to run the repair command instead of waiting. - The post-core plugin summary names the reason for each informational skip. Fixes openclaw#170334 * fix(update): publish an empty warning list when every plugin migration settled * fix(update): leave skipped plugin reasons to the post-core summary owner * fix(update): report a still-pending plugin migration once after post-plugin convergence * test(update): type the settled plugin warning expectation * fix(update): keep warning guidance compatible with recovery bootstrap * fix(doctor): omit absent diagnostics from update publication (cherry picked from commit 7039a32) Backport adaptation: openclaw#170392 post-plugin pending-migration reporting is not on this branch, so the still-pending case stays a single final Doctor warning; dropped main-only deferredInspectionCheckIds publication and kept the branch's sync triage mocks and doctor-health imports.
What Problem This Solves
A successful update can leave acpx/codex data and settings upgrades pending without recording an actionable plugin warning in the update outcome. Skipped plugin updates report counts without their reasons.
Fixes #170334
User Impact
Updates continue best effort, with a final warning naming each plugin whose migration remains pending and the exact command to finish it. Skipped plugin updates also show their names and reasons. Pending work keeps its existing protection and Doctor's offline repair requirements.
Why This Change Was Made
Doctor-only and after-session migrations intentionally cannot complete in automatic Gateway mode. The update finalizer used the pending ledger to request Doctor but never checked the ledger afterward. It now records any remaining obligations through the existing Doctor advisory path, including when no plugin version changed; completed obligations produce no stale warning. The final message does not ask the operator to wait for the update that just finished.
This repair belongs to update finalization and reporting. It does not change migration execution, database schemas, backup/rollback behavior, or ownership authority. Existing installed updaters retain their own finalization behavior; updates that delegate plugin finalization to the candidate can consume the candidate fix.
Evidence
ok, and the skipped-plugin summary omitted its reason.node scripts/run-vitest.mjs src/cli/update-cli/update-command-fresh-doctor.test.ts src/cli/update-cli/update-command-plugins.persistence.test.ts --maxWorkers=1: 85 passed, 203.57 s total wall time. Finalizer file: 79 tests, 31.65 s wall / 19.401 s summed test time. Persistence file: 6 tests, 144.83 s wall / 45.815 s summed test time; cold compiler preparation dominates its wall time. New pending/cleared regressions took 34–35 ms; the skip-output case took 11.749 s through the existing real config/index fixture.--maxWorkers=1: 2537.07 s wall time. Files were collected withrg -l 'update-command-fresh-doctor|update-command-plugins' --glob '*.test.ts' src extensions packages test; the two already-proven touched files were excluded from the second run.node scripts/check-changed.mjs: passed all selected gates, including core and core-test typechecks, lint, formatting, ownership/SQLite ratchets, import cycles, and documentation checks. The initial runs caught the stale baseline entry and a test fixture literal widened toboolean; both were corrected without changing runtime behavior. PR CI timing is not available yet. No live operator Gateway, real update state, or published-binary upgrade was used. The tests cover the finalization boundary with shipped update markers and legacy/current parent and Doctor completion contracts.Existing slow-test evidence
All passed. These untouched integration fixtures perform real Gateway startup or create isolated package/SQLite maintenance and rollback processes per scenario. Cold source/runtime preparation also contributes to wall time. These existing cases are unchanged; no timeouts, retries, assertions, or skips changed.
src/gateway/server-startup-plugin-quarantine.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli/update-command-database-rollback.test.tssrc/cli/update-cli.plugin-convergence.test.ts