Skip to content

fix(plugins): preserve workspace discovery and management ownership - #117265

Merged
steipete merged 1 commit into
mainfrom
codex/qa400-plugin-status-workspace-schema
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa400-plugin-status-workspace-schema

Conversation

@steipete

@steipete steipete commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Configured selected-agent workspace plugins disappeared from cold CLI and Control UI inventory, icons, Gateway enable/disable, linked uninstall, and persisted registry refresh. Valid plugin configuration schemas were also falsely reported absent. A post-commit install failure could delete an already-persisted plugin when management used a different home/state root.

Why This Change Was Made

Move selected-agent workspace ownership into the existing cold control-plane readers and persisted registry writer, carry one effective management environment through metadata, mutation, install rollback and record lookup, and derive schema availability from the manifest. No configuration surface, plugin SDK, security policy, Gateway protocol, provider policy, runtime import, or SQLite schema changes.

User Impact

Workspace plugins stay visible and manageable across Control UI, Gateway and CLI; icons resolve, enabled state survives refresh, sibling plugins survive linked uninstall, configuration support is accurately reported, and a physically installed plugin is retained after a durable post-commit failure.

Evidence

  • Test-first regressions reproduced dropped workspace inventory, false schema flags, destructive wrong-home refresh, and unsafe post-commit cleanup; ten focused existing suites pass 142 tests across Gateway, CLI and plugin projects.
  • Real Gateway handlers, Control UI inventory/icon/policy, actual CLI/manual registry refresh, distinct-home two-plugin toggles, linked uninstall, and actual persisted SQLite rows verify the complete authorized operator path with no plugin-runtime import or network request.
  • An independent reviewer reran the hostile two-plugin distinct-home flow; isolated decoy-home runs emitted expected stale-config/config-migration warnings without affecting behavior or operator state.
  • Real local-source installation physically copies a plugin, commits its SQLite record into an explicit state root, then injects a post-commit failure; the source and committed record survive while the separate process-owned SQLite store stays empty.
  • Real existing oxlint passes all affected test suites after consolidating repeated ClawHub/catalog fixtures and relocating preserved workspace refresh regressions to their existing snapshot suite; no max-lines suppressions or new files.
  • Four completed independent hostile P0–P3 audits; the sole genuine full official automated review exited 0 with no findings and 0.93 confidence.
  • Production delta: +47/-13 (net +34) across three canonical control-plane owners; no new configuration, SDK, security, provider, protocol, or SQLite schema surface.
  • Known residual intentionally held outside the five approved files: a successful managed install with an explicit alternate state root still needs separate shared persistence/commit-owner work; this change only guarantees its rollback safety and does not claim to fix that broader flow.

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 1, 2026
@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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 3:11 AM ET / 07:11 UTC.

ClawSweeper review

What this changes

The PR makes configured default-agent workspace plugins remain discoverable, manageable, and correctly described across cold CLI, Gateway, Control UI, and persisted-registry flows.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This is still necessary: current main retains the cold plugin control-plane paths that omit the configured default-agent workspace, while this PR supplies the shared workspace owner consistently for inventory, status, mutations, and registry refresh. The patch is coherent, has focused regression coverage and supplied real operator-path proof, and no discrete correctness defect was found; protected maintainer handling and in-progress exact-head checks leave the final merge decision to a human.

Priority: P1
Reviewed head: 9fbcc2db8536b123ab253cf335f57da65b58eb72
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong operator-path proof and focused control-plane repair support a normal good rating; the remaining work is protected maintainer acceptance and current-head CI completion, not a code defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied PR evidence describes after-fix Gateway, Control UI, CLI, distinct-home, persisted-SQLite, and post-commit rollback behavior, and the PR carries proof: sufficient.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The supplied PR evidence describes after-fix Gateway, Control UI, CLI, distinct-home, persisted-SQLite, and post-commit rollback behavior, and the PR carries proof: sufficient.
Evidence reviewed 7 items Workspace ownership contract: The shared resolver chooses the configured workspace for the selected default agent, including the configured agent workspace before falling back to defaults. The PR reuses this owner rather than creating a parallel workspace rule.
Cold control-plane repair: The branch adds one metadata-parameter helper that supplies the default-agent workspace to inventory and icon lookup, then uses the same owner in enable/uninstall paths.
Registry and status coverage: The branch resolves the default-agent workspace before refresh and status projection, and reports manifest-backed config-schema availability from cold metadata.
Findings None None.
Security None None.

