Skip to content

feat(claws): review and add local or official ClawHub packages - #163296

Closed
Patrick-Erichsen wants to merge 2 commits into
codex/claw-1093-v2-01-catalogfrom
codex/claw-1093-v2-02-reviewed-add
Closed

Patrick-Erichsen wants to merge 2 commits into
codex/claw-1093-v2-01-catalogfrom
codex/claw-1093-v2-02-reviewed-add

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Publication Refresh: October 7

Layer 2/16. Previous: #163295 | Next: #163297. Published checkpoint: 73ab36e86fce.

The stack now includes 45 previously local follow-up commits in four additional draft PRs, ending at #166801 (9e653a8ed286). Fresh combined-tip checks passed: 100 backend tests and 13 built-UI browser tests with a mocked Gateway. Before/after review captures are attached. Evidence below that names 6765a8741e4 remains historical evidence for that revision, not a new real-ClawHub run or per-layer CI result.

The stack remains draft and its first layer conflicts with current main. Reconciliation, exact-head CI/review, and the existing release gates remain outstanding. No merge or deployment is authorized by this publication.

What Problem This Solves

Catalog search is a dead end unless a user can preview and safely add the selected Claw.

User Impact

The Gateway can plan and apply Add from a local package or official ClawHub release, with explicit review of effects and plugin capabilities. The CLI still accepts local sources; registry Add is delivered through the Gateway/UI. The required OPENCLAW_EXPERIMENTAL_CLAWS environment gate is removed, with the replacement Labs gate completed later in this same stack.

Why This Change Was Made

Add reuses canonical package installation and worker-owned state writes, binds plugin installation to reviewed consent, and carries ClawHub provenance into installed records. It overlaps the backend journey in Gio's #162987; the branches should be reconciled, not merged independently.

Evidence

Gateway plan/apply, plugin consent, package-runtime, and state-worker regression tests are included. At final stack tip 6765a8741e4, pnpm check:changed and installable-tarball integrity passed. All 30 latest official ClawHub artifacts downloaded with matching size/SHA-256 and produced zero-blocker Gateway Add plans. An installed OpenClaw host reviewed and added @openclaw/[email protected]; its review disclosed one Lobster plugin and required consent. A real task invoked Lobster and wrote the requested handoff; Labs-off status and Remove also succeeded. After correcting Executive Assistant's version, the local 30-package source-sync dry run reports 30 exact-match skips; production publication and security review remain outstanding.

Release gate: Land the OpenClaw stack together only after ClawHub #3883 and local publish-to-real-task lifecycle proof.

@clawsweeper

clawsweeper Bot commented Oct 2, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling size: XL labels Oct 2, 2026
@Patrick-Erichsen Patrick-Erichsen changed the title codex/claw 1093 v2 02 reviewed add feat(claws): review and add local or official ClawHub packages Oct 2, 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. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Adds Gateway review and installation of official ClawHub agent packages, binds plugin installation to capability consent, moves Add records into SQLite workers, and removes the experimental CLI environment gate.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful implementation and historical runtime evidence remain, but incomplete caller cutover and authority/upgrade proof prevent merge readiness.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 9 items remain

This remains useful, distinct stack work that current main does not provide. Three prior defects remain at the pinned head; historical installed-host success does not resolve final-effect authorization or interrupted-install compatibility gaps.

Priority: P2
Reviewed head: 73ab36e86fce40415d373c7f6357fdeb52feac56

