feat(doctor): --online, for the release a host has never fetched
Everything doctor checks compares copies already on the machine, deliberately — it runs in a SessionStart hook where latency shows, and its header promises no network I/O. That leaves exactly one case invisible, and #30 walked straight into it: a host whose checkout, marketplace clone and installed plugin all agree reads as clean while all three sit a release behind origin. `--online` closes it with one `git ls-remote`, opt-in, for a scheduled per-host job rather than the session hook. Comparison is by order, not equality, so a host ahead of the newest tag — normal between a release commit and its tag — stays quiet. An unreachable remote is a WARN naming itself, not a staleness FAIL. "I could not check" and "you are behind" are different answers, and collapsing them would make a network blip look like a stale library. The remote URL is never printed: a remote rewritten by url.insteadOf expands into a live token, which is a documented way this fleet has leaked one before. Five fixture cases through a $DOCTOR_LATEST_TAG_CMD seam, including one that asserts the DEFAULT run performs no lookup at all — the promise in the header is now a test, not a comment. Verified live on koala: $ bin/doctor --online FAIL behind: this host has 0.12.1; origin has released 0.13.4 $ bin/doctor skills doctor: clean — 41 skills Closes #38 Bump-Type: minor
This commit is contained in:
@@ -110,10 +110,25 @@ Antigravity and Mistral Vibe targets were removed — unused.
|
||||
task doctor # or bin/doctor
|
||||
```
|
||||
|
||||
Reports dangling links, links resolving into a foreign checkout, skill-count
|
||||
mismatches, stray entries, and leftover per-skill Claude symlinks. Non-zero
|
||||
exit on drift. It also runs at session start via the plugin, so a drifting
|
||||
host says so rather than waiting to be discovered.
|
||||
Reports dangling links, links into a source nobody configured, skills in the
|
||||
checkout with no link, stray entries, leftover per-skill Claude symlinks, and a
|
||||
Claude Code plugin sitting on an older generation than the host already has.
|
||||
Non-zero exit on drift. It also runs at session start via the plugin, so a
|
||||
drifting host says so rather than waiting to be discovered.
|
||||
|
||||
All of that compares copies already on the machine — deliberately, since it
|
||||
runs in a session hook where latency shows. That leaves one case invisible: a
|
||||
host where the checkout, the marketplace clone and the installed plugin all
|
||||
agree, and all three are a release behind origin.
|
||||
|
||||
```bash
|
||||
task doctor -- --online # or bin/doctor --online
|
||||
```
|
||||
|
||||
One `git ls-remote` against origin, opt-in. Belongs in a scheduled per-host job,
|
||||
not the session hook. An unreachable remote is reported as its own fault rather
|
||||
than as staleness — "I could not check" and "you are behind" are different
|
||||
answers and only one of them is about the host.
|
||||
|
||||
## Versioning
|
||||
|
||||
|
||||
Reference in New Issue
Block a user