How this fits together

OpenClaw builds cold plugin metadata without importing plugin runtime code, then uses that metadata for CLI and Gateway management, Control UI inventory, status reporting, and persisted registry refresh. The configured default-agent workspace is an input to that discovery and therefore affects the plugin records visible to operators.

flowchart LR
  A[OpenClaw configuration] --> B[Default agent workspace]
  B --> C[Cold plugin metadata]
  C --> D[CLI Gateway and UI inventory]
  C --> E[Plugin status report]
  C --> F[Enable uninstall and refresh]
  F --> G[Persisted plugin registry]
Loading

Decision needed

Question Recommendation
Should this protected maintainer-labelled compatibility repair merge after the remaining checks complete on the exact head? Merge after exact-head checks: Accept the shared default-agent workspace owner path once the remaining required checks complete on the reviewed head.

Why: The patch intentionally changes persisted plugin inventory behavior for existing selected-agent workspace configurations, and repository policy reserves protected-label handling for explicit maintainer judgment.

Before merge

  • Resolve merge risk (P1) - Merging changes discovery and persisted-registry behavior for existing selected-agent workspace configurations; complete the remaining exact-head checks and retain maintainer approval for that compatibility change.
  • Resolve merge risk (P1) - The PR intentionally does not solve successful managed installation into an explicit alternate state root, so that separate persistence-owner work should remain distinct rather than being assumed fixed here.
Agent review details

Security

None.

PR surface

Source +34, Tests +187. Total +221 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 47 13 +34
Tests 2 369 182 +187
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 416 195 +221

Review metrics

None.

Stored data model

Persistent data-model change detected: database schema: src/plugins/management-service.test.ts, vector/embedding metadata: src/plugins/management-service.test.ts, vector/embedding metadata: src/plugins/management-service.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete checks, then merge (recommended)
    Keep the coherent repair and merge after all required checks complete on the exact reviewed head.
  2. Pause for persistence redesign
    Do not merge this branch if maintainers decide the remaining alternate-state-root install behavior must share the same persistence owner first.

Technical review

Best possible solution:

Merge this focused repair after required checks finish on the reviewed head and a maintainer explicitly accepts its existing-configuration registry behavior; track alternate-state-root successful-install persistence separately if it remains needed.

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

Yes. The pre-PR cold metadata readers omit the configured default-agent workspace even though resolveAgentWorkspaceDir is the established workspace contract, and the branch adds focused regressions for that path; no local execution was run because this is a read-only review.

Is this the best way to solve the issue?

Yes. Passing the existing default-agent workspace through each cold metadata and registry owner is the narrowest coherent repair; surface-specific fallback discovery would duplicate workspace policy and drift.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: Workspace plugins disappearing from cold CLI, Gateway, and Control UI management breaks an established operator workflow.
  • merge-risk: 🚨 compatibility: The patch changes how existing default-agent workspace plugins are discovered and recorded in the persisted plugin registry.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The supplied PR evidence describes after-fix Gateway, Control UI, CLI, distinct-home, persisted-SQLite, and post-commit rollback behavior, and the PR carries proof: sufficient.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied PR evidence describes after-fix Gateway, Control UI, CLI, distinct-home, persisted-SQLite, and post-commit rollback behavior, and the PR carries proof: sufficient.

Evidence

What I checked:

  • Workspace ownership contract: The shared resolver chooses the configured workspace for the selected default agent, including the configured agent workspace before falling back to defaults. The PR reuses this owner rather than creating a parallel workspace rule. (src/agents/agent-scope-config.ts:263, b4636f23721a)
  • Cold control-plane repair: The branch adds one metadata-parameter helper that supplies the default-agent workspace to inventory and icon lookup, then uses the same owner in enable/uninstall paths. (src/plugins/management-service.ts:642, 9fbcc2db8536)
  • Registry and status coverage: The branch resolves the default-agent workspace before refresh and status projection, and reports manifest-backed config-schema availability from cold metadata. (src/plugins/status-snapshot.ts:139, 9fbcc2db8536)
  • Regression coverage: Focused tests cover discovery from the configured default-agent workspace without importing plugin runtime, plus management paths using the resolved workspace. (src/plugins/status.registry-snapshot.test.ts:198, 9fbcc2db8536)
  • Feature provenance: Current-main blame attributes the original cold management and status paths to the same recent plugin control-plane commit, establishing the likely area owner and the pre-fix omission. (src/plugins/management-service.ts:649, 5f91afabc7ae)
  • Current-main comparison: The PR parent is an ancestor of both the PR head and current main, and git log reports no current-main commits touching the five PR paths after that parent; current main has not independently absorbed this repair. (b4636f23721a)

