mirror of https://github.com/garrytan/gstack.git
`freshClassify()` in lib/gbrain-local-status.ts probes the engine with `gbrain sources list --json`, a local-DB-only command. In thin-client mode (remote MCP, no local DB) gbrain refuses it with a "not routable" error that matches neither the broken-db nor broken-config stderr pattern, so the defensive default mislabels a perfectly healthy thin-client as `broken-config`. `gen-skill-docs --respect-detection` then suppresses every brain block, so brain-aware planning silently never engages on thin-client brains (advertised as supported since v1.52). Fix: on the "not routable" failure path only, confirm health via the mode-aware `gbrain doctor --json --fast` (already used elsewhere for detection) and return `ok` when doctor reports `mode: thin-client` with `ok`/`warnings` status. The cheap ~80ms sources-list probe still owns the healthy local-DB hot path — doctor is only consulted when the probe is refused. Parse failures or an unhealthy doctor status fall through to the existing defensive classification, so an unconfirmed brain is never upgraded. Tests: two cases in test/gbrain-local-status.test.ts — a healthy thin-client (not-routable probe + doctor ok) now classifies `ok`, and a not-routable brain whose doctor reports an unhealthy status stays `broken-config`. Fixes #1792 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| conductor-env-shim.ts | ||
| gbrain-exec.ts | ||
| gbrain-guards.ts | ||
| gbrain-local-status.ts | ||
| gbrain-sources.ts | ||
| gstack-memory-helpers.ts | ||
| redact-audit-log.ts | ||
| redact-engine.ts | ||
| redact-patterns.ts | ||
| worktree.ts | ||