Files
gbrain/test
0410dc4b42 v0.31.11 feat: thin-client auto-upgrade prompt (notice + act on remote bumps) (#816)
* feat: thin-client upgrade prompt core (orchestrator + helpers)

Adds the maybePromptForUpgrade orchestrator with lockfile gating,
atomic state-file IO, per-entry shape validation, decision matrix,
D5 binary-advance verifier, prompt-scoped SIGINT handler, and DI
seams for tests. Sibling helper promptLineStderr in cli-util.ts
resolves to null on stdin EOF or after a 5min timeout instead of
hanging. 50 unit tests, all green.

Not wired into the CLI yet — that's the next commit.

* feat: wire thin-client upgrade prompt into the identity banner

printIdentityBannerBestEffort calls maybePromptForUpgrade after the
banner prints (both cache hit and cache miss paths). bannerSuppressed
+ BrainIdentity are now exported for the orchestrator's consumption.
bannerSuppressed early return guarantees bannerIsSuppressed=false at
the call site.

* feat: gbrain remote doctor — thin_client_upgrade_drift check

Surfaces remote-version drift in non-TTY/quiet/CI contexts where
the interactive prompt is suppressed. Returns ok+inconclusive on
network error (informational; mcp_smoke covers the genuinely-down
case with fail). Returns ok on local>=remote or patch drift; warn
on minor/major drift with a fix hint pointing at gbrain upgrade,
or the manual install URL if state shows a prior failed attempt.

Test fixture now dispatches JSON-RPC tools/call by tool name so
runUpgradeDriftCheck can exercise the full happy + prior_failed
+ stale-version paths against a real-shape MCP response.

* chore: bump version and changelog (v0.31.11)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 18:59:11 -07:00
..