Likely related people:

  • thomas.szbay: Commit 5f91afabc7 introduced the current cold plugin management, registry refresh, and status paths; the PR repairs their shared workspace-discovery omission. (role: feature owner and recent area contributor; confidence: high; commits: 5f91afabc7ae; files: src/plugins/management-service.ts, src/plugins/plugin-registry-snapshot.ts, src/plugins/status-snapshot.ts)

Rank-up moves

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

  • Let the in-progress required checks finish on the exact reviewed head.
  • Have a maintainer explicitly accept the persisted-registry compatibility behavior before merging.

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 (2 earlier review cycles)
  • reviewed 2026-08-01T06:45:39.077Z sha 19cc490fbeb1216926729b03c4f5bb110937c641 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T06:52:52.544Z sha 19cc490fbeb1216926729b03c4f5bb110937c641 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/qa400-plugin-status-workspace-schema branch from 19cc490 to 9fbcc2d Compare August 1, 2026 07:04
@steipete
steipete merged commit 416d808 into main Aug 1, 2026
126 of 130 checks passed
@steipete
steipete deleted the codex/qa400-plugin-status-workspace-schema branch August 1, 2026 07:32
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 1, 2026
* origin/main: (41 commits)
  test(ci): update memory helper routing expectation (#117295)
  fix(canvas): emit successful control results in JSON mode (#117297)
  fix(imessage): settle native inbound reply delivery (#117282)
  fix(agents): reject invalid UTF-8 LSP responses (#117271)
  fix(line): centralize card and template message alt text (#117280)
  fix(release): validate candidates before Docker publication (#117252)
  fix(media): validate provider-owned generated media downloads (#117281)
  fix(feishu): restore custom HTTPS API domains (#117278)
  fix(models): reuse prepared plugin metadata (#117131)
  fix(agents): stop fallback after delivered-but-failed attempts (#114628)
  fix(memory): reuse targeted session corpus snapshot (#117247)
  fix(matrix): reconcile durable sends after response loss
  test(release): repair full validation regressions (#116931)
  fix(linux-canvas): report socket watcher fallback (#109502)
  fix(codex): preserve authoritative turn completion (#117185)
  fix(canvas): preserve widgets across derived-name collisions (#117132)
  fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (#117206)
  fix(msteams): prevent duplicate final replies (#116398)
  fix(doctor): session SQLite restore installs an empty session index over the valid archive (#117221)
  fix(plugins): preserve workspace plugins across CLI and control UI (#117265)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (41 commits)
  test(ci): update memory helper routing expectation (openclaw#117295)
  fix(canvas): emit successful control results in JSON mode (openclaw#117297)
  fix(imessage): settle native inbound reply delivery (openclaw#117282)
  fix(agents): reject invalid UTF-8 LSP responses (openclaw#117271)
  fix(line): centralize card and template message alt text (openclaw#117280)
  fix(release): validate candidates before Docker publication (openclaw#117252)
  fix(media): validate provider-owned generated media downloads (openclaw#117281)
  fix(feishu): restore custom HTTPS API domains (openclaw#117278)
  fix(models): reuse prepared plugin metadata (openclaw#117131)
  fix(agents): stop fallback after delivered-but-failed attempts (openclaw#114628)
  fix(memory): reuse targeted session corpus snapshot (openclaw#117247)
  fix(matrix): reconcile durable sends after response loss
  test(release): repair full validation regressions (openclaw#116931)
  fix(linux-canvas): report socket watcher fallback (openclaw#109502)
  fix(codex): preserve authoritative turn completion (openclaw#117185)
  fix(canvas): preserve widgets across derived-name collisions (openclaw#117132)
  fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (openclaw#117206)
  fix(msteams): prevent duplicate final replies (openclaw#116398)
  fix(doctor): session SQLite restore installs an empty session index over the valid archive (openclaw#117221)
  fix(plugins): preserve workspace plugins across CLI and control UI (openclaw#117265)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. 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