fix: drop clawhub: prefix from plugin install commands#214
Conversation
The `openclaw plugins install` has issues with the `clawhub:` registry prefix, it seems to ignore the version suffix and always uses the latest version instead of the one specified in the plugin spec. ``` Resolving clawhub:@openclaw/anthropic-vertex-provider@2026.6.9… Plugin "@openclaw/anthropic-vertex-provider" requires plugin API >=2026.6.10, butthis OpenClaw runtime exposes 2026.6.9. command terminated with exit code 1 ``` Remove it from the generated init container script, update the API doc comment and CRD description, and adjust all related tests accordingly. Assisted-by: Claude Opus 4.6 (1M context) Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
WalkthroughRemoves the ChangesDrop
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/controller/claw_plugins.go`:
- Around line 117-119: The plugin install command format in claw plugin
generation has changed, so update the stale examples to match the new output
from claw_plugins.go’s install command builder. Align the documented install
syntax in the user guide and the configmap manifest examples with the generated
openclaw plugins install <pkg> form, keeping the docs consistent with the
behavior of the plugin list/install code path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: a7fb24f1-502f-4ef4-a4bd-e7a821d69272
📒 Files selected for processing (4)
api/v1alpha1/claw_types.goconfig/crd/bases/claw.sandbox.redhat.com_claws.yamlinternal/controller/claw_plugins.gointernal/controller/claw_plugins_test.go
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
codeready-toolchain/api(manual)codeready-toolchain/toolchain-common(manual)codeready-toolchain/host-operator(manual)codeready-toolchain/toolchain-e2e(manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: Unit Tests
- GitHub Check: E2E Tests
🧰 Additional context used
📓 Path-based instructions (5)
**
⚙️ CodeRabbit configuration file
-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.
Files:
config/crd/bases/claw.sandbox.redhat.com_claws.yamlapi/v1alpha1/claw_types.gointernal/controller/claw_plugins.gointernal/controller/claw_plugins_test.go
api/v1alpha1/**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
Modify API types in
api/v1alpha1/and runmake manifeststo regenerate CRD YAML inconfig/crd/bases/andmake generateto regenerate zz_generated.deepcopy.go
Files:
api/v1alpha1/claw_types.go
**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.go: Include Go license header fromhack/boilerplate.go.txttemplate in all Go source files
Run golangci-lint viamake lintand usemake lint-fixfor auto-fixing, with.golangci.ymlconfiguration includinglllanddupllinters enabled
Usemake fmt(go fmt) andmake vet(go vet) for code formatting and vetting before committing
Files:
api/v1alpha1/claw_types.gointernal/controller/claw_plugins.gointernal/controller/claw_plugins_test.go
internal/controller/**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
Set owner references on all created resources via
controllerutil.SetControllerReference
Files:
internal/controller/claw_plugins.gointernal/controller/claw_plugins_test.go
**/*_test.go
📄 CodeRabbit inference engine (CLAUDE.md)
**/*_test.go: Userequireassertion from testify for fatal setup errors in tests, andassertfor value comparisons
Structure tests withTest*function names, uset.Run()for subtests,t.Cleanup()for cleanup, and implement table-driven test patterns
UsewaitFor(t, timeout, interval, condition, message)helper for async test assertions with 10s timeout and 250ms poll interval
Create separate test files per resource type (e.g.,claw_configmap_test.go,claw_credentials_test.go)
Files:
internal/controller/claw_plugins_test.go
🔇 Additional comments (4)
internal/controller/claw_plugins.go (1)
93-124: LGTM!api/v1alpha1/claw_types.go (1)
544-548: LGTM!config/crd/bases/claw.sandbox.redhat.com_claws.yaml (1)
747-754: LGTM!internal/controller/claw_plugins_test.go (1)
117-130: LGTM!Also applies to: 199-202, 328-343, 624-628, 696-700
| for _, pkg := range plugins { | ||
| escaped := "'" + strings.ReplaceAll(pkg, "'", "'\\''") + "'" | ||
| fmt.Fprintf(&b, "openclaw plugins install clawhub:%s\n", escaped) | ||
| fmt.Fprintf(&b, "openclaw plugins install %s\n", escaped) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find any remaining references to the old clawhub: install form
rg -n "plugins install clawhub:" --hidden -g '!**/vendor/**'Repository: codeready-toolchain/claw-operator
Length of output: 171
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n-- matches for old form --\n'
rg -n "plugins install clawhub:" --hidden -g '!**/vendor/**' || true
printf '\n-- matches for generated command and related docs --\n'
rg -n "openclaw plugins install|clawhub:" internal/assets/manifests/claw/configmap.yaml docs/user-guide.md internal/controller/claw_plugins.go || true
printf '\n-- relevant file excerpts --\n'
sed -n '110,125p' internal/controller/claw_plugins.go
echo
sed -n '1110,1130p' internal/assets/manifests/claw/configmap.yaml
echo
sed -n '1640,1660p' docs/user-guide.mdRepository: codeready-toolchain/claw-operator
Length of output: 199
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n-- clawhub references --\n'
rg -n "clawhub:" internal/assets/manifests/claw/configmap.yaml docs/user-guide.md internal/controller/claw_plugins.go || true
printf '\n-- install command references --\n'
rg -n "openclaw plugins install|plugins install" internal/assets/manifests/claw/configmap.yaml docs/user-guide.md internal/controller/claw_plugins.go || trueRepository: codeready-toolchain/claw-operator
Length of output: 1389
Update the stale plugin install docs. internal/controller/claw_plugins.go now emits openclaw plugins install <pkg>, but docs/user-guide.md:1646 and internal/assets/manifests/claw/configmap.yaml:1120 still document clawhub:<pkg>. Keep those examples aligned with the generated command.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@internal/controller/claw_plugins.go` around lines 117 - 119, The plugin
install command format in claw plugin generation has changed, so update the
stale examples to match the new output from claw_plugins.go’s install command
builder. Align the documented install syntax in the user guide and the configmap
manifest examples with the generated openclaw plugins install <pkg> form,
keeping the docs consistent with the behavior of the plugin list/install code
path.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #214 +/- ##
=======================================
Coverage 78.97% 78.97%
=======================================
Files 32 32
Lines 4176 4176
=======================================
Hits 3298 3298
Misses 562 562
Partials 316 316
🚀 New features to boost your workflow:
|
The
openclaw plugins installhas issues with theclawhub:registry prefix, it seems to ignore the version suffix and always
uses the latest version instead of the one specified in the plugin spec.
Remove it from the generated init container script,
update the API doc comment and CRD description, and adjust all related
tests accordingly.
Assisted-by: Claude Opus 4.6 (1M context)
Signed-off-by: Xavier Coulon xcoulon@redhat.com
Summary by CodeRabbit