Repository navigation
fix(cli): report a spawn failure of the CLI child instead of exiting silently - #13077
Conversation
cc5696a to
25bbcd7
Compare
|
Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. 中文请勿对活跃的 PR 执行 rebase 或 force-push,因为这会使已有的评审评论失效。另外,供日后参考:作为集成流程的一部分,机器人始终会自动将所有改动压缩(squash)为单个提交。 |
|
Maintainer local verification: 中文摘要结论: A/B 结论(见 "Central claim + A/B" 与 变异矩阵( 修正:PR 的 Reviewer Test Plan 写"base 上 17 个测试挂 2 个"——该数字停留在提交 1(15+2=17);提交 2/3 又加了 3 个测试,当前 head 的正确数字是 base 挂 5/20、head 全绿 20/20。 门禁:eslint/prettier 对两个改动文件干净(eslint 活性已用植入语法错误验证:exit 1)。全量 scripts 套件 head/base 两侧各 15 个失败、失败文件名与测试名逐字节一致——均为本环境固有( 未覆盖:真实 Windows 主 spawn 路径(本机为 macOS,仅以平台 mock 单测覆盖,POSIX 重启路径已真实实测);Bun 路径;packages/* 套件(本 diff 只动 Central claim + A/BCentral claim. When Real end-to-end A/B (POSIX-reachable relaunch path, real processes)The POSIX branch reaches
Scripted assertions on this harness: 8/8 pass — including Unit A/B cells (real vitest, head test file vs each production code)Runner
The merge cell: Reviewer Test Plan, walked step by step
Every step performable; the plan's claim held with updated arithmetic. Corrections
FindingsNo blocking findings. The bug class is fully closed within this file: Mutation matrix — 5/5 killed, each by exactly the predicted testsRunner
Every mutation applied cleanly, every run collected all 20 tests, every restore left the tree byte-identical (20/20 matrix assertions pass). No survivors, so no vacuity findings; the suite pins each guard on its own axis. Gates
Gate liveness: a planted syntax error in Full-suite failure attribution: the 15 failures on head sit in 6 files this PR never touches — Not covered
MethodologyEnvironment: macOS (arm64), Node v22.23.1. Three worktrees under Harnesses, all mock-free w.r.t. the unit under test: Assertion accounting, so the counts can be audited: real A/B 8; unit cells + restore + merge cell + eslint + prettier 7; mutation matrix 20 (4 per row × 5 rows); eslint liveness probe 1. Total 36; every assertion is a scripted comparison that executed. Raw logs under Evidence capturesReal spawnSync EACCES A/B — base exits 1 with empty stderr (the #13076 signature); head exits 126 naming the command, Unit A/B — base+base 15/15; base+head exactly the 5 new tests red; head+head 20/20. Mutation matrix — 5/5 mutants killed by exactly the predicted tests, tree restored clean per row. Local verification by @wenshao — harness sources, raw logs and machine-readable results preserved under |
…silently When spawnSync cannot start the child it returns status null, signal null and an error, which fell through to a bare process.exit(1) with nothing printed. Write the error code, errno, syscall and command to stderr and exit 126 in the launcher and in the post-update relaunch. Refs QwenLM#13076
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…unch failure Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
25bbcd7 to
5b5ffda
Compare
|
Maintainer local verification (round 2): 中文摘要结论: A/B 结论(见 "Central claim + A/B" 与 变异矩阵( 门禁:eslint/prettier 对两个改动文件干净(eslint 活性已用植入语法错误验证:exit 1)。全量 scripts 套件两臂各 15 个失败,失败文件名与测试名逐字节一致( 第 1 轮遗留项状态:Reviewer Test Plan 的 "2 of 17 fail" 仍为过期数字(当前 head 为 5/20)——PR 正文未更新,该项 stands(PR 文字问题,非代码问题)。 未覆盖:真实 Windows 主 spawn 路径(本机为 macOS,仅以平台 mock 单测覆盖;POSIX 重启路径已真实实测);Bun 路径;packages/* 套件(本 diff 只动 Round-1 findings status (follow-up round)Round 1 (head
The rebase itself: Central claim + A/BCentral claim. When Real end-to-end A/B (POSIX-reachable relaunch path, real processes)The POSIX branch reaches
Scripted assertions on this harness: 9/9 pass — including Unit A/B cells (real vitest, head test file vs each production code)Runner
The merge cell: Reviewer Test Plan, walked step by step
Every step performable; the plan's claim held with updated arithmetic. Corrections
FindingsNo blocking findings, unchanged from round 1. The bug class is fully closed within this file: Mutation matrix — 5/5 killed, each by exactly the predicted testsRunner
Every mutation applied cleanly (needle unique in the file), every run collected all 20 tests, every restore left the tree byte-identical (20/20 matrix assertions pass). No survivors, so no vacuity findings; the suite pins each guard on its own axis. Gates
Gate liveness: a planted syntax error in Full-suite failure attribution: the 15 failures on head sit in 6 files this PR never touches — CI status note: at this writing the PR's checks show 13 lanes passing — including Lint & Static (18m55s) and Integration Tests (no-AK) (8m27s) — with Not covered
MethodologyEnvironment: macOS (arm64), Node v22.23.1, pnpm 11.24.0. Three worktrees under Harnesses, all mock-free w.r.t. the unit under test: Assertion accounting, so the counts can be audited: real A/B 9; unit cells + restore + merge cell + eslint + prettier 8; mutation matrix 20 (4 per row × 5 rows); eslint liveness probe 1; full-suite failing-set comparison 2 (byte-identical set + exact +5/+0 delta); trial-merge cleanliness 1. Total 41; every assertion is a scripted comparison that executed. Raw logs under Evidence captures01 — Real A/B: base exits 1 completely silent; head exits 126 with the full diagnosis (01-real-ab-base-silent-vs-head-126.png) 02 — Unit A/B cells: base+head tests goes red on exactly the 5 new tests; head and trial-merge trees 20/20 (02-unit-ab-5-red-to-20-green.png) 03 — Mutation matrix: 5/5 mutants killed, each by exactly the predicted tests (03-mutation-matrix-5-of-5-killed.png) 04 — Full scripts suite: byte-identical 15 environmental failures on both arms; delta +5 passing / +0 failing (04-full-scripts-suite-failing-set-identical.png) Local maintainer verification by @wenshao — harnesses, raw logs and assertions live under |
|
Released in v0.25.2. |







What this PR does
Refs #13076. Covers the item about the launcher never surfacing the spawn error.
When the child process fails to start, spawnSync returns an error with no status or signal, and the launcher turned that into a silent exit 1. It now prints the failed command and the error code, errno and syscall to stderr and exits 126, at both spawnSync sites.
Why it's needed
A start failure currently looks like qwen exiting with no output.
Reviewer Test Plan
How to verify
Run the cli-entry tests: on the base commit 2 of 17 fail, with this change all 17 pass.
Evidence (Before & After)
N/A
Tested on
Environment (optional)
N/A, unit tests only.
Risk & Scope
Linked Issues
Refs #13076