Skip to content

fix(update): repair Claude plugin configs pinning a deleted brew node - #288

Merged
github-actions[bot] merged 7 commits into
masterfrom
fix/stale-plugin-node-path
Sep 19, 2026
Merged

github-actions[bot] merged 7 commits into
masterfrom
fix/stale-plugin-node-path

Conversation

@brujack

@brujack brujack commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Changes

  • lib/helpers.sh: _claude_plugin_cache_dir, _plugin_stale_node_paths, repair_plugin_node_paths, _doctor_check_plugin_node_paths
  • lib/workflows.sh, lib/update_summary.sh: plugin-node section and its _UPDATE_SECTION_ORDER entry
  • tests/setup_env/plugin_node_paths.bats (20 tests), update_plugin_node.bats (7), unit.bats stubs
  • CLAUDE.md seam and doctor docs. docs/superpowers/README.md: 4 backlog rows for pr-review advisories not fixed here.

Test Plan

  • make test: rc 0, 1972/1972 bats, 20 python OK, at 3074e6b; pre-push ran it again
  • make lint: rc 0
  • New files on the workstation (bash 5.2.21, bats 1.10.0, same versions as ubuntu-latest): 26/26 before the final test was added
  • 14 mutations, each turning its targeted test red
  • Replayed against real stale configs from claude and workstation: 4 reported, 4 repaired, 0 left, all valid JSON
  • Coverage: bash floor 91% / CI measured 91% (4169 of 4542 coverable lines), bash-coverage job on this PR

Risk

The repair rewrites JSON files in ~/.claude/plugins/cache, and only when a config names a versioned Homebrew node that no longer exists. The file set comes from find -type f, so symlinked files are not followed. A no-op run changes nothing.

Related

mksglu/context-mode#1090, mksglu/context-mode#1183

🤖 Generated with Claude Code

https://claude.ai/code/session_014XqABrMmnsqj4xkck4VesT

brujack and others added 7 commits September 19, 2026 11:50
Detect every plugin hooks.json/plugin.json naming a versioned
Homebrew Cellar node that no longer exists, and repoint it at the
keg's opt/ link, which brew keeps on the current version. Unfixable
pins (no opt link, unwritable file) return 1 and leave the file as is.

context-mode writes process.execPath into these files on Linux, so a
`brew upgrade node` breaks every hook with "/bin/sh: 1: <path>: not
found", and the plugin cannot heal itself because its MCP server
starts from the same dead path.

Refs mksglu/context-mode#1090

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XqABrMmnsqj4xkck4VesT
A node upgrade outside `-t update` leaves the repair unrun, so doctor
names each stale pin and points at `setup_env.sh -t update --brew-only`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XqABrMmnsqj4xkck4VesT
`brew upgrade node` is what deletes the pinned Cellar node, so the
repair runs in the same command: full update, --brew-only, and
--claude-only (a plugin update extracts a fresh cache). A pin it
cannot repair WARNs rather than failing the run.

Refs mksglu/context-mode#1090

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XqABrMmnsqj4xkck4VesT
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XqABrMmnsqj4xkck4VesT
Every test set the override, so a typo in the production default
would leave the feature inert while the suite stayed green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XqABrMmnsqj4xkck4VesT
The flag tests could not see the _run_all arm, so deleting it left
the suite green on the most common invocation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XqABrMmnsqj4xkck4VesT
Name doctor as the backstop for node upgrades outside -t update, and
record the pr-review advisories not fixed on this branch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XqABrMmnsqj4xkck4VesT
@github-actions
github-actions Bot merged commit dd26fad into master Sep 19, 2026
8 of 9 checks passed
@brujack
brujack deleted the fix/stale-plugin-node-path branch September 19, 2026 16:57
github-actions Bot pushed a commit that referenced this pull request Sep 19, 2026
The comment enumerating record-then-overwrite sections, and the
CLAUDE.md sentence counting them, both went stale the moment #288
added plugin-node without them. Point at the call sites instead of
restating them. Also list the plugin node-path check in README's
doctor row, and backlog the setup/developer path that never runs
the repair. All three raised by code review on #288.


Claude-Session: https://claude.ai/code/session_014XqABrMmnsqj4xkck4VesT

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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