Repository navigation
Conversation
识别 Node 用 NUL 替代的缺失标准输入,重新连接控制台。保留管道、文件和非交互运行方式,并说明显式 NUL 重定向的边界。新增 10 个回归测试,变更范围检查全部通过;Windows 真机交互尚未复测。
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped Windows CLI bug fix that restores the existing console-recovery path when Node represents missing stdin as NUL, while preserving pipes, files, and noninteractive execution. Regression tests cover the changed detection and cleanup behavior; no product defaults or static-analysis suppressions are changed. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Fixes #23815.
The desktop CLI launcher on Windows leaves stdin unset, but Node replaces the missing descriptor with an open
NULcharacter device. The existing check only handles a closed descriptor, so it never reattaches the console and interactive CLI prompts remain unavailable.Treat a non-console character device as missing input, while preserving pipes, files, an already-connected console, unmarked processes, non-Windows hosts, and redirected output. The existing CONIN$ open/TTY validation and interactive child descriptor handling are unchanged. This is a focused correction to the existing console recovery, not a new prompt workflow.
Explicit
< NULis indistinguishable from Node's placeholder and will also reattach only under the desktop launcher marker with console output. This tradeoff is documented beside the check.Evidence
attachConsoleStdinregression tests with mocked OS descriptor boundaries: an open character device,isatty(0) === false, and console stdout. Before the fix, the expected console descriptor wasundefined; after the fix it is returned,process.stdinexposes the console stream, and interactive children receive the recovered descriptor.vp test run apps/server/src/cli/consoleStdin.test.ts: red phase 2 failed / 8 passed. The failures were the NUL recovery and cleanup paths that previously never executed.vp run check:changed: targeted format, lint, dependency checks, affected-package typechecks, and 10 tests pass.Validation ran on macOS arm64 with Node 26.12.1. The Windows descriptor shapes are fixtures from the report, not a Windows runtime execution; I could not rerun the shipped Electron executable or actual interactive doctor picker on Windows here. No databases or repair commands were run.
Model: GPT-5-based Codex. Harness: Codex desktop.