You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky console lane: CLI auto-launch's fixed 5 s deadline expires while a daemon starts on a loaded runner (ENOENT daemon.sock) #663
The message is thrown by the CLI's auto-launch, not the fixture: src/cli/index.ts:234-246
launches the daemon and polls the unix socket for a fixed 5 s. A daemon that needs longer to
create its socket on a loaded runner makes daemon start exit 1 while the daemon keeps booting.
src/cli/index.test.ts — "reports as running a daemon still booting past the deadline…", on bug/663-repro (50cf713e):
pnpm exec vitest run --project unit src/cli/index.test.ts -t "startup deadline"
- { exitCode: 0, label: "5.1 s", stderr: "", stdout: '{"status":"running"}\n' }
+ { exitCode: 1, label: "5.1 s", stdout: "",
+ stderr: '{"error":{"code":"INTERNAL","message":"Timed out starting simlock daemon:'
+ ' No IPC endpoint at /simlock/daemon.sock"}}' }
The daemon claims its socket 5.1 s after launch, on the poll's own clock; the 4.9 s case passes, so the deadline is straddled. No loaded runner needed.
Root cause
Defect, in user-facing code. AutoLaunchIpcConnector polls every 50 ms for a hardcoded 5 s (src/cli/index.ts:235), then throws a plain Error (:246) the CLI renders as INTERNAL, exit 1. The daemon it launched is detached and unref'd (src/ports/daemon-launcher.ts:33-45) and serves a second later: a start that succeeded reports as one that failed. No user doc names 5 s and no key sets it; the MCP's copy of the loop takes startupTimeoutMs yet defaults to the same 5 s (src/mcp/connect.ts:51). The console lane starts a daemon per test, with no retry unlike e2e/helpers/http-daemon.ts (#553). Census, 492 Console job runs over the last 500 CI runs: 16 failures, this signature in 1 (run 38955614485, 93ffed8f); #642's route.fetch family in 7.
Simplest fix
One startup deadline shared by both loops, long enough for a loaded machine — 20 s — the CLI's connector taking the option MCP's loop has. The repro pins the shape: exit 0, {"status":"running"}.
Alternatives rejected
Retrying in the console fixture, as withHttpDaemon does — hides the flake, leaves this repro red.
A daemon.startupTimeoutMs key — nobody asked; a longer default covers this boot.
Softening the timeout's message — the message is honest; the bound is the defect.
Risk
Auto-launching commands (daemon start, lease, MCP tools) wait longer on a broken install.
Stay under the 30 s the console lane gives the CLI process (e2e/console/fixtures.ts:109).
Round 1 review only — spec, code (lens: both), claims: 0 blocking, 0 fixes, 1 claims note rejected. No slow lane needed. Gate passed on the head the reviews covered (cee82779); main had moved to bd664e22 but touches none of this PR's nine files, so no rebase and no new snapshot.
Activity
V3RON commentedon Oct 17, 2026
Confirmed, reproduced deterministically.
Reproduction
src/cli/index.test.ts— "reports as running a daemon still booting past the deadline…", onbug/663-repro(50cf713e):The daemon claims its socket 5.1 s after launch, on the poll's own clock; the 4.9 s case passes, so the deadline is straddled. No loaded runner needed.
Root cause
Defect, in user-facing code.
AutoLaunchIpcConnectorpolls every 50 ms for a hardcoded 5 s (src/cli/index.ts:235), then throws a plainError(:246) the CLI renders asINTERNAL, exit 1. The daemon it launched is detached and unref'd (src/ports/daemon-launcher.ts:33-45) and serves a second later: a start that succeeded reports as one that failed. No user doc names 5 s and no key sets it; the MCP's copy of the loop takesstartupTimeoutMsyet defaults to the same 5 s (src/mcp/connect.ts:51). The console lane starts a daemon per test, with no retry unlikee2e/helpers/http-daemon.ts(#553). Census, 492 Console job runs over the last 500 CI runs: 16 failures, this signature in 1 (run 38955614485,93ffed8f); #642'sroute.fetchfamily in 7.Simplest fix
One startup deadline shared by both loops, long enough for a loaded machine — 20 s — the CLI's connector taking the option MCP's loop has. The repro pins the shape: exit 0,
{"status":"running"}.Alternatives rejected
withHttpDaemondoes — hides the flake, leaves this repro red.daemon.startupTimeoutMskey — nobody asked; a longer default covers this boot.Risk
daemon start,lease, MCP tools) wait longer on a broken install.e2e/console/fixtures.ts:109).bug/663-repro; one shared loop stops the frontends diverging (CLI reports its auto-launch timeout as INTERNAL while MCP reports the same failure as DAEMON_STARTUP_FAILED #672).Side findings
INTERNAL, the MCP asDAEMON_STARTUP_FAILED.Written by an agent.
fix: share one 20 s startup deadline between the CLI's and MCP's auto…
test: drop the #663 case's echoed timeout flag (testing rule 10)
test: give MCP's auto-launch loop its own test of the shared deadline (…
test: drop the #663 case's unread expected exit codes (testing rule 10)
fix(cli): wait 20 s for a daemon a command auto-launched (#663) (#674)
V3RON commentedon Oct 18, 2026
Delivery run
Merged: #674 (#663), squash
24ce3d5a.Round 1 review only — spec, code (
lens: both), claims: 0 blocking, 0 fixes, 1 claims note rejected. No slow lane needed. Gate passed on the head the reviews covered (cee82779); main had moved tobd664e22but touches none of this PR's nine files, so no rebase and no new snapshot.Written by an agent.
fix(cli): the auto-launch startup timeout reports DAEMON_STARTUP_FAIL…