Before merge

  • Add real behavior proof - Authority-chain proof required: preserve the historical packaged-host Workflow Operator/Lobster success at 6765a87, but add observed read-only and mid-install revoked-administrator rejection through the real Add handler to final plugin, config, and scheduler effects. Inspected later-stack screenshots show synthetic review UI; real-worker admission tests and mocked Gateway tests do not cover that composition. Independently, pre-change plugin-bearing partial-install reopening/resume compatibility remains unverified. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • [P1] Preserve capability evidence in the plugin-upgrade adapter (P1) - This prior finding remains. A plugin version change passes through applyClawUpdatePlan’s version-conflict adapter, which copies identity and format facts but drops declaredCapabilities and capabilityGrants. The newly introduced requirement here then emits plugin_capability_provenance_incomplete, and Update aborts with update_target_blocked. Preserve both reviewed fields through that adapter.
  • [P1] Supply reviewed plugin consent through the Update path (P1) - This prior finding remains. Updating a Claw to add a plugin now reaches this mandatory consent check, but runClawsUpdateCommand and applyClawUpdatePlan never supply pluginConsent. Consequently an otherwise valid, explicitly confirmed Update fails with plugin_consent_required. Carry the reviewed consent through the real Update callers while preserving the final capability comparison.
  • [P2] Return the blocked preview when the agent ID already exists (P2) - This prior finding remains. The canonical planner records agent_id_collision when the selected ID exists, but this unconditional disclosure call throws for the same state. The Gateway therefore returns a generic unavailable error instead of the blocked preview needed to choose another ID. Preserve the blockers and omit unavailable configured-access disclosure for that blocked plan.
  • Resolve merge risk - Observed rejection for a read-only Gateway caller and an administrator revoked during awaited installation remains unproven at the final plugin, config, and scheduler effect owners.
  • Resolve merge risk - The changed consent-bound plan digest lacks verified reopening/resume compatibility for an existing plugin-bearing partial installation.
  • Resolve merge risk - The stack owner must reconcile the conflicting first layer with current main, propagate repairs through dependent layers, and satisfy the recorded registry and launch gates before landing.
  • Complete next step - Have the stack owner reconcile current main, propagate the retained caller fixes, and complete the recorded registry and launch prerequisites before requesting readiness.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P1] [P1] Preserve capability evidence in the plugin-upgrade adapter — src/claws/lifecycle.ts:461-465
  • [P1] [P1] Supply reviewed plugin consent through the Update path — src/claws/packages.ts:486-491
  • [P2] [P2] Return the blocked preview when the agent ID already exists — src/claws/gateway-plan-projection.ts:137-142
Agent review details

How this fits together

Claws package an agent’s workspace, plugins, skills, MCP servers, and scheduled work. The Gateway turns verified package contents into a reviewable plan, then uses existing installation owners to create the agent and record ownership.

flowchart TD
  A[ClawHub package] --> B[Verified installation plan]
  B --> C[Operator capability review]
  C --> D{Current administrator authority}
  D -->|Allowed| E[Canonical installation owners]
  D -->|Denied| F[Reject installation]
  E --> G[Agent and ownership records]
Loading

Technical review

Best possible solution:

Keep one canonical Claw lifecycle path with complete capability evidence and consent across Add and Update, recoverable interrupted installs, and live authority enforced at every final effect.

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

Yes, from source: plugin version changes lose required preflight evidence, plugin additions through CLI Update lack consent, and previewing an existing agent ID throws. These paths were not executed during this read-only review.

Is this the best way to solve the issue?

Unclear as submitted: reusing canonical installers and SQLite workers is appropriate, but the shared contract must be carried through Update and blocked previews must remain reviewable.

Full review comments:

  • [P1] [P1] Preserve capability evidence in the plugin-upgrade adapter — src/claws/lifecycle.ts:461-465
    This prior finding remains. A plugin version change passes through applyClawUpdatePlan’s version-conflict adapter, which copies identity and format facts but drops declaredCapabilities and capabilityGrants. The newly introduced requirement here then emits plugin_capability_provenance_incomplete, and Update aborts with update_target_blocked. Preserve both reviewed fields through that adapter.
    Confidence: 0.99
  • [P1] [P1] Supply reviewed plugin consent through the Update path — src/claws/packages.ts:486-491
    This prior finding remains. Updating a Claw to add a plugin now reaches this mandatory consent check, but runClawsUpdateCommand and applyClawUpdatePlan never supply pluginConsent. Consequently an otherwise valid, explicitly confirmed Update fails with plugin_consent_required. Carry the reviewed consent through the real Update callers while preserving the final capability comparison.
    Confidence: 0.99
  • [P2] [P2] Return the blocked preview when the agent ID already exists — src/claws/gateway-plan-projection.ts:137-142
    This prior finding remains. The canonical planner records agent_id_collision when the selected ID exists, but this unconditional disclosure call throws for the same state. The Gateway therefore returns a generic unavailable error instead of the blocked preview needed to choose another ID. Preserve the blockers and omit unavailable configured-access disclosure for that blocked plan.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d794f3d9b248.

Merge-risk options

Maintainer options:

  1. Repair and validate the coordinated stack (recommended)
    Propagate the caller fixes through the selected stack and verify interrupted-install recovery and unauthorized/revoked final-effect rejection on the reconciled result.

Security

None.

Evidence

What I checked:

  • Pinned introduction and clean checkout: Inspected the merge-base-to-head introduction: d0ed023 to 73ab36e. The complete local changed-path list contains 82 paths. The supplied test merge is stale and cannot establish the eventual main merge result. Final checkout status remained clean. (73ab36e86fce)
  • Current-main necessity check: Current main still uses the older package installation flow without this layer’s capability inspection and explicit Claw consent contract. Its Gateway descriptors expose monitor and package-removal methods, rather than this layer’s Add plan/apply methods. No verified merged fixing PR establishes redundancy. Inspection of the latest release descriptor blob failed with a promisor-remote HTTP 403, so no shipped-equivalence claim is made. (src/claws/packages.ts, d794f3d9b248)
  • Prior upgrade-evidence finding remains: The new lifecycle requirement rejects plugin preflight without declaredCapabilities and capabilityGrants. The existing version-conflict adapter in src/claws/update-apply.ts:225-236 constructs a successful result without either field, causing plugin version changes to fail with update_target_blocked. (src/claws/lifecycle.ts:461, 73ab36e86fce)
  • Prior Update consent finding remains: The shared package installer now requires options.pluginConsent before installing a plugin. The CLI Update caller and applyClawUpdatePlan do not provide that option, so an update adding a new plugin reaches plugin_consent_required. (src/claws/packages.ts:486, 73ab36e86fce)
  • Prior preview finding and corrected fixture: Add projection unconditionally calls projectClawConfiguredAccess, which throws when the requested agent already exists; this prevents returning the agent_id_collision blocker. The current Update projection fixtures now supply currentJobs, resolving that prior fixture finding. (src/claws/gateway-plan-projection.ts:137, 73ab36e86fce)
  • Authority chain and supplemental coverage: The Add handler checks live client authority and administrator scope, propagates assertions through installation, and supplies scheduler commit guards. SQLite worker writes request transaction and commit admission. Real-worker refusal tests cover record rollback, but the Gateway revocation tests mock applyClawAddForGateway and do not exercise final plugin, config, and scheduler effects. (src/gateway/server-methods/claws-add.ts:66, 73ab36e86fce)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Gateway surface 2 Add RPC methods added; 1 experimental environment gate removed This layer makes reviewed installation reachable through the Gateway and makes CLI lifecycle commands available without process opt-in.
Production versus test growth production +2668/-505, net +2163; tests and test support +2716/-192, net +2524 Production growth is explained by Gateway planning, capability review, and worker-owned state writes, but the caller cutover remains incomplete.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded experimental installation feature with source-proven lifecycle defects, rather than an established urgent production regression.
  • merge-risk: 🚨 compatibility: New shared-installer requirements break existing Update callers and change the persisted digest used to resume interrupted installs.
  • merge-risk: 🚨 security-boundary: Gateway administrator authority now reaches installation effects, and forbidden or revoked-caller rejection still needs final-effect proof.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

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

  • Resolve the three retained findings and propagate the repairs through dependent stack layers.
  • Attach redacted final-effect evidence for a read-only caller and an administrator revoked during awaited installation; update the body for automatic re-review or request @clawsweeper re-review.
  • Verify fresh installation and reopening/resuming a pre-change plugin-bearing partial installation on the reconciled stack.

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 (2 earlier review cycles)
  • reviewed 2026-10-02T06:15:05.373Z sha 530268c :: needs real behavior proof before merge. :: [P1] Preserve capability evidence in the plugin-upgrade adapter | [P1] Supply reviewed plugin consent through the Update path | [P2] Return the blocked preview when the agent ID already exists | [P2] Provide currentJobs in the Update projection test
  • reviewed 2026-10-02T11:07:35.926Z sha 530268c :: needs real behavior proof before merge. :: [P1] [P1] Preserve capability evidence in the plugin-upgrade adapter | [P1] [P1] Supply reviewed plugin consent through the Update path | [P2] [P2] Return the blocked preview when the agent ID already exists | [P2] [P2] Provide currentJobs in the Update projection test

Reviewed October 7, 2026, 7:25 PM ET / 23:25 UTC (Revision 3).

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Closing as superseded: #171623 replaced the Claws plan/review/update/remove lifecycle with a one-way Add operation, and main no longer has the lifecycle modules this layer changes. Any hardening here that still matters should be redone against the new Add flow.

Closed by Roboclaw at the author's request after an audit of his open PRs. The branch is kept, so this can be reopened if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants