fix(ruvnet-brain): drift in the release-tag namespace so it converges - #24
Merged
Merged
Conversation
The ruvnet-brain status row reported a version that could never converge: it compared the plugin semver (plugin.json, e.g. 0.5.0-dev) against the GitHub *release* tag (e.g. 3.0.1). Those are unrelated version tracks — ruvnet-brain has THREE (plugin semver, KB bundle brainVersion, and the release tags the installer downloads by), and none is stamped on disk in the release namespace. So the row nagged "3.0.1 available" forever and no reinstall could clear it (the plugin's own version stays 0.5.0-dev). Fix: compute drift against ak's OWN record of the release it last pulled (kit.json versionCheck.ruvnetBrain.installedRelease, written by recordInstalledRelease() after a successful install) vs GitHub releases/latest — same namespace, so it converges. A present-but-unstamped install (manual / pre-existing) surfaces as outdated once so `ak sync` pulls it onto the managed track, then converges. - ruvnet-brain.mjs: classifyDrift() (pure), recordInstalledRelease(), drift() reworked to the release-tag namespace + cache preserves the stamp. - heal.installRuvnetBrain(): stamp the pulled release; drop the misleading plugin-semver diff from its detail. - status/setup: release-tag phrasing; setup no longer prints the plugin semver. - tests: classifyDrift cases (converged / older / unversioned / offline). - MAINTAINER: document the three-namespace gotcha.
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.
Problem
ak statusreported a ruvnet-brain version that could never converge:It compared the plugin semver (
plugin.json→0.5.0-dev) against the GitHub release tag (3.0.1). Grounding in the installed installer source (~/.claude/plugins/marketplaces/ruvnet-brain/bin/install.mjs) showed ruvnet-brain actually has three unrelated version tracks:plugin.json/package.json0.5.0-devmanifest.jsonbrainVersionv0.3.0-devreleases/latestv3.0.1None is stamped on disk in the release namespace, so the old check nagged forever and re-running the installer couldn't clear it (the plugin's own version stays
0.5.0-dev).ak setupcorrectly did nothing because it only installs when absent — the download at the end of the user'sak setup --forcewas unrelated tooling output, not ak refreshing the brain.Fix
Compute drift in the release-tag namespace, using a stamp ak controls:
recordInstalledRelease()writes the release tag ak just pulled intokit.json(versionCheck.ruvnetBrain.installedRelease) after a successfulheal.installRuvnetBrain().classifyDrift()(pure) compares that stamp vsreleases/latest— same namespace → converges after a refresh.ak syncpulls it onto the managed track, then converges.latestunknown (offline / rate-limited) is never falsely "outdated".New row behavior:
⚠ ruvnet-brain present (unversioned install), release v3.0.1 available → sync refreshes the KB⚠ ruvnet-brain release v3.0.0, release v3.0.1 available → sync refreshes the KB✓ ruvnet-brain release v3.0.1 (latest)⚠ RuvNet Brain not installed → setup installs itVerification
npm run checkpasses clean (exit 0): typecheck, eslint, markdownlint, build, 74 kit + 20 statusline tests. NewclassifyDriftunit tests cover converged / older / unversioned / offline. Verified live: the row now readspresent (unversioned install), release v3.0.1 available → sync refreshes the KBon the reporter's machine state. (The convergence-after-refresh path is proven by unit tests rather than triggering the real ~512 MB KB download.)MAINTAINER.md documents the three-namespace gotcha to prevent regression.
🤖 Generated with Claude Code