fix: gateway boots when a configured plugin payload is broken#110239
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 10:45 PM ET / July 18, 2026, 02:45 UTC. Summary PR surface: Source +593, Tests +993, Docs +7. Total +1593 across 29 files. Reproducibility: yes. at source level and in the supplied real-run evidence: configure an active managed plugin, make its installed payload unreadable or otherwise fail static verification, then start the Gateway and inspect readiness plus plugin status. I could not independently execute that path in this read-only review environment. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land only after the plugin/startup owner explicitly accepts degrade-and-boot as the supported availability policy for known, exact-root plugin payload verification failures, with fail-closed handling retained for ambiguous or global startup failures. Do we have a high-confidence way to reproduce the issue? Yes, at source level and in the supplied real-run evidence: configure an active managed plugin, make its installed payload unreadable or otherwise fail static verification, then start the Gateway and inspect readiness plus plugin status. I could not independently execute that path in this read-only review environment. Is this the best way to solve the issue? Unclear pending owner intent: the exact-root, boot-local quarantine is a coherent bounded implementation, but whether a ready Gateway with one configured plugin absent is preferable to the current fail-closed contract is a maintainer product and upgrade-policy choice. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bd8c5399d86d. Label changesLabel justifications:
Evidence reviewedPR surface: Source +593, Tests +993, Docs +7. Total +1593 across 29 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (6 earlier review cycles)
|
6733485 to
f604236
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
b8246de to
07c0614
Compare
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
|
Merged via squash.
|
…aw#110239) * fix: quarantine broken plugins during gateway startup * fix(plugins): preserve degraded boot on package read errors * fix(gateway): emit quarantine diagnostic once * fix(gateway): refresh plugin quarantine every boot * fix(gateway): harden plugin payload quarantine Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> * fix(ci): satisfy plugin quarantine checks Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> --------- Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
Refs #109833
PR #110200 supplied typed package-verification reasons on
main; this PR adds the bounded Gateway readiness policy for failures with a known plugin owner.What Problem This Solves
Gateway startup was blocked when a configured and enabled plugin package failed payload verification, even when the failure belonged to one known plugin surface that could be isolated safely.
Why This Change Was Made
This implements the maintainer decision on #109833: degrade and boot. Startup quarantines the exact broken plugin install, emits a typed verification diagnostic, and prevents that payload from importing. Doctor, status, and health expose the owner as
configured-unavailable.The explicit
openclaw updatepath still owns repair/install convergence. A current startup checkpoint performs static verification only, so Gateway boot does not repeat install or network repair work.User Impact
Operators can keep the Gateway ready when one configured plugin package is broken. The broken plugin stays unavailable for that boot and its typed reason remains visible. State-migration failures, structurally invalid config, missing ownership, and ambiguous verification failures still block readiness.
Summary
plugins.load.pathsoverride with the same plugin id; stale install quarantine clears only after the override registers successfully.Root Cause and Best-Fix Boundary
src/commands/doctor-config-preflight.tstreated every active plugin payload warning as a fatal startup diagnostic. That policy made one known plugin-owned package failure take down the entire Gateway.Pre-import verification plus process-local exact-root quarantine is the narrow owner boundary. It preserves readiness without adding config, persistent fallback state, dual readers, or repeated convergence. Loader, doctor, health, status, and docs consume the same degraded-state contract.
Real Behavior Proof
The contributor exercised a packed npm plugin with
activation.onStartup: truein an isolated state directory. Its installedpackage.jsonwas changed to mode000; a same-user read returnedEACCES.Baseline at merge base
03d5d88a14e4:Contributor head
9ac87a5d7ba, broken payload:Second startup with the same broken payload remained ready and kept the plugin quarantined. Restoring mode
0644removed the degraded state, loaded the plugin, and made its RPC method callable. A structurally invalid Gateway config still exited with code 78 and never reached readiness.All temporary processes were stopped and the isolated proof state was removed.
Maintainer Review Improvements
The reviewed head
b58bf3b37e78also fixes issues found during maintainer review:Evidence
Rebased-head Blacksmith Testbox run 29626869038:
Additional closeout:
pnpm deadcode:fullpassed;git diff --check: passed;docs/tools/plugin.md: updated with startup quarantine, diagnostics, and recovery behavior.What Was Not Tested