Mutation preflight silently degrades on Windows: Stryker spawn hits the extension-less pnpm shim, is logged as an advisory, and exits 0

Aberta
#2,715 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 3 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
javascript, node.js
Domínio
devtools

Direção de pesquisa

Start in scripts/stryker-diff.mjs, where Stryker is launched with spawnSync against node_modules/.bin/stryker, and find the branch that records the 'Stryker preflight could not start' advisory and exits 0. Reproduce on Windows or reason from the ENOENT versus shell:true results in the body. Done when a failed Stryker launch exits non-zero and Windows resolves the .CMD shim or uses shell:true.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

On Windows, scripts/stryker-diff.mjs launches Stryker via spawnSync against the extension-less node_modules/.bin/stryker shim, which Windows cannot execute. Measured with the same spawnSync in two modes: without shell -> status=null error=ENOENT; with shell:true -> status=0 printing 10.0.0. The install is complete (@stryker-mutator/core 10.0.0 + vitest-runner present as root devDeps; u1-journal/node_modules/.bin contains stryker, stryker.CMD and stryker.ps1) - the failure is purely the spawn mode.

The script records a failed launch as a one-line advisory ('Stryker preflight could not start') and exits 0. A Windows author following AGENTS.md's local preflight therefore receives exit 0 with a log line saying the tool never started - which reads like a pass to anyone trusting exit codes. Linux CI never hits this path, so the gate is green in CI while being unable to run locally on Windows.

Observed live: PREFLIGHT_EXIT=0 with body 'Stryker preflight could not start'; our lane treats the preflight result as valid only when the JSON report file exists and its status fields are complete (report-existence check), which is how the silent degradation was caught.

Suggested fixes: spawn with shell:true on win32 (or resolve the .CMD), and exit non-zero when Stryker could not start instead of recording an advisory - a missing run is not an advisory finding. Workaround we use without touching repo files: node --import .
[Filed by the issue-1410 split lane; both spawnSync self-test outputs and log excerpts available on request.]

Linguagem predominante
TypeScript
Estrelas
2k
Forks
301
Merge médio
3d 14h
PRs com merge (30d)
103

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Zoo-Code-Org/Zoo-Code

Todas as issues de Zoo-Code-Org/Zoo-Code

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.