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

Abierto Apto para principiantes
#3,541 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@garrytan ya está trabajando en esto.

Desde el 31/10/2026.

  • #3714 de @garrytan — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bash, bun, node.js, typescript
Área
backend, cli

Línea de trabajo

Lee bin/gstack-review-scope alrededor de la línea 238 y bin/gstack-ship-receipt alrededor de la línea 145; después, examina bashScriptInvocation() en lib/gbrain-exec.ts y su gestión de Windows en lib/script-invocation.ts. Confirma cómo se ejecutan ambos helpers en Windows y cómo se notifican los errores de ejecución. El trabajo estará terminado cuando funcione el resumen de revisión y los receipts conserven el tipo de sesión en Windows; el issue también sugiere incluir read.error en el mensaje de rechazo.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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).

Lenguaje dominante
TypeScript
Estrellas
138k
Forks
20.5k
Merge medio
8 h 37 min
PR fusionados (30 d)
320

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de garrytan/gstack

Todos los issues de garrytan/gstack

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.