Skip to content

fix(e2e/console): a failed daemon start reports the daemon's own cause (#673) - #687

Merged
V3RON merged 3 commits into
mainfrom
bug/673
Oct 18, 2026
Merged

V3RON merged 3 commits into
mainfrom
bug/673

Conversation

@V3RON

@V3RON V3RON commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What

simlock daemon start answers only with what it saw while polling the daemon's socket —
Timed out starting simlock daemon: connect ENOENT <home>/daemon.sock. What the daemon wrote
to daemon.log is the only record of the real cause, and the console lane's startDaemon
deletes that home, log included, in its failure path before anyone reads it. So every console
test that hits a start failure fails with a message that names no cause.

Why

Closes #673: a failed console-lane daemon start names no cause — the lane judged a start by
its exit code alone, then disposed of the evidence.

How

e2e/console/fixtures.ts: when daemon start exits non-zero, read the last 20 lines of
daemon.log from the home — at that point, before any caller's catch reaches dispose — and
append them to the message given to expect on the exit-code check. No production change.

Done when

  • Repro e2e/console/daemon-start-failure.spec.ts (carried from bug/673-repro, a
    Flaky: gateway-physical-routing startFleet times out auto-starting the gateway daemon #553-style port hold): RED on main at 4153e32 (commit 2da56b38) — 1 failed, its
    error text was only {"error":{"code":"DAEMON_STARTUP_FAILED","message":"Timed out starting simlock daemon: connect ENOENT …/daemon.sock"}} — no cause in it.
  • GREEN on this head (84b64b42, identical tree to 373a17e) — 1 passed (21.9s): the failure message now carries
    the daemon's own line, listen EADDRINUSE: address already in use 127.0.0.1:<port>,
    and the test's two toContain claims on it pass.
  • Console-lane CI green.

Assumptions

  • Assumption: the CLI-side gap — simlock daemon start itself reading the failed daemon's log tail into its own error — is out of scope; daemon start reports DAEMON_CONNECTION_LOST for a daemon that never came up #684 owns those error-code semantics. This PR is the proposed test-infra fix only.
  • Assumption: a tail of 20 log lines is enough for a start failure, because the daemon writes its fatal line last.

Review

Spec review: 1 blocking, 1 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: n/a.

Fix-check (79935219..373a17ea; tests lens Opus, spec lens Sonnet): both complete, F0; F1
resolved — the tail is appended to the message given to expect, as the triage's Simplest fix
says; both assumptions judged conservative.

Assessment: complete

Ledger: F0/F1 by leg at commits 79935219 (round 1: spec A/B, code, claims) and 373a17ea
(fix-checks). Incidents: the first claims invocation returned an empty 1-byte output (its
prompt was mangled by the launcher shell); the leg was relaunched once and reported F0 with
line-level citations, all verified against the diff. Spec question 4 was blocked only on a
truncated assumptions.md (the extractor keeps one line per Assumption:); the PR body now
writes each assumption on one line, and both fix-checks read them. After the reviews: the
head was amended 373a17ea → 84b64b42 with an identical tree (coordinator verified an empty
diff — a mechanical re-date to clear a stale body-derived check run), so no review repeat was
due; CI proves the new head. CI reran one failed job once —
src/daemon/relay-promises.timing.test.ts, a relay memory-window flake that passed on the
identical tree minutes before and reads nothing this PR changes; the rerun is green.

Status

Implement: done (repro 1 failed → 1 passed) Review: round 1 + fix-checks done — F1 fixed, all legs complete with 0 open Hardware: n/a Gate: merged (381dd13)
Next: nothing

Written by an agent.

V3RON and others added 2 commits October 18, 2026 16:58
why: #673 — the lane judged a start by its exit code alone, and the catch in
startDaemon deleted the home with daemon.log, the only record of why the daemon
gave up; every console test then failed with only what the CLI saw polling the
socket. Read that log's tail at the failure point, before any caller disposes.

Co-authored-by: Claude <noreply@anthropic.com>
@V3RON
V3RON marked this pull request as ready for review October 18, 2026 15:31
…riage proposes

why: #673 review F1 — the Simplest fix reads the daemon.log tail into the
message given to expect on the exit-code check, not a separate thrown error;
same failure point, one assertion, nothing else changed.

Co-authored-by: Claude <noreply@anthropic.com>
@V3RON
V3RON merged commit 381dd13 into main Oct 18, 2026
41 of 43 checks passed
@V3RON
V3RON deleted the bug/673 branch October 18, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console lane deletes a failed daemon's home, so a start failure names no cause

1 participant