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

Ouverte
#2,715 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 3 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
55/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
javascript, node.js
Domaine
devtools

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
TypeScript
Étoiles
2k
Forks
301
Merge moyen
3 j 14 h
PR mergées (30 j)
103

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Zoo-Code-Org/Zoo-Code

Toutes les issues de Zoo-Code-Org/Zoo-Code

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.