Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Windows: gstack-review-scope summary always refuses because it spawns the bash gstack-review-read directly

Aperta Adatta ai principianti
#3,541 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bash, bun, node.js, typescript
Ambito
backend, cli

Direzione di ricerca

Leggi bin/gstack-review-scope intorno alla riga 238 e bin/gstack-ship-receipt intorno alla riga 145, poi esamina bashScriptInvocation() in lib/gbrain-exec.ts e la relativa gestione di Windows in lib/script-invocation.ts. Verifica come vengono avviati entrambi gli helper su Windows e come vengono segnalati gli errori di avvio. Il lavoro è completato quando il riepilogo della review funziona e i receipts mantengono il tipo di sessione su Windows; l’issue suggerisce inoltre di includere read.error nel messaggio di rifiuto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happens

On Windows, gstack-review-scope summary always refuses, so /ship can't produce the --review-loop file that gstack-ship-receipt write needs:

$ gstack-review-scope summary --since 2026-10-28T11:54:27Z --out .gstack/tmp/review-loop.json
gstack-review-scope summary: gstack-review-scope was given input it cannot classify: … — gstack-review-read failed: ; fix: pass the Step 9.3 findings as a JSON array … (REVIEW_SCOPE_INPUT)

The review log is fine (gstack-review-read works when run from Git Bash). The cause is bin/gstack-review-scope:238, which starts the bash script directly:

const read = spawnSync(path.join(path.dirname(Bun.fileURLToPath(import.meta.url)), 'gstack-review-read'), [], { … });
if (read.status !== 0) return refuse('summary', 'REVIEW_SCOPE_INPUT', `gstack-review-read failed: ${(read.stderr ?? '').trim().split('\n')[0] ?? ''}`);

Windows can't execute an extensionless shebang script, so the spawn itself fails and read.error holds the reason. read.stderr is empty, which is why the message ends in failed: with nothing after it, and why it's reported as an input problem.

Reproduction (not specific to one machine)

The same call outside gstack, on a two-line bash script, fails in both runtimes:

Bun 1.4.4:   Error: Executable not found in $PATH: "…\spawn-test\hello"
Node 22.22:  Error: spawnSync …/spawn-test/hello ENOENT

and on the real helper:

spawnSync('…/gstack/bin/gstack-review-read')  →  status null, Error: ENOENT: no such file or directory, uv_spawn '…/gstack-review-read'

Same pattern elsewhere

bin/gstack-ship-receipt:145 starts gstack-session-kind (also a bash script) the same way. It doesn't refuse; it silently leaves the session kind unset when --session-kind and GSTACK_SESSION_KIND are absent, so receipts written on Windows carry no session kind.

Suggested direction

lib/gbrain-exec.ts already has bashScriptInvocation() (backed by resolveWindowsBash() in lib/script-invocation.ts), which runs a bash script through Git Bash on Windows. Using it for both spawns would fix this. Separately, including read.error in the refusal message would have made the cause obvious.

Workaround used

Run gstack-review-read in Git Bash to a file, then feed it to summarizeReviewLoop() / reviewLoopLine() from lib/review-scope.ts in a small Bun script that writes the same JSON to .gstack/tmp/review-loop.json.

Environment

Windows 11 (10.0.26300), Git Bash, Bun 1.4.4, Node 22.22.3, gstack 1.91.293.0 (9e3308f).

Lingua principale
TypeScript
Stelle
138k
Fork
20.5k
Merge medio
8h 32m
PR unite (30g)
292

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di garrytan/gstack

Tutte le issue di garrytan/gstack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.