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 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
javascript, node.js
領域
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 摘要。