Skip to content

fix(setup): accept registry from plugin data dir, not just cache#388

Merged
auroracapital merged 1 commit into
mainfrom
fix/ops-registry-datadir
May 30, 2026
Merged

fix(setup): accept registry from plugin data dir, not just cache#388
auroracapital merged 1 commit into
mainfrom
fix/ops-registry-datadir

Conversation

@auroracapital
Copy link
Copy Markdown
Collaborator

@auroracapital auroracapital commented May 30, 2026

Problem

SessionStart scripts/setup.sh checked 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:setup writes it.

Result: a valid registry in the data dir was ignored, and every session start printed a false:

✗ ops: no project registry — run /ops:setup to create one

Fix

Check both locations; warn only when neither has registry.json.

Verification

  • bash -n syntax: OK
  • Data-dir registry present → no warning
  • Both absent → warning still fires

🤖 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.sh no longer treats a missing cache-side registry.json as “no registry” when the canonical file exists under CLAUDE_PLUGIN_DATA_DIR (default ~/.claude/plugins/data/ops-ops-marketplace/).

The check now requires both $SCRIPT_DIR/registry.json and the data-dir copy to be absent before printing the setup warning, matching where /ops:setup persists 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

  • Bug Fixes
    • Fixed erroneous "no project registry" warnings that incorrectly appeared following plugin upgrades. The registry validation now properly checks multiple registry locations to ensure accurate detection.

Review Change Stack

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3b8e7584-f05f-4ab1-aa6e-c96af28b5bb5

📥 Commits

Reviewing files that changed from the base of the PR and between 3fe8bc8 and b939cf7.

📒 Files selected for processing (1)
  • claude-ops/scripts/setup.sh

📝 Walkthrough

Walkthrough

The setup script's registry validation now checks for registry.json in either the plugin's cached directory or a persistent plugin data directory with environment variable fallback, preventing false warnings after plugin upgrades.

Changes

Registry path resolution

Layer / File(s) Summary
Registry existence check with persistent data directory
claude-ops/scripts/setup.sh
Introduces REGISTRY_DATA_DIR using CLAUDE_PLUGIN_DATA_DIR with fallback to $HOME/.claude/plugins/data/ops-ops-marketplace/, and updates registry validation to check both cached and persistent data directories.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through plugin lands,
Finding registries where they stand—
In cache or data, no false alarm,
The path check keeps the setup warm! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: modifying setup.sh to accept registry from the plugin data directory in addition to the cache directory, directly addressing the core issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ops-registry-datadir

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@auroracapital
Copy link
Copy Markdown
Collaborator Author

✅ CI is green — awaiting review.

@auroracapital auroracapital merged commit ea0ad36 into main May 30, 2026
15 checks passed
@auroracapital auroracapital deleted the fix/ops-registry-datadir branch May 30, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant