Repository navigation
fix(update): plugin failures never fail an update or Gateway health - #198350
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
Plugin load errors are notices: Gateway restart and readiness checks, including the gateway restart an updater runs, no longer count them as unhealthy. Plugin-owned Doctor checks no longer gate the post-plugin readiness pass, and pending plugin migrations no longer keep a verified update unresolved. Status shows failed plugins in a Plugins not loaded row. The removed plugin-health flag also chose which callers must own the listener before a probe counts; that rule is now requireOwnedListener, kept for the same callers. Co-authored-by: obviyus <[email protected]>
bb5e02c to
0cb3738
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: obviyus <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR makes plugin failures advisory during Gateway and update verification and names failed plugins in status output. Example: Upgrading from openclaw 2026.11.3 with acme-heartbeat 1.0.0 importing a removed SDK export.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes remaining plugin-related update failures on current main, and no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe updater and service lifecycle consume managed-service, listener, runtime-identity, and readiness observations; plugin diagnostics flow separately into update warnings and Gateway status. flowchart TD
A[Update CLI] --> B[Doctor core checks]
A --> C[Managed Gateway]
C --> D[Restart and readiness owner]
D --> E[Update outcome and warnings]
C --> F[Plugin registry]
F --> G[Gateway status output]
Technical reviewBest possible solution: Keep core update admission in the existing readiness owner, retain plugin failures as diagnostics, and expose failed plugins through the existing status path. Do we have a high-confidence way to reproduce the issue? Current-main source shows the update-marker restart taking the strict plugin-health path, matching the PR's recorded packaged reproduction; no target code was executed during this read-only review. Is this the best way to solve the issue? The change is a coherent cutover at existing owners: it removes the plugin-health flag and terminal outcome across callers, preserves core admission, and uses the current status pipeline without adding parallel machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 129ccc325611. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -54, Tests -438, Docs +10. Total -482 across 42 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 HistoryReview history (1 earlier review cycle)
Reviewed November 13, 2026, 1:38 PM ET / 18:38 UTC (Revision 2). |
…solved Co-authored-by: obviyus <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Problem
Plugin problems still fail updates and make a healthy Gateway look broken. From 2,720 classified real upgrade failures (plugin layer):
Reports with reason
plugin-errorsshow the shape: the new Gateway was serving, one plugin failed to load, and the update was rolled back (Failing check pluginErrors (plugin-errors); plugin discord ...).Reproduced on current
mainwith a real2026.10.10npm install, a managed LaunchAgent Gateway, and a third-party plugin built against the 2026.10.10 SDK (it importsopenclaw/plugin-sdk/heartbeat-runtime, whichmainremoved). Afteropenclaw update --tag <main tarball>the Gateway serves without the plugin, but:gateway restart --preserve-definition --jsonan updater runs (withOPENCLAW_UPDATE_IN_PROGRESS=1) fails:"ok": false, "error": "Gateway restart failed: activated plugins reported load errors.", exit 1. Immutable activation, interruption recovery, and failed-update triage apply the same plugin-health requirement.openclaw statusshows nothing about the plugin (Plugin compatibility: none); onlystatus --deepanddoctorname it.What changed
A plugin that cannot update, load, or migrate stays off for that Gateway boot with a notice. Its config and data are kept, and the next start or update retries it. The update and the Gateway proceed.
plugin-errorswait outcome. They stay in the snapshot (activatedPluginErrors) and in update warnings.openclaw update status.openclaw statusshows a Plugins not loaded row (failedPluginsin JSON), naming the plugin andopenclaw doctor.What got deleted
requirePluginHealthon every restart-health caller (lifecycle, update readiness, immutable verification, interruption recovery, triage, successor handoff, Doctor maintenance, diagnostics) and theplugin-errorswait outcome. The flag also chose which callers must own the listener before a probe counts; that rule keeps its callers under its own name,requireOwnedListener. Immutable activation and interruption recovery can now verify identity over HTTP like the other expected-version callers, since they no longer need plugin errors from RPC.test/update-memory-inspection.test.ts, which covered the removed memory-core readiness gate.Diff vs
main: production +58 / -112, tests +79 / -517, docs +19 / -9.Proof
Real entry point, isolated profile (
--profile upg8cp, own LaunchAgent and port, clean env), real[email protected]npm install, fixture plugin built withopenclaw.build.openclawVersion: 2026.10.10.main(before)openclaw update10.10 → candidate/readyzcoreReady: truecoreReady: truegateway restartwith update markeractivated plugins reported load errorsok: true,healthy: true, error listed inactivatedPluginErrorsopenclaw statusPlugins not loaded │ acme-heartbeat · data kept; retried on next start · run openclaw doctoropenclaw doctor --non-interactiveLatest stable, exact head (
c8bb297, packed):[email protected]with the same plugin loaded (11.3 still exports the SDK subpath), thenopenclaw update --tag <branch tarball>: update exit 0,Recorded verification: ... core ready; 1 plugin activation error(s),/readyzready, status showsPlugins not loaded │ acme-heartbeat, the update-markergateway restart --preserve-definition --jsonreturnsok: true, healthy: truewithactivatedPluginErrors: [acme-heartbeat], andplugins.entries.acme-heartbeat.config.labelstill readsdemo.Retry and data: after installing a fixed
1.0.1of the plugin and restarting, the plugin loads (loaded 1.0.1), the status row is gone, andplugins.entries.acme-heartbeat.config.labelstill readsdemo.Exact-head rerun (
48edd22, 2026-11-15)Real entry point. Each run uses its own profile, LaunchAgent and port, a clean
env -ienvironment, a real[email protected]npm install, and this head built withocx build --dtsand packed withscripts/package-openclaw-for-docker.mjs(tarball integrity check passed). Both runs ran in parallel.acme-heartbeat, built for 2026.10.10)openclaw update --tag <head tarball> --yes✅ OpenClaw updated,Recorded verification: … HTTP ready; core ready; 1 plugin activation error(s)✅ OpenClaw updated,Recorded verification: … HTTP ready; core ready48edd2248edd22/readyzready: true,coreReady: trueready: true,coreReady: trueopenclaw statusPlugins not loaded │ acme-heartbeat · data kept; retried on next start · run openclaw doctorgateway restart --preserve-definition --jsonwithOPENCLAW_UPDATE_IN_PROGRESS=1ok: true,healthy: true,activatedPluginErrors: [acme-heartbeat: cannot import openclaw/plugin-sdk/heartbeat-runtime …]ok: true,healthy: trueThe wall time was measured on a shared host with a 1-minute load average between 35 and 100. Most of it was the 11.3 updater's own candidate checks; the split per step was not measured.
The Control UI update panel already shows the run's
pluginscheck from the recordedpluginErrors; this PR does not change the UI.Focused tests: restart-health probe/client/progress/deadline/attribution, lifecycle readiness, status scan and overview rows, bundled health checks, triage resolution, update service/command/repair, status summary, fresh Doctor, post-plugin readiness.
pnpm tsgo:corepasses.Accepted edge cases
/readyzchannel checks are unchanged.openclaw doctor --non-interactivestill exits 1 for plugin load errors; updater-invoked Doctor already records them as warnings.plugin-errorscode.2026.9.4updater failsglobal install swapwith a local tarball (Exit code: 1; very is unverified) before any plugin work.