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

未关闭
#2,715 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
领域
devtools

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
TypeScript
星标
2k
派生
301
平均合并
3 天 14 小时
30 天内合并 PR
103

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Zoo-Code-Org/Zoo-Code 的其他 Issue

查看 Zoo-Code-Org/Zoo-Code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。