fix(setup): accept registry from plugin data dir, not just cache#388
Conversation
SessionStart setup.sh only checked $SCRIPT_DIR/registry.json (plugin CACHE dir, wiped on every plugin upgrade). A valid registry in the canonical data dir (CLAUDE_PLUGIN_DATA_DIR) was ignored, producing a false 'no project registry — run /ops:setup' warning on every session start. Check both locations; warn only when neither has registry.json. Verified: silent when data-dir registry present; warns when both absent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe setup script's registry validation now checks for ChangesRegistry path resolution
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ CI is green — awaiting review. |
Problem
SessionStart
scripts/setup.shchecked only$SCRIPT_DIR/registry.json— the plugin cache dir (~/.claude/plugins/cache/ops-marketplace/ops/<version>/scripts/), which is wiped on every plugin upgrade. The canonical registry lives in the data dir (CLAUDE_PLUGIN_DATA_DIR, default~/.claude/plugins/data/ops-ops-marketplace/), which persists and is where/ops:setupwrites it.Result: a valid registry in the data dir was ignored, and every session start printed a false:
Fix
Check both locations; warn only when neither has
registry.json.Verification
bash -nsyntax: OK🤖 Generated with Claude Code
Note
Low Risk
Read-only path check in session bootstrap; no changes to registry writes, secrets, or runtime behavior beyond suppressing a false warning.
Overview
SessionStart
scripts/setup.shno longer treats a missing cache-sideregistry.jsonas “no registry” when the canonical file exists underCLAUDE_PLUGIN_DATA_DIR(default~/.claude/plugins/data/ops-ops-marketplace/).The check now requires both
$SCRIPT_DIR/registry.jsonand the data-dir copy to be absent before printing the setup warning, matching where/ops:setuppersists the registry across plugin upgrades.Reviewed by Cursor Bugbot for commit b939cf7. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit