gstack/lib
Jayesh Betala 77fbdea01e fix(gbrain): treat healthy thin-client as ok in local-status classifier
`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>
2026-06-02 01:37:18 +05:30
..
conductor-env-shim.ts v1.39.2.0 feat: GSTACK_* env-shim for Conductor + gbrain/gstack setup docs (#1534) 2026-05-16 12:32:33 -07:00
gbrain-exec.ts v1.55.0.0 fix wave: gbrain data-loss guards + browser crash-loop + 6 more (#1808) 2026-05-30 14:57:07 -07:00
gbrain-guards.ts v1.55.0.0 fix wave: gbrain data-loss guards + browser crash-loop + 6 more (#1808) 2026-05-30 14:57:07 -07:00
gbrain-local-status.ts fix(gbrain): treat healthy thin-client as ok in local-status classifier 2026-06-02 01:37:18 +05:30
gbrain-sources.ts v1.55.0.0 fix wave: gbrain data-loss guards + browser crash-loop + 6 more (#1808) 2026-05-30 14:57:07 -07:00
gstack-memory-helpers.ts v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
redact-audit-log.ts v1.53.0.0 feat: smarter redaction — PII/secrets/legal guard across /spec, /ship, /cso, /document-* (#1797) 2026-05-30 08:54:46 -07:00
redact-engine.ts v1.53.0.0 feat: smarter redaction — PII/secrets/legal guard across /spec, /ship, /cso, /document-* (#1797) 2026-05-30 08:54:46 -07:00
redact-patterns.ts v1.53.0.0 feat: smarter redaction — PII/secrets/legal guard across /spec, /ship, /cso, /document-* (#1797) 2026-05-30 08:54:46 -07:00
worktree.ts feat: content security — 4-layer prompt injection defense for pair-agent (#815) 2026-04-06 14:41:06 -07:00