Skip to content

feat(plugins): add ClawHub discovery seam - #137094

Closed
Patrick-Erichsen wants to merge 2 commits into
codex/claw-716-plugin-settingsfrom
codex/claw-717-clawhub-catalog
Closed

Patrick-Erichsen wants to merge 2 commits into
codex/claw-716-plugin-settingsfrom
codex/claw-717-clawhub-catalog

Conversation

@Patrick-Erichsen

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

Copy link
Copy Markdown
Contributor

Summary

  • add normalized Gateway browse, categories, and detail methods for ClawHub plugin discovery
  • keep ClawHub catalog facts separate from Gateway-owned installed/enabled state and join them through opaque URL-safe identities plus runtime/package aliases
  • add the minimal Control UI discovery tracer below installed inventory with independent loading, failure, and retry behavior
  • validate bounded params, opaque cursors, canonical category order, and safe fallback for unknown icon keys

Architecture

ClawHub remains authoritative for remote catalog metadata. The Gateway remains authoritative for local presence, installation, enablement, and available actions. The Control UI consumes only the joined Gateway DTO.

Dependency

Validation

  • 76 focused protocol, infrastructure, Gateway, and Plugins page tests
  • 3 mocked-Gateway Playwright tests, including isolated/retryable ClawHub failure
  • pnpm tsgo (core)
  • pnpm lint:ui:styles --quiet
  • live production ClawHub browse + opaque cursor + detail round-trip
  • autoreview: clean

Local pnpm check passed all preflight guards and core/UI type-checking, then stopped in the unrelated browser extension because this worktree lacks its already-declared @types/yargs-parser dependency. Exact-head CI installs from a clean checkout.

References OCF-54

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Sep 3, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 5, 2026, 6:45 AM ET / 10:45 UTC.

ClawSweeper review

What this changes

Adds Gateway APIs that combine ClawHub plugin listings with local installation state and displays an Explore plugins section in the Control UI.

Merge readiness

⛔ Blocked before merge - 9 items remain

Keep open: this protected, useful discovery layer is not implemented on current main. Route readiness is repaired, but two prior correctness blockers remain.

Priority: P2
Reviewed head: 2c50b6610f0a239bf842435440479b0d7a066d7b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🧂 unranked krab (1/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 12 items Pinned introduction boundary: Reviewed the introduced delta from daf75b7dff04b74447b375689b85644f0bcae7b8 to the actual checkout. Raw HEAD records the supplied two parents; no verified test merge was available.
Current main still lacks this discovery flow: Current main’s plugin read handlers expose inventory, inspection, refresh, and search, but not the three catalog methods. The new catalog client and join modules are absent from both fetched main and the supplied latest-release commit; no merged replacement is established.
Duplicate mutation handlers remain broken: The introduced mutation copies reference undeclared bindings. Production dispatch still selects plugins-mutations.ts through core descriptors and core-handlers.ts, while the modified test imports only the read module.
Findings 2 actionable findings [P1] Remove the duplicated lifecycle handlers from the read module
[P2] Align order assertions with the preserved RPC registrations
Security None None.

How this fits together

Plugin discovery connects ClawHub’s remote catalog to the Gateway’s local plugin inventory. The Control UI receives combined display data while installation and enablement remain separate administration operations.

flowchart LR
  A[Plugins page] --> B[Gateway discovery APIs]
  B --> C[ClawHub catalog]
  B --> D[Local plugin inventory]
  C --> E[Normalize and join facts]
  D --> E
  E --> F[Explore plugin results]
  C --> G[Discovery error and retry]
  G --> A
Loading

Decision needed

Question Recommendation
May this read-only discovery layer proceed beyond the stack’s explicit Gate 1 boundary? Retain the Gate 1 hold: Keep this layer pending until the parent milestone and discovery scope receive explicit approval.

Why: Both parent PR descriptions reserve discovery for explicit approval, which cannot be inferred from the implementation or maintainer label.

Before merge

  • Remove the duplicated lifecycle handlers from the read module (P1) - This prior blocker remains: the introduced install/uninstall/setEnabled copies reference undeclared bindings, including installManagedPlugin, validatePluginsUninstallParams, and pluginPolicyRestartRequired. They prevent core type-checking and break the direct-handler tests, which now import only this module. Production dispatch already uses plugins-mutations.ts; delete these copies and restore the test composition of canonical read and mutation handlers.
  • Align order assertions with the preserved RPC registrations (P2) - This prior blocker also remains. The production catalog appends discovery after update.runs.list, but this assertion requires it immediately after models.authOrderSet. The added suffix expectations likewise omit existing mention, canvas, plugin-UI, and update registrations, so the method-list tests fail with the correctly preserved catalog. Update the expectations without removing or reordering existing methods.
  • Resolve merge risk (P1) - The new public catalog contracts depend on ClawHub response shapes and category-endpoint deployment that this reviewer could not independently verify.
  • Resolve merge risk (P1) - The stack explicitly defers discovery until Gate 1 approval; that approval is not established in the supplied discussion.
  • Resolve merge risk (P1) - GitHub reports conflicts, and no verified test-merge result establishes the final integrated behavior.
  • Complete next step (P2) - Repair both findings, resolve the stack conflicts, provide changed-surface proof, and establish Gate 1 approval plus ClawHub contract readiness before merge.
  • Improve patch quality - Address the highest-priority review finding and re-run the changed-surface validation.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P1] Remove the duplicated lifecycle handlers from the read module — src/gateway/server-methods/plugins.ts:259-264
  • [P2] Align order assertions with the preserved RPC registrations — src/gateway/server-methods-list.test.ts:358-360
Agent review details

Security

None.

PR surface

Source +1060, Tests +747, Docs +3, Other +308. Total +2118 across 28 files.

View PR surface stats
Area Files Added Removed Net
Source 13 1064 4 +1060
Tests 10 759 12 +747
Docs 1 3 0 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 4 308 0 +308
Total 28 2134 16 +2118

Review metrics

Metric Value Why it matters
Production versus validation growth Production +1,060; tests +747; test support +99; generated bindings +209 The discovery capability explains substantial growth, but duplicated lifecycle handlers are avoidable production code.
Public API additions 3 RPCs added; 5 optional browse parameters and 1 required detail identifier These additions establish a client contract dependent on coordinated ClawHub behavior.

Stored data model

Persistent data-model change detected: unknown-data-model-change: packages/gateway-protocol/src/schema/plugins.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify the coordinated catalog contract (recommended)
    Confirm the upstream endpoint and response contracts before freezing the three new Gateway APIs.
  2. Hold the discovery layer
    Keep this PR pending while Gate 1 and the ClawHub dependency are resolved.

Technical review

Best possible solution:

Deliver the approved discovery milestone through shared ClawHub transport and authoritative local inventory, retaining one mutation owner and verified API/UI behavior.

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

Yes for the remaining patch defects: undeclared handler bindings and contradictory method-order assertions are deterministic from source. Tests were not executed in this read-only review.

Is this the best way to solve the issue?

Not yet: the Gateway is the appropriate join owner, and existing search does not cover the requested browsing contract, but the competing mutation implementation must be removed.

Full review comments:

  • [P1] Remove the duplicated lifecycle handlers from the read module — src/gateway/server-methods/plugins.ts:259-264
    This prior blocker remains: the introduced install/uninstall/setEnabled copies reference undeclared bindings, including installManagedPlugin, validatePluginsUninstallParams, and pluginPolicyRestartRequired. They prevent core type-checking and break the direct-handler tests, which now import only this module. Production dispatch already uses plugins-mutations.ts; delete these copies and restore the test composition of canonical read and mutation handlers.
    Confidence: 1
  • [P2] Align order assertions with the preserved RPC registrations — src/gateway/server-methods-list.test.ts:358-360
    This prior blocker also remains. The production catalog appends discovery after update.runs.list, but this assertion requires it immediately after models.authOrderSet. The added suffix expectations likewise omit existing mention, canvas, plugin-UI, and update registrations, so the method-list tests fail with the correctly preserved catalog. Update the expectations without removing or reordering existing methods.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded plugin-discovery improvement, without evidence of an urgent existing-user outage.
  • merge-risk: 🚨 compatibility: Three new public catalog APIs introduce a cross-service contract whose upstream compatibility remains unverified.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

  • Pinned introduction boundary: Reviewed the introduced delta from daf75b7dff04b74447b375689b85644f0bcae7b8 to the actual checkout. Raw HEAD records the supplied two parents; no verified test merge was available. (2c50b6610f0a)
  • Current main still lacks this discovery flow: Current main’s plugin read handlers expose inventory, inspection, refresh, and search, but not the three catalog methods. The new catalog client and join modules are absent from both fetched main and the supplied latest-release commit; no merged replacement is established. (src/gateway/server-methods/plugins.ts:21, 41651036f27f)
  • Duplicate mutation handlers remain broken: The introduced mutation copies reference undeclared bindings. Production dispatch still selects plugins-mutations.ts through core descriptors and core-handlers.ts, while the modified test imports only the read module. (src/gateway/server-methods/plugins.ts:264, 2c50b6610f0a)
  • Order assertions contradict preserved registrations: Discovery is correctly appended after update.runs.list, but the test requires it immediately after models.authOrderSet. Its added suffix expectations also omit existing registrations. (src/gateway/server-methods-list.test.ts:358, 2c50b6610f0a)
  • Re-review continuity: The handler and method-order test files are byte-identical to the last reviewed head, preserving both previously reported blockers. Current UI code sets routeDataConsumed before ensureInitialData, so the prior route-readiness finding is no longer applicable. (ui/src/pages/plugins/plugins-page.ts:319, 2c50b6610f0a)
  • Owner boundary and existing alternatives: Discovery uses the shared bounded ClawHub HTTP client and joins results with listManagedPlugins. Existing plugins.search requires a query and lacks browse pagination, categories, and joined local facts; it does not fully replace this feature. The changed path does not depend on Codex runtime or protocol behavior. (src/infra/clawhub-plugin-catalog.ts:139, 2c50b6610f0a)

Likely related people:

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

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 (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-03T08:02:48.858Z sha 439557d :: blocked before merge. :: [P1] Append discovery methods without shifting advertised indices | [P1] Reload discovery after a Gateway reconnect | [P2] Render a successful empty discovery result | [P2] Document the new public Gateway RPCs
  • reviewed 2026-09-03T08:40:12.994Z sha 439557d :: blocked before merge. :: [P1] Append discovery methods without shifting advertised indices | [P1] Reload discovery after a Gateway reconnect | [P2] Render a successful empty discovery result | [P2] Document the public discovery RPCs
  • reviewed 2026-09-03T22:03:20.999Z sha 439557d :: blocked before merge. :: [P1] Append discovery methods without shifting advertised indices | [P1] Reload discovery after a Gateway reconnect | [P2] Render a successful empty discovery result | [P2] Document the public discovery RPCs
  • reviewed 2026-09-04T00:07:40.032Z sha 55d0f7b :: blocked before merge. :: none
  • reviewed 2026-09-05T05:53:50.660Z sha af33d69 :: blocked before merge. :: [P1] [P1] Restore existing RPC registrations before appending discovery | [P2] [P2] Make accepted route data start discovery loading
  • reviewed 2026-09-05T06:51:41.675Z sha 1811a36 :: blocked before merge. :: [P1] [P1] Restore existing RPC registrations before appending discovery | [P1] [P1] Remove the duplicated lifecycle handlers from the read module | [P2] [P2] Mark accepted route data ready before loading discovery
  • reviewed 2026-09-05T07:58:12.614Z sha 653cfa0 :: blocked before merge. :: [P1] Remove the duplicated lifecycle handlers from the read module | [P2] Mark route data consumed before starting discovery | [P2] Align order assertions with the preserved RPC registrations
  • reviewed 2026-09-05T09:09:45.249Z sha 6cbcbe5 :: blocked before merge. :: [P1] Remove the duplicated lifecycle handlers from the read module | [P2] Complete route readiness before gating discovery | [P2] Align order assertions with the preserved RPC registrations

@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 3, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 3, 2026
@openclaw-barnacle openclaw-barnacle Bot closed this Sep 3, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 3, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Sep 3, 2026
@openclaw-barnacle openclaw-barnacle Bot closed this Sep 3, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 3, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Sep 3, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Sep 3, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 5, 2026
@openclaw-barnacle openclaw-barnacle Bot added the app: android App: android label Sep 5, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 5, 2026
@Patrick-Erichsen
Patrick-Erichsen force-pushed the codex/claw-717-clawhub-catalog branch from 3b68348 to d1d6bd6 Compare September 5, 2026 11:01
@Patrick-Erichsen
Patrick-Erichsen force-pushed the codex/claw-716-plugin-settings branch from daf75b7 to 3b6b4a4 Compare September 5, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant