feat(doctor): plugin-cache check + orphan cleanup + post-update reload hint (v3.2.16)#58
Merged
Merged
Conversation
…d hint (v3.2.16) Fixes a dual-install split-brain where a stale marketplace cache (~/.claude/plugins/cache/<mkt>/onebrain/<version>) orphaned by a marketplace install that predated a vault-local update could shadow the vault-local plugin and make Claude Code load old skills while INSTRUCTIONS.md was current. - doctor: new `plugin-cache` check (Vault structure section) reports stale cached plugin versions; `--fix` prunes them, then re-detects to report an honest result -- Failed (non-zero exit), not a misleading Fixed, if a removal hits a permission error. - cache_clean: read-only `detect_stale_plugin_cache` sibling to `clean_plugin_cache`, sharing one enumeration pass (`version_dirs_under`); skips symlinks (symlink_metadata, no follow) and rejects path-traversal marketplace keys (`onebrain@../...`). - plugin update: post-update reload next-step (`reload-plugins ...`) whenever a real version change lands, so the running session picks up the new plugin; fires on partial-failure-with-version-change too (the version already landed on disk). - consolidate `installed_plugins.json` path resolution into one shared `default_installed_plugins_path`. 3-round parallel review (correctness/convention - silent-failure/safety - type/design, then verify, then holistic sign-off). cargo fmt + clippy clean; 1294 workspace tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes a dual-install split-brain: a stale marketplace plugin cache (
~/.claude/plugins/cache/<mkt>/onebrain/<version>) — orphaned by a marketplace install that predated a vault-local update — could shadow the vault-local plugin and make Claude Code load old skills whileINSTRUCTIONS.mdwas current. (Hit live: cache stuck at v2.2.4 while vault-local was v3.1.3.)Changes
plugin-cachecheck (Vault structure section) — reports stale cached plugin versions (cache vs the vault-local pin).--fixprunes them, then re-detects to report an honest result:Failed(non-zero exit), not a misleadingFixed, if a removal hits a permission error.cache_clean— read-onlydetect_stale_plugin_cachesibling toclean_plugin_cache, sharing one enumeration pass (version_dirs_under); skips symlinks (symlink_metadata, no follow) and rejects path-traversal marketplace keys (onebrain@../...).plugin update— post-update↻ /reload-pluginsnext-step whenever a real version change lands; fires on partial-failure-with-version-change too (the version already landed on disk).installed_plugins.jsonpath resolution into one shareddefault_installed_plugins_path.Verification
cargo fmt+cargo clippy --workspace --all-targetsclean (0 warnings)cargo test --workspace— 1294 passed / 0 failed (+8 new tests)onebrain --version→ 3.2.16Version: patch 3.2.15 → 3.2.16 (a doctor sub-check +
--fixrecipe + an output line — no new first-level command). CHANGELOG updated.🤖 Generated with Claude Code