gstack/lib
Jayesh Betala 4057ddbf3d 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-22 23:12:05 +05:30
..
diagram-render v1.58.0.0 feat: diagram + multi-format document engine (mermaid, excalidraw, single-file HTML, DOCX) (#1990) 2026-06-12 15:38:53 -07:00
bin-context.ts v1.57.5.0 feat: cross-session decision memory + gbrain dream-stage call graph (#1910) 2026-06-08 06:20:58 -07:00
conductor-env-shim.ts v1.58.1.0 feat: hermetic local E2E + Conductor prose AskUserQuestion (#2004) 2026-06-14 11:40:57 -07:00
gbrain-exec.ts v1.58.4.0 fix: high-priority community bug wave + PTY plan-mode smoke gate (#2077) 2026-06-21 07:15:19 -07:00
gbrain-guards.ts v1.57.5.0 feat: cross-session decision memory + gbrain dream-stage call graph (#1910) 2026-06-08 06:20:58 -07:00
gbrain-local-status.ts fix(gbrain): treat healthy thin-client as ok in local-status classifier 2026-06-22 23:12:05 +05:30
gbrain-sources.ts v1.57.5.0 feat: cross-session decision memory + gbrain dream-stage call graph (#1910) 2026-06-08 06:20:58 -07:00
gstack-decision-semantic.ts v1.57.5.0 feat: cross-session decision memory + gbrain dream-stage call graph (#1910) 2026-06-08 06:20:58 -07:00
gstack-decision.ts v1.57.5.0 feat: cross-session decision memory + gbrain dream-stage call graph (#1910) 2026-06-08 06:20:58 -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
is-conductor.ts v1.58.1.0 feat: hermetic local E2E + Conductor prose AskUserQuestion (#2004) 2026-06-14 11:40:57 -07:00
jsonl-store.ts v1.57.5.0 feat: cross-session decision memory + gbrain dream-stage call graph (#1910) 2026-06-08 06:20:58 -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.58.4.0 fix: high-priority community bug wave + PTY plan-mode smoke gate (#2077) 2026-06-21 07:15:19 -07:00
redact-patterns.ts v1.58.4.0 fix: high-priority community bug wave + PTY plan-mode smoke gate (#2077) 2026-06-21 07:15:19 -07:00
staging-guard.ts v1.56.1.0 fix(sync): staging-dir ownership guard + resume-correctness fixes (#1802) (#1856) 2026-06-07 06:51:10 -07:00
worktree.ts feat: content security — 4-layer prompt injection defense for pair-agent (#815) 2026-04-06 14:41:06 -07:00