Observed problem
bin/gstack-brain-context-load.ts checks whether vector/list queries can run with:
execFileSync("command", ["-v", "gbrain"], { stdio: "ignore" });
command is a shell builtin, not a standalone executable on normal POSIX installs. When no executable named command exists, this throws before gbrain is tried, so the helper treats gbrain as missing and skips all vector/list context queries.
Current behavior on upstream main
Fresh origin/main at 33cb4715ef0bc9be31a29bdf1d9655482a617ee6 still has this check in bin/gstack-brain-context-load.ts. Running:
bun run bin/gstack-brain-context-load.ts --repo garrytan-gstack --explain --quiet
prints three SKIP lines with gbrain CLI missing. The existing graceful-absence test accepts either OK or SKIP, so it does not prove that a gbrain binary on PATH is actually used.
Expected behavior
When gbrain is available on PATH, gstack-brain-context-load should run its vector/list queries instead of reporting gbrain CLI missing.
Duplicate searches performed
I searched open issues and PRs for:
gstack-brain-context-load
brain-context-load
context load gbrain
gbrain CLI missing
command -v gbrain
Related but non-duplicate results:
I found no open PR or issue for this specific context-load availability path.
Candidate fix shape
Probe the actual gbrain executable directly, for example with a cheap gbrain --version call, and add a regression test that places a fake gbrain on PATH and verifies gstack-brain-context-load reports OK/renders query output rather than SKIP (gbrain CLI missing).
Observed problem
bin/gstack-brain-context-load.tschecks whether vector/list queries can run with:commandis a shell builtin, not a standalone executable on normal POSIX installs. When no executable namedcommandexists, this throws beforegbrainis tried, so the helper treats gbrain as missing and skips all vector/list context queries.Current behavior on upstream main
Fresh
origin/mainat33cb4715ef0bc9be31a29bdf1d9655482a617ee6still has this check inbin/gstack-brain-context-load.ts. Running:prints three
SKIPlines withgbrain CLI missing. The existing graceful-absence test accepts eitherOKorSKIP, so it does not prove that agbrainbinary onPATHis actually used.Expected behavior
When
gbrainis available onPATH,gstack-brain-context-loadshould run its vector/list queries instead of reportinggbrain CLI missing.Duplicate searches performed
I searched open issues and PRs for:
gstack-brain-context-loadbrain-context-loadcontext load gbraingbrain CLI missingcommand -v gbrainRelated but non-duplicate results:
gstack-brain-context-load.gitleaksprobe in secret scanning, notgbraincontext loading.bin/gstack-brain-context-load.ts.I found no open PR or issue for this specific context-load availability path.
Candidate fix shape
Probe the actual
gbrainexecutable directly, for example with a cheapgbrain --versioncall, and add a regression test that places a fakegbrainonPATHand verifiesgstack-brain-context-loadreportsOK/renders query output rather thanSKIP (gbrain CLI missing).