fix: self-heal stale marketplace cache on first-install#273
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesStale Marketplace Self-Heal
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 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 |
Coverage ReportScope: files changed in this PR. Enforced threshold: 90% per metric (per file via
File Coverage — 1 file changed
Generated for commit e730888. |
Problem
After the
harnesses/claude-codepath fix (#272, v0.7.99), users who had already attempted an install before the fix still cannot install by re-runninghivemind install. Their machine has the marketplace added but pinned to a stale cachedmarketplace.json(old sha/pathclaude-code), and the plugin is not installed.installClaude()first-install branch did NOT refresh the marketplace — the comment claimed "the marketplace fetch is implicit inplugin install", but it isn't:marketplace addis a no-op when already present, soplugin installresolves the stale catalog and re-fails withSubdirectory 'claude-code' not found.This is exactly the situation of any customer (e.g. Krisp) who hit the original SSO bug: telling them to re-run
hivemind installwould fail again.Fix
In the first-install branch, when the marketplace pre-existed, run
claude plugin marketplace update hivemindbeforeplugin install. A freshly-added marketplace already fetched the latest, so the refresh only fires when the marketplace was already on disk (stale-cache case). Cold installs are unchanged.Verification (real end-to-end, not just unit)
Reproduced a faithful stale-cache machine: marketplace cache rolled back to a pre-fix commit (
8a9670e, pathclaude-code, v0.7.98), plugin uninstalled.claude plugin install hivemind→Subdirectory 'claude-code' not found(re-fails).installClaude()(compiled) → ranmarketplace update(cache advanced to current main, path →harnesses/claude-code) →plugin install→ installed, no manual step.Unit tests: added a guard asserting
marketplace updateruns BEFOREplugin installwhen the marketplace pre-exists and the plugin is absent; existing cold-install tests (exact argv sequence, nomarketplace update) still pass. 33/33 green.Summary by CodeRabbit