Skip to content

fix(update): plugin failures never fail an update or Gateway health - #198350

Merged
obviyus merged 3 commits into
mainfrom
fix/plugin-failures-never-fail-update
Nov 15, 2026
Merged

obviyus merged 3 commits into
mainfrom
fix/plugin-failures-never-fail-update

Conversation

@obviyus

@obviyus obviyus commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Plugin problems still fail updates and make a healthy Gateway look broken. From 2,720 classified real upgrade failures (plugin layer):

Cause Reports
Plugin runtime deps not installed after update 23
Plugin built for an older host / SDK API changed 17
Bundled channel plugin externalized without migration 17
Plugin target unavailable for update 10
Plugin data upgrade left pending 8

Reports with reason plugin-errors show 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 main with a real 2026.10.10 npm install, a managed LaunchAgent Gateway, and a third-party plugin built against the 2026.10.10 SDK (it imports openclaw/plugin-sdk/heartbeat-runtime, which main removed). After openclaw update --tag <main tarball> the Gateway serves without the plugin, but:

  • the gateway restart --preserve-definition --json an updater runs (with OPENCLAW_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.
  • plain openclaw status shows nothing about the plugin (Plugin compatibility: none); only status --deep and doctor name 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.

  • Restart health: plugin load errors never make the Gateway unhealthy and never produce the plugin-errors wait outcome. They stay in the snapshot (activatedPluginErrors) and in update warnings.
  • Update readiness: plugin-owned Doctor checks (memory-core's semantic-index check) no longer register as post-plugin readiness gates. Core config validation and security checks keep their readiness role.
  • Triage: pending plugin data migrations and plugin load errors no longer keep a verified update unresolved; they stay warnings in openclaw update status.
  • Status: openclaw status shows a Plugins not loaded row (failedPlugins in JSON), naming the plugin and openclaw doctor.
  • Docs: updating, status, triage, doctor lint.

What got deleted

  • requirePluginHealth on every restart-health caller (lifecycle, update readiness, immutable verification, interruption recovery, triage, successor handoff, Doctor maintenance, diagnostics) and the plugin-errors wait 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.
  • The update-readiness tagging for bundled plugin health registrations.
  • Pending-migration blocking in triage resolution.
  • 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 with openclaw.build.openclawVersion: 2026.10.10.

npm install -g --prefix /tmp/upg8/prefix [email protected]
openclaw plugins install npm-pack:acme-openclaw-heartbeat-1.0.0.tgz --force --accept-capabilities
openclaw gateway install --port 28789
openclaw update --tag /tmp/upg8/pkg/openclaw-fix8.tgz --yes          # this branch, packed
OPENCLAW_UPDATE_IN_PROGRESS=1 openclaw gateway restart --preserve-definition --json
openclaw status
Check main (before) this branch (after)
openclaw update 10.10 → candidate succeeds, 1 plugin activation error succeeds, 1 plugin activation error
Gateway /readyz 200, coreReady: true 200, coreReady: true
updater gateway restart with update marker exit 1, activated plugins reported load errors exit 0, ok: true, healthy: true, error listed in activatedPluginErrors
openclaw status no plugin notice Plugins not loaded │ acme-heartbeat · data kept; retried on next start · run openclaw doctor
openclaw doctor --non-interactive names the load error names the load error (unchanged)

Latest stable, exact head (c8bb297, packed): [email protected] with the same plugin loaded (11.3 still exports the SDK subpath), then openclaw update --tag <branch tarball>: update exit 0, Recorded verification: ... core ready; 1 plugin activation error(s), /readyz ready, status shows Plugins not loaded │ acme-heartbeat, the update-marker gateway restart --preserve-definition --json returns ok: true, healthy: true with activatedPluginErrors: [acme-heartbeat], and plugins.entries.acme-heartbeat.config.label still reads demo.

Retry and data: after installing a fixed 1.0.1 of the plugin and restarting, the plugin loads (loaded 1.0.1), the status row is gone, and plugins.entries.acme-heartbeat.config.label still reads demo.

Exact-head rerun (48edd22, 2026-11-15)

Real entry point. Each run uses its own profile, LaunchAgent and port, a clean env -i environment, a real [email protected] npm install, and this head built with ocx build --dts and packed with scripts/package-openclaw-for-docker.mjs (tarball integrity check passed). Both runs ran in parallel.

Check 11.3 + old-SDK plugin (acme-heartbeat, built for 2026.10.10) 11.3, no third-party plugin (control)
openclaw update --tag <head tarball> --yes exit 0, ✅ OpenClaw updated, Recorded verification: … HTTP ready; core ready; 1 plugin activation error(s) exit 0, ✅ OpenClaw updated, Recorded verification: … HTTP ready; core ready
Build after update 48edd22 48edd22
Gateway /readyz 200, ready: true, coreReady: true 200, ready: true, coreReady: true
openclaw status Plugins not loaded │ acme-heartbeat · data kept; retried on next start · run openclaw doctor no plugin row
Updater gateway restart --preserve-definition --json with OPENCLAW_UPDATE_IN_PROGRESS=1 exit 0, ok: true, healthy: true, activatedPluginErrors: [acme-heartbeat: cannot import openclaw/plugin-sdk/heartbeat-runtime …] exit 0, ok: true, healthy: true
Wall time per run (setup, install, update, checks) 31.7 min 31.7 min

The 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 plugins check from the recorded pluginErrors; 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:core passes.

Accepted edge cases

  • A required channel plugin that fails to load leaves that channel down until the next start or update fixes it. The Gateway reports ready for core work; /readyz channel checks are unchanged.
  • Standalone openclaw doctor --non-interactive still exits 1 for plugin load errors; updater-invoked Doctor already records them as warnings.
  • Failure records written by earlier updaters keep the public plugin-errors code.
  • Observed while testing, not fixed here: the 2026.9.4 updater fails global install swap with a local tarball (Exit code: 1; very is unverified) before any plugin work.

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated 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.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes commands Command implementations size: L labels Nov 13, 2026
@clawsweeper clawsweeper Bot added the clawsweeper:intake:bug Preliminary submission classification; full source review pending. label Nov 13, 2026
@obviyus
obviyus marked this pull request as ready for review November 13, 2026 16:18
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]>
@obviyus
obviyus force-pushed the fix/plugin-failures-never-fail-update branch from bb5e02c to 0cb3738 Compare November 13, 2026 16:53
@obviyus

obviyus commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus

obviyus commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The update-marker Gateway restart exits 1 despite a serving Gateway, and plain status omits the plugin failure.
  • After: Restart returns healthy with the plugin error retained, and status names acme-heartbeat with Doctor guidance.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent repair supported by packaged upgrade results, focused regression coverage, and successful supplied head checks.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Inline terminal results exercise the packaged update CLI, managed LaunchAgent restart with updater markers, HTTP readiness, status notice, and plugin repair from stable 2026.11.3 with config retained; the subsequent head changes tests only.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A serving Gateway can fail updater restart verification because one plugin cannot load, while plain status omits the failed plugin.
Reason: The maintainer-authored direction implements the repository's best-effort update contract and explicitly accepts degraded plugin capability with visible diagnostics.

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
Reviewed head: 48edd22aa1d5322951a8df671fa5edba940118cb

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 7f919ca adds src/cli/daemon-cli/restart-health-inspect.ts:87 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7f919ca7ea83; files: src/cli/daemon-cli/restart-health-inspect.ts)
  • Patrick Erichsen: Raw commit 2bfa68d adds src/flows/bundled-health-checks.ts:75 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 2bfa68daab84; files: src/flows/bundled-health-checks.ts)

PR surface

Source -54, Tests -438, Docs +10. Total -482 across 42 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 23 58 112 -54
Tests 15 79 517 -438
Docs 4 19 9 +10
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 42 156 638 -482

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Fixes plugin-specific false update and Gateway-health failures with a bounded change to existing verification and reporting owners.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-13T17:25:17.620Z sha c8bb297 :: needs maintainer review before merge. :: none

Reviewed November 13, 2026, 1:38 PM ET / 18:38 UTC (Revision 2).

@clawsweeper clawsweeper Bot removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 13, 2026
@obviyus

obviyus commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 13, 2026
@obviyus
obviyus merged commit 5dbf569 into main Nov 15, 2026
160 checks passed
@obviyus
obviyus deleted the fix/plugin-failures-never-fail-update branch November 15, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant