gstack/lib
Garry Tan fb3103237a
fix(gbrain): spawn gbrain + brain-sync through a shell on Windows (#1731)
On Windows, bun/npm install gbrain as a gbrain.cmd/.ps1 shim and gstack-brain-sync
is a bash shebang script. spawnSync/spawn/execFileSync resolve neither without a
shell, so the child spawn failed ENOENT — on the sync orchestrator this surfaced
as 'brain-sync exited undefined' (#1731).

Add NEEDS_SHELL_ON_WINDOWS (process.platform === 'win32') in gbrain-exec and pass
it as shell: to every gbrain/brain-sync child spawn: spawnGbrain, spawnGbrainAsync,
execGbrainText (gbrain-exec), the two sources-list/remove/add spawns (gbrain-sources),
the version + probe spawns (gbrain-local-status), and the two brain-sync spawns in
the orchestrator. POSIX keeps the cheaper no-shell path.

macOS/Linux CI can't exercise the Windows path, so test/gbrain-spawn-windows-shell.ts
is a static-grep tripwire: it fails CI if a gbrain/brain-sync spawn is added without
the shell flag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 10:42:15 -07:00
..
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 fix(gbrain): spawn gbrain + brain-sync through a shell on Windows (#1731) 2026-05-30 10:42:15 -07:00
gbrain-local-status.ts fix(gbrain): spawn gbrain + brain-sync through a shell on Windows (#1731) 2026-05-30 10:42:15 -07:00
gbrain-sources.ts fix(gbrain): spawn gbrain + brain-sync through a shell on Windows (#1731) 2026-05-30 10:42:15 -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
worktree.ts feat: content security — 4-layer prompt injection defense for pair-agent (#815) 2026-04-06 14:41:06 -07:00