Skip to content

fix(plugins): retain existing quarantine across unrelated reloads - #157907

Merged
Patrick-Erichsen merged 1 commit into
mainfrom
codex/fix-unrelated-plugin-reload
Sep 25, 2026
Merged

Patrick-Erichsen merged 1 commit into
mainfrom
codex/fix-unrelated-plugin-reload

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Enabling UI Kitchen Sink on a work Gateway was rejected during prepare with plugin load failed: composio: configured plugin payload verification failed (missing-openclaw-peer-link). Composio was already quarantined; its plugin-local openclaw symlink targeted a different checkout than the running Gateway. The full-registry replacement re-evaluated that same error and treated it as a newly failed plugin, blocking an unrelated action.

Fix

Strict replacement loading compares a re-evaluated failure against the previous registry's plugin source, failure phase, and message. An unchanged failure stays visible but does not veto an unrelated replacement. A requested plugin replacement or genuinely new/different failure still rejects. No quarantine, verification, or repair path is bypassed; Composio remains unavailable until its host link is repaired and the intended Gateway is restarted/reloaded.

Evidence

  • Before (live): The attached work-Gateway screenshot shows UI Kitchen Sink rejected during prepare by Composio's missing-openclaw-peer-link, generation 26 not applied. Read-only inspection confirmed the Composio symlink pointed to the launcher checkout while the listening Gateway process used a separate checkout; /healthz returned HTTP 200. The OCM supervisor separately reports a port-family collision with that process. Subsequent authorized work-Gateway repair is documented below.
  • Before (isolated, unmodified main): node scripts/run-vitest.mjs src/plugins/loader.runtime-registry.test.ts -t 'does not reject an unrelated replacement' failed with PluginLoadFailureError: plugin load failed: startup-quarantined: configured plugin payload verification failed (missing-openclaw-peer-link) at loader-shared.ts:434.
  • After (same isolated fixture, patch applied): That test passes; the healthy replacement loads while the prior plugin retains its error, and explicitly replacing the broken plugin still throws. Full loader file: 33/33 passed. Gateway installed-package reload file: 8/8 passed. codex review --uncommitted: no actionable regression. A patched runtime was not deployed to work.

Scope and risk

Owner: plugin loader strict-failure policy. Production delta: +22/-4 lines (net +18); test delta +68. The extra comparison preserves existing behavior for first-time failures and explicit target reloads, while handling a previously quarantined sibling whose load inputs change. No configuration, storage, protocol, or SDK changes; no old runtime path retained.

After-fix runtime proof

  • Operator work Gateway: Its original peer links were repaired against the selected OCM launcher; an unrelated orphan listener and stale owner lease were resolved, and the symlinked config path was normalized in the launcher. After the supervised restart, ocm @work -- plugins enable ui-kitchen-sink exited 0, the persisted entry became enabled: true, Gateway logs recorded config hot reload applied (plugins.entries.ui-kitchen-sink.enabled), and /healthz returned 200. This repairs the user's machine independently of the PR; the older work runtime has not been upgraded to this patch.
  • Candidate Gateway (isolated, built PR head): A fixture plugin with a peer dependency was installed with an npm-owned record and an invalid real directory at its node_modules/openclaw link. Startup reported missing-openclaw-peer-link and reached /readyz 200. An unrelated plugins.setEnabled RPC returned ok: true, restartRequired: false, generation: 5; Gateway logged Plugin replacement applied: healthy-target and config hot reload applied (plugins.entries.healthy-target). The invalid peer remained a real directory after the operation. The focused red/green loader regression additionally asserts that the quarantined record remains an error and cannot execute, while the healthy replacement loads. These are disposable fixture IDs and paths; no work-state data was copied into this proof.
  • Published driver × candidate (paired): Installed the published [email protected] npm CLI in a separate driver state with a disposable shared token for the isolated candidate. It dispatched plugins.setEnabled for healthy-target false and true; both returned ok: true, restartRequired: false (generations 3 and 4). The candidate logged both Plugin replacement applied: healthy-target and config hot reload applied; /healthz returned 200 and the quarantined plugin's invalid peer remained a real directory. An initial auth-none probe stopped at NOT_PAIRED; token auth allowed the published CLI to reach the real RPC without weakening device policy.
  • Test cost: One-worker focused regression: 28.90 s cold process wall, 11.21 s warm process wall; JSON reporter measured 62.75 ms assertion execution (incremental test CPU/CI time, separate from startup and transformation). Exact-head required CI is green.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 25, 2026, 2:02 AM ET / 06:02 UTC (Revision 2).

ClawSweeper review

What this changes

The branch lets an unchanged failure from an already quarantined plugin remain visible without blocking an unrelated plugin reload, and adds a loader regression test.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open. Current main still rejects this unrelated plugin replacement, and the branch provides a focused fix with no definite code defect found. The remaining merge work is the repository-required published-driver check and measured test-cost reporting.

Priority: P2
Reviewed head: 9eeea2345ae7f6e7d1089ab869f9785b5d8383ff

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused patch and candidate Gateway trace support the fix, while the required cross-version check remains incomplete.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (logs): The PR changes the loader decision used by Gateway replacement. The captured body reports an isolated candidate Gateway with an invalid plugin peer link, a successful unrelated plugins.setEnabled RPC, and replacement publication in Gateway logs; the focused regression covers continued quarantine and targeted rejection. The published-driver attempt stopped before dispatch and remains a separate required upgrade check. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The PR changes the loader decision used by Gateway replacement. The captured body reports an isolated candidate Gateway with an invalid plugin peer link, a successful unrelated plugins.setEnabled RPC, and replacement publication in Gateway logs; the focused regression covers continued quarantine and targeted rejection. The published-driver attempt stopped before dispatch and remains a separate required upgrade check. No stored-data contract changes.
Evidence reviewed 9 items Introduced loader decision: The PR compares an error record with the previous record's source, failure phase, and message, while explicitly replaced plugin IDs still reject.
Quarantine execution boundary: A matching boot quarantine records the plugin as unavailable and returns before resolving or executing its artifact.
Gateway replacement scope: Gateway reload marks explicitly requested plugins and plugins with changed entry or install paths for replacement.
Findings None None.
Security None None.

How this fits together

Gateway plugin reload builds a replacement registry from plugin configuration and the previous runtime registry. The loader decides which failures reject publication; the Gateway then applies healthy registrations and reports plugin errors.

flowchart TD
A[Plugin configuration change] --> B[Gateway reload request]
B --> C[Build replacement registry]
D[Previous plugin registry] --> E[Compare plugin failures]
C --> E
E --> F[Reject new or targeted failure]
E --> G[Publish healthy reload and retain quarantine]
Loading

Before merge

  • Resolve merge risk (P1) - The published-driver × candidate reload has not reached dispatch because device pairing rejected the probe, leaving the repository-required upgrade check incomplete.
  • Complete next step (P2) - Complete a paired published-driver × candidate reload that reaches dispatch, and report the new test's measured one-worker wall time and CI seconds before merge.
Agent review details

Security

None.

PR surface

Source +18, Tests +68. Total +86 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 22 4 +18
Tests 1 68 0 +68
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 90 4 +86

Review metrics

Metric Value Why it matters
Production and test delta production +22/-4 (net +18), tests +68 The production growth is confined to the failure comparison and has a stated regression rationale.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    An existing quarantine should remain visible and unexecutable while an unrelated healthy plugin reload publishes; a direct retry of the quarantined plugin should still reject.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

An existing quarantine should remain visible and unexecutable while an unrelated healthy plugin reload publishes; a direct retry of the quarantined plugin should still reject.

Do we have a high-confidence way to reproduce the issue?

Yes. The contributor reports a failing isolated baseline test on unmodified main, and current main's strict-load rule explains that failure; this read-only review did not rerun it.

Is this the best way to solve the issue?

Yes. The strict-load decision belongs in the plugin loader, and the comparison preserves rejection of targeted or changed failures without executing quarantined code.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1976a166443f.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR changes the loader decision used by Gateway replacement. The captured body reports an isolated candidate Gateway with an invalid plugin peer link, a successful unrelated plugins.setEnabled RPC, and replacement publication in Gateway logs; the focused regression covers continued quarantine and targeted rejection. The published-driver attempt stopped before dispatch and remains a separate required upgrade check. No stored-data contract changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: A previously quarantined plugin can block an unrelated Gateway plugin reload, with limited blast radius.
  • 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. Sufficient (logs): The PR changes the loader decision used by Gateway replacement. The captured body reports an isolated candidate Gateway with an invalid plugin peer link, a successful unrelated plugins.setEnabled RPC, and replacement publication in Gateway logs; the focused regression covers continued quarantine and targeted rejection. The published-driver attempt stopped before dispatch and remains a separate required upgrade check. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR changes the loader decision used by Gateway replacement. The captured body reports an isolated candidate Gateway with an invalid plugin peer link, a successful unrelated plugins.setEnabled RPC, and replacement publication in Gateway logs; the focused regression covers continued quarantine and targeted rejection. The published-driver attempt stopped before dispatch and remains a separate required upgrade check. No stored-data contract changes.

Evidence

What I checked:

  • Introduced loader decision: The PR compares an error record with the previous record's source, failure phase, and message, while explicitly replaced plugin IDs still reject. (src/plugins/loader-shared.ts:432, 9eeea2345ae7)
  • Quarantine execution boundary: A matching boot quarantine records the plugin as unavailable and returns before resolving or executing its artifact. (src/plugins/loader-runtime-candidate.ts:144, 9eeea2345ae7)
  • Gateway replacement scope: Gateway reload marks explicitly requested plugins and plugins with changed entry or install paths for replacement. (src/gateway/server-plugin-reload-recovery.ts:111, 9eeea2345ae7)
  • Current main remains affected: Fetched main retains the older rule that rejects every re-evaluated error record not retained by identity; it lacks the PR's previous-failure comparison. (src/plugins/loader-shared.ts:428, 1976a166443f)
  • Regression coverage: The new test checks that the quarantined record remains an error, an unrelated replacement loads, and an explicit reload of the broken plugin throws. (src/plugins/loader.runtime-registry.test.ts:543, 9eeea2345ae7)
  • After-fix Gateway evidence: The captured PR body reports that an isolated Gateway built from the PR head returned a successful unrelated plugins.setEnabled RPC, logged replacement publication, and left the invalid peer directory in place. The contributor also reports a baseline failure on unmodified main. This is contributor-provided runtime evidence, not a command run during this read-only review.

Likely related people:

  • Patrick Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete a paired published-driver × candidate reload that reaches dispatch.
  • Add the new test's measured one-worker wall time and CI seconds to the PR body.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-25T05:05:02.763Z sha 9eeea23 :: needs changes before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 25, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit 5688711 into main Sep 25, 2026
233 of 234 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the codex/fix-unrelated-plugin-reload branch September 25, 2026 06:14
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
…4-prep

* commit '8fe893da516ebdc817692fb2d272e27bc3c88376': (31 commits)
  fix(test): wait for reload admission before restart polling (#157964)
  refactor(mattermost): reuse DM retry option selection (#157800)
  chore(i18n): refresh native locales (#157850)
  perf(sessions): reuse current participants across transcript appends (#157622)
  refactor(signal): share pending transport migration results (#157777)
  fix(tui): open model pickers without waiting for the Gateway (#157839)
  fix(gateway): apply config despite delayed file notifications (#157906)
  fix(auth): clear deleted account selections and support account recovery (#157745)
  fix: plugin reloads lose tool results and strand subagent settlement (#157339)
  fix(gateway): avoid preview errors during worker metadata updates (#157943)
  refactor(diffs): reuse native promisify for compression (#157835)
  fix(models): keep current choices on the first picker page (#157869)
  fix(plugins): retain existing quarantine across unrelated reloads (#157907)
  fix(openai): prioritize ChatGPT sign-in and clarify auth choices (#157792)
  chore(ui): refresh control ui locales (#157955)
  fix(ui): refresh connected accounts after auth changes (#157950)
  fix(scripts): avoid redundant npm version process in package checks (#157809)
  refactor(usage): capture hosted pricing once per operation (#157838)
  refactor(ui): share slash-command failure results (#157649)
  fix(cron): announce runs miss the channel's formatting rules (#157877)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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: S 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