Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
| child = spawnChildProcess(launch.command, launch.args, { | ||
| ...(options.cwd === undefined ? {} : { cwd: options.cwd }), | ||
| ...(options.env === undefined ? {} : { env: options.env }), | ||
| // why: on Windows only a detached child leaves Node's kill-on-exit job (see `outlivesCaller`). | ||
| detached: process.platform !== "win32" || options.outlivesCaller === true, | ||
| stdio: childStdio(options.stdio, logFd, stdinPair), | ||
| // why: the daemon has no console, so on Windows a console program it starts (adb, the | ||
| // emulator, node) would otherwise get a new, visible one. | ||
| windowsHide: true, | ||
| windowsVerbatimArguments: launch.windowsVerbatimArguments, | ||
| }); |
Decision takenQuestion: the fix run on the Windows PC did not find the cause of review finding R3, the
Why: on the Windows PC at cfa46be, the test did not fail once in about 340 runs. With the pair on it passed 150 of 150, and with it off 150 of 150. The test passes no stdio file, so it never uses the pair. Nothing points at this change. Still open: the emulator half of the Windows PC check. The PC's hypervisor is off ( Reverting: park the PR and run the fix again when the timeout shows up in CI. Written by an agent. |
… is reading; the ports manual says only what the code cannot (#1920)
Review ledgerRound 1: c23782e {"findings":[{"id":"R1","role":"code","class":"stdin write end held by daemon alone","outcome":"fixed","path":"src/ports/node-process-runner.ts:626","round":"1","fix":"8c0733522"},{"id":"R2","role":"claims","class":"test title overstates what is checked","outcome":"fixed","path":"src/ports/windows-command.test.ts:342","round":"1","fix":"83bc799ee"},{"id":"R3","role":"code","class":"liveness of later headless child unproven","outcome":"incorrect","path":"src/ports/node-process-runner.ts:626","round":"fix-check"},{"id":"R4","role":"claims","class":"AGENTS.md stdin claim","outcome":"fixed","path":"src/ports/AGENTS.md:49","round":"fix-check","fix":"7d21557e3"},{"id":"R5","role":"claims","class":"error string wording","outcome":"fixed","path":"src/ports/windows-command.test.ts:427","round":"fix-check","fix":"7d21557e3"}]}Written by an agent. |
Closes #1920
Status
Implement: fix done Review: fix-check at 317cc9b, passed Hardware: n/a Gate: not run
Next: parked: not merged: PR #1958 is held by the fast track (above)
Ledger:
windows-command.test.ts29 of 29 with none skipped, including the same-process second-child test (4451 ms), so the second spawn returned and did not block the worker thread. I confirmed that job's result withgh. Windows (1/3) fails only in the slow-lane tests, which is main's bug Windows unit jobs fail on main since #1955: slow-lane tests report the test file under a ../ path #2027. The maintainer's probe also showed the second spawn returning in 4–6 ms. R4 (claims): fixed at 7d21557, verified by the claims lens. R5 (claims): fixed at 7d21557, verified by the claims and code lenses. flaky: windows-command.test.ts detached killChildren test times out at 20 s on the Windows unit job #1965 is not a finding, per the coordinator. verified by: coordinator, because the emptyfix.patchmeans a merge keeping both sides unchanged. Impact: mechanical.State: {"issue":1920,"branch":"bug/1920","pr":1958,"last":"0e48ed41f499","done":"gate","mode":"fix","built":1,"audited":true,"assessment":"complete","hardware":"none","rounds":["fix-check:review:cfa46bedb7b8bac7b85cbff8d42d0e8d76a7823f","fix-check:review:cfa46bedb7b8bac7b85cbff8d42d0e8d76a7823f","fix-check:review:7d21557e3abe205e25644ef61dbcc96aed2f7e35","fix-check:review:317cc9bdb0ba9c23a51e073ae7d3c19e760b4203"],"round":"fix-check","commit":"317cc9bdb0ba9c23a51e073ae7d3c19e760b4203","checkedBase":"cb48e18370848f1cef944cc2a47dd419bd8e363e","reviewBase":"cb48e18370848f1cef944cc2a47dd419bd8e363e","lenses":0,"capFrom":3,"findings":"/var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T/review-1958.ERyiBo/findings.json","gate":{"red":0,"fixes":0,"refusal":"not merged: PR fix(ports): a file-logged child under conhost --headless gets an open stdin #1958 is held by the fast track (above)","merged":null}}
Assumptions
spawnis synchronous, a pool of per-child pairs could run dry in a burst, and a shared pair leaves nothing per spawn to close or leak; each conhost holds its own duplicates, so ending one closes only its copies.fs.openSyncof the pipe), not a socket — it is a plain non-overlapped handle, which a console program reads with ordinary reads; the server end goes in as the unreferenced socket.outlivesCaller— it runs under no conhost (headlessLaunchleaves it), so it gets stdinignoreand no fourth handle (it got a pipe before this fix).HeadlessStdinError(pending: true) rather than waiting —spawnis synchronous; the pair opens in milliseconds at runner construction, and tests retry onpending.node --experimental-transform-typesand a resolve hook for.jsto.tsspecifiers — nothing new is needed, but it needs Node 22.7 or later (engines say 22.13).Review
Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 2 blocking, 1 fixed, 0 notes. Claims review: 3 blocking, 3 fixed, 0 notes.
Rounds: 1. Tokens: 0.4M.
Runs: 23. Cost USD: 8.7307. Agent seconds: 8828.
Rejected:
Assessment: complete
Written by an agent.