Repository navigation
v2.7.3 — the bundled MCP server actually connects
Two shipped bugs, both of the same shape: something reported healthy while the real thing was broken.
The bundled MCP server never connected (v2.5 → v2.7.2)
.mcp.json registered the launcher as "${CLAUDE_PLUGIN_ROOT}"/scripts/mcp-launcher.sh. Claude Code expands the variable and then spawns the result directly — posix_spawn, no shell — so the literal quotes became part of the filename. Every connection attempt died in a few milliseconds with ENOENT, /plugin showed a ✗ beside headroom, and the mcp__headroom__* tools were simply absent.
It went unnoticed for two minor versions because anyone carrying a pre-plugin manual registration in ~/.claude.json still got the tools from there — and because doctor check 4b stripped the quotes before its own -x test, greening the exact string that was failing at spawn. It judged the mechanism, not the outcome.
.mcp.jsondrops the quotes.hooks/hooks.jsondeliberately keeps its quoting — hook commands do run through a shell. The asymmetry is now pinned by tests in both directions.- Check 4b judges the launcher exactly as spawned; a quoted-but-otherwise-correct command is
fixable, and--fixunquotes an installed.mcp.jsonin place (timestamped.bak, idempotent), so existing broken installs self-heal instead of waiting for a fresh one.
Upgrading: run /headroom-usage-indicator:doctor --fix once.
The status line could be "wired" and still never render
A ~ inside quotes is never expanded by any shell — and earlier READMEs showed exactly that form for hand-wiring (bash "~/.claude/headroom-statusline.sh"). Such an entry can never resolve, so the badge silently never appeared. The doctor now detects it in either quote style, reports it, and --fix rewrites the entry to an absolute path. An unquoted bash ~/.claude/… was always fine and is left alone.
The doctor stops lying to itself
The original issue (#2) was check 7c only looking under ~/.claude/lib/ for the badge's runtime deps, so a healthy legacy flat install was reported broken — and the spurious fixable blocked the ambient-health all-clear from ever restoring the badge. 7c now resolves each dep exactly as statusline.sh does at runtime (existence-first, lib/ then flat sibling) and currency-checks only the file that would actually load.
Fixing that surfaced a family of related silent passes, each closed in turn:
statusLine wiredwas a bare substring match — it never confirmed the script was on disk, and 7b/7c thenskipped on the same absent file while block 9 cleared the recorded failure.- Respelled paths (quoted tilde, foreign-home) bypassed the new guard.
- Custom, hand-wired install paths were trusted by check 7 but never inspected by 7b/7c, so their staleness went undetected forever.
- An unanchored path-token match could verify the wrong file, or false-
FAILa perfectly healthy install. - In a multi-token command, one present path masked another that was missing.
Data safety: every backup-then-destructive-rewrite site — .mcp.json, settings.json, settings.local.json, project settings — now refuses to overwrite when its own backup fails, instead of swallowing the failure and claiming a backup that was never written. Load-bearing dependency copies likewise gate the fixed they report.
Tests: 435 → 519 pass / 0 fail, shellcheck clean.
Full diff: v2.7.2...v2.7.3