Repository navigation
fix(ports): the daemon's children open no console window on Windows - #1076
Conversation
The daemon runs with no console. On Windows, a console program started from such a process without `windowsHide` gets a new, visible console: the agent-device daemons and simlock's adb server stay open as windows, and the 30 s adb presence check and `avdmanager list device` flash one each time. `NodeProcessRunner.spawn` and `spawnStreaming` and `NodeBytePipeLauncher.start` now pass `windowsHide: true`. The CLI's passthrough keeps its console on purpose: it runs in the user's own terminal with inherited stdio, which `adb shell` needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
Node gives a detached child on Windows a console window of its own (https://nodejs.org/api/child_process.html#optionsdetached), so the daemon `simlock daemon start` or an auto-launch spawns, and the updater, would each open one on the desktop, and closing it ends the process. Both launchers now pass `windowsHide: true`; elsewhere it does nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sole window The two detached launches (the CLI starting the daemon, the daemon starting the updater) now pass `windowsHide`, like every other child the ports start; the spawn-options test covers them, and fails without the option. Addresses blind review R1 on callstackincubator#1076. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review ledgerRound 1: dcd4394 {"findings":[{"id":"R1","role":"code","class":"detached spawn sites lack windowsHide","outcome":"fixed","path":"src/ports/daemon-launcher.ts","round":"1","fix":"816e8fc5"}]}Written by an agent. |
Review findings
No code findings. Found by a post-merge review (code and claims lenses; no spec lens, as no issue is linked), checked on Windows 11 where a claim needed it. Fixes follow in separate PRs. Written by an agent. |
…ames the Windows SDK default (#1671) Fixes the documentation findings of the post-merge review of #1052 #1053 #1054 #1076 #1077 #1078 #1079. ## Rule 7: manual lines that restate code Most flagged lines were already gone after a later manual rewrite on main. Deleted here, each said by the code named: - `daemon`: the Windows pipe line (`connection-host.ts:81`); what a failed start disposes (`server.ts` `#releaseFailedStart`, `worker-composition.ts:759`). - `ports`: pipe never `stat`ed/removed (`isPipeEndpoint`); second listener `address-in-use` (`connection-host.ts:81`); `windowsHide` (adapter `why:` comments, `child-window.test.ts`); `cmd.exe` and refused arguments (`windows-command.ts`). - `drivers/android`: how long the `avdmanager list device` answer is kept (`AvdmanagerDeviceList`). Kept: the pipe ACL rationale and known gap; "the sdkmanager catalog is never read"; the reap safety rules in `drivers/android` and `agent-device`; the `DaemonAlreadyRunningError` trap. ## Rule 9: Windows SDK default `cli.mdx` and `requirements.mdx` add `%LOCALAPPDATA%\Android\Sdk`, as `defaultSdkRoot` (`sdk-paths.ts`) does. Manual, stale-ref and docs tests pass; website build and `check-openapi.mjs` pass. ## Review Spec review: skipped. Code review: skipped. Claims review: 0 blocking, 0 fixed, 0 notes. Rounds: 1. Tokens: 0.5M. Runs: 3. Cost USD: 0.318. Agent seconds: 115. Spec review skipped: the PR closes no issue. Code review skipped: no code or test line changed. The first coordinator run started no claims lens (incomplete); a second ran it at 0b32d58 (F0). The later merge of main touches no file of this diff. Assessment: complete *Written by an agent.*
On Windows the daemon runs with no console, so every console program it starts gets a new, visible window. The agent-device daemons and Simlock's adb server stay open as windows. The phone presence check (
adb … getprop) and the warm pool'savdmanager list deviceflash one every 30 s, even with nothing leased.Every child the ports start now passes
windowsHide: true:NodeProcessRunner.spawnandspawnStreaming,NodeBytePipeLauncher.start, and the detached daemon and updater launches. The CLI passthrough keeps its console on purpose, sinceadb shellneeds the user's terminal.Verified: a 100 s watch on Windows 11, across a daemon restart, saw 0 new visible windows. The test checks the option each adapter hands
spawn, because a test runner has a console and cannot show the window.Part of #1068.
Review
Spec review: skipped. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 11.6M.
Runs: 24. Cost USD: 3.838. Agent seconds: 2297.
Slow lane: not run.
windowsHideis a no-op on macOS, and the Windows behaviour cannot be tested on the delivery Mac.Assessment: complete
Status
Implement: done (main merged 901a085) Review: fix-check passed at 901a085, 0 open Hardware: n/a Gate: running
Written by an agent.