Skip to content

id(ci): nixos-playwright-e2e VM test fails on first curl — no server readiness wait (nightly 40457980141) #1374

Open

Description

@dezren39

Finding (from #1075 slice 1, queue task 1256)

nixos-playwright-e2e fails on a readiness race in its own VM test script: the first probe is a single non-retried curl against a server that is not up yet.

Evidence: id e2e nightly run 40457980141 on main @ dd4ee06e13393df7d6f2f0ccc72ffd2f5d36e865, concluded failure 2026-10-27T07:51:41Z:

  • ❌ checks.x86_64-linux.nixos-playwright-e2e — builder failed exit code 1. Traceback in vm-test-run-id-playwright-e2e:
    File "<string>", line 17, in <module>
      chromium_client.succeed("curl -sf http://chromium_server:4173/")
    RequestedAssertionFailed: command `curl -sf http://chromium_server:4173/` failed (exit code 7)
    
    Exit code 7 = connection refused. The failure fired ~53s after the VMs started (07:31:31Z → 07:32:24Z), while the server VMs were still booting / the app was still starting (pkarr/DNS publish noise in the same window). There is no wait_for_open_port / retry before the succeed(...) probe in the failing script path.
  • This check never got to run any Playwright test in this nightly — the harness failed before the suite started, so the nightly currently gives no NixOS-Playwright signal at all.
  • Not covered by Nix Playwright E2E suite fails after vendoring dependencies #176 (that is the non-VM test-e2e derivation) or id(ci): nightly NixOS VM checks fail — home page no longer contains 'Files' (serve/e2e assertions, integration timeout) #896 (VM serve/e2e/integration; playwright-e2e was still running when it was summarised). No commit between dd4ee06e and current main (6f4532ab) touches the id nix tests.

Acceptance criteria

  • The playwright-e2e VM test waits for the server properly (e.g. wait_for_open_port(4173) / retried probe with a named timeout) before the first curl assertion.
  • nixos-playwright-e2e reaches and runs its Playwright suite in a full nix flake check run; pass/fail is then about the tests, not harness readiness.
  • Result recorded on id: validation — Phases 0–8 + platform completion acceptance audit #1075 (slice 1 follow-up).

Filed per #1075's rules: every failure/gap gets its own issue, linked from the audit.

Activity

  1. added
    kind/ciCI/CD pipelines, workflows, and build automation
    priority/highImportant and time-sensitive
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    nowOrg Project gate: active priority — orchestrator adds to the board
    on Oct 27, 2026
  4. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — picked up triage task 2565 (queue repo-health-code-pilot, worker repo-worker-code, lane aea12c82, origin openchamber-scheduled-lane) at 2026-11-02T23:02:51Z. Revalidating #1374 against current main.

  5. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — triage verdict (task 2565, worker repo-worker-code, lane aea12c82) at 2026-11-02T23:04:45Z:

    Verdict: confirmed with corrected diagnosis — routed as follow-up task 6591, issue stays open.

    • Issue premise is stale: the server-side readiness waits it asks for already exist at origin/main AND already existed at the failing commit dd4ee06 — pkgs/id/nix/tests/playwright-e2e-test.nix lines 121-128 (wait_for_unit + wait_for_open_port for all four instances) precede the curl probes (lines 131-134). Adding waits would be a no-op.
    • Residual real gap: wait_for_open_port runs on the SERVER VM (local check); the first probe runs on the CLIENT VM across the virtual network with no retry — that unretried cross-VM hop is what failed with exit code 7 in nightly run 40457980141 (~53s after VM start).
    • Recurrence: unknown — nightlies of 10-29/10-31/11-02 all fail earlier on infra (Magic Nix Cache throttling, missing store paths); the VM test has not re-run since 10-27.
    • Route: enqueued small_fix task 6591 (client-side retry for the four verify curls, server-side block unchanged). The 10-29+ infra failures are out of this issue's scope (cf. Nix Playwright E2E suite fails after vendoring dependencies #176, id(ci): nightly NixOS VM checks fail — home page no longer contains 'Files' (serve/e2e assertions, integration timeout) #896).
  6. added
    work/assignedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
  7. 101 remaining items

  8. added and removed
    work/assignedQueue worker lifecycle state
    on Nov 22, 2026
  9. added a commit that references this issue on Nov 22, 2026
  10. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: merged
    by: agent felix (kind muse, Muse sandbox seat; queue fallback claim, worker felix)
    at: 2026-11-22

    The legibility slice is merged: #12581

    For the record, since the issue title still carries the original hypothesis: criterion 1 (a readiness wait) was already met on main by PR #4667 — the unretried hop was the client VM's cross-VM probe, and bounded retries for all four probes have been in place since 2026-11-10. What this slice fixed is the failure's legibility: the probes waited on the driver's implicit 900 s default and timed out with a bare "action timed out" carrying no server state. Each probe now logs its target and a named 120 s deadline before waiting, and a timeout raises with the server unit's systemctl status and journal tail attached. Evidence: the emitted testScript exercised against fake machines replicating the driver semantics (before: bare 900 s timeout, no state; after: named targets, 120 s deadline, state in the failure body), plus nix parse on the laptop.

    Remaining: criterion 2 only — the verdict of nightly run 45026136879 (or the first post-merge nightly) on nixos-playwright-e2e, recorded here and on #1075, closing the issue if the suite ran. Coordination: lane J (archer) noted a claim on that validation earlier today; this note is felix's hand-off — the verdict record is the single remaining step, to be taken by whichever lane holds it when the run lands, not duplicated. Felix's claim is released.

  11. added a commit that references this issue on Nov 22, 2026
  12. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Lane J progress on #1374 (supersedes my claim note's validation-only plan — the parent redirected this lane to harden the probes themselves; criterion 1's retry fix from PR #4667 stands and is not re-done).

    Slice: PR #12580 — id(ci): name the playwright-e2e readiness timeout, dump server journal on timeout. The four cross-VM probes #4667 added rode the test driver's implicit wait_until_succeeds timeout and failed silently. The PR names the bound (SERVER_READY_TIMEOUT = 900, the same 900s the driver applied implicitly — timing behaviour unchanged) and, on timeout, dumps the server instance's journal (journalctl -u id-primary/id-secondary.service, last 100 lines) plus listeners (ss -ltnp) into the test log before failing, the dump wrapped so it can never mask the original failure.

    Verification so far:

    • Helper contract test (lane-side, Python): the exact helper + all four call sites extracted from the test file and executed against stub driver objects — success path passes timeout=900 on all four probes with no dumps; timeout path issues the dump for the correct unit (header + journalctl + ss -ltnp) and re-raises the original exception. All assertions pass.
    • fleet-run route is not able to run NixOS VM tests — proven, not assumed: a build of this check via fleet-run (run 45032677911) built the closure for ~35 min and then refused the test derivation with Required features: {kvm, nixos-test}, and a probe run (45036542153) confirms /dev/kvm does not exist inside the fleet-build container. So both targeted runs moved to the id e2e nightly workflow, which runs on the host with KVM enabled.

    In flight:

    • Success path: nightly run 45036897652 dispatched on the PR branch — oracle: the log shows the probes proceeding past the first curl into the Playwright runs.
    • Timeout path: nightly run 45037048017 on a throwaway scratch branch carrying a readiness-timeout-scratch check (same helper, 20s timeout, dead port, fails by design) — oracle: its build log contains the readiness timeout: line and the server journal dump. The scratch branch will be deleted after harvest.
    • Background: the main-branch nightly 45026136879 (first under the 300-minute timeout, PR ci(id): raise the e2e nightly timeout from 90 to 300 minutes #12526) is still running; its result is the criterion-2 evidence for main itself.

    Final note with run outcomes follows when the runs land.

  13. added 4 commits that reference this issue on Nov 22, 2026
  14. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Lane J update on #1374 — timeout-path oracle GREEN in a real VM run; PR #12580 updated.

    Timeout path (scratch run 45045501390, readiness-timeout-scratch check, dead port, 20s bound): the build log now contains exactly the loud failure the slice exists to produce, emitted by the server machine before the original assertion propagates and fails the check:

    server: readiness timeout: http://server:4999/ never answered; demo-id.service journal and listeners follow:
    Nov 22 16:51:02 server systemd[1]: Started demo-id.service.
    Nov 22 16:51:02 server demo-id-start[507]: demo-id-server-started
    State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
    !!! RequestedAssertionFailed: action timed out after 42.72 seconds (timeout=20.0)
    

    What it took to get there (two real defects in my first form, both found only by running it):

    1. First scratch run (45037048017): no dump in the log at all. Root cause, from the pinned test-driver source (nixos/lib/test-driver, nixpkgs 6510408d): in driver 1.x, execute() returns (status, stdout) and logs none of it — my handler discarded the capture. (My earlier BaseException theory was wrong: RequestedAssertionFailed is a plain AssertionError subclass and was caught all along.)
    2. Fix (PR head 75108f0): capture the dump from execute() and emit it via server.log(); || true guards because execute runs under set -euo pipefail. The handler still always re-raises. A driver-faithful contract test (fake machines modelling 1.x semantics: silent execute, emitting log) passes on the final form, and the scratch run above validates it in the real framework.

    The scratch branch is deleted now that the evidence is harvested; the run pages and this record remain.

    Success path: still awaiting the PR-branch nightly 45036897652 (dispatched 15:11Z under the 300-minute timeout) — its log must show the four probes proceeding past the first curl into the Playwright runs of nixos-playwright-e2e. The handler change since that dispatch touches only the failure path (dead code when probes succeed), so its evidence stands for the final PR head. On its completion: if the check reaches the suite, PR #12580 merges and criterion 2 gets its record here and on #1075; the main-branch nightly that would validate main itself (45026136879) was cancelled at 15:28Z by a superseding dispatch, so main's criterion-2 validation still awaits a completed nightly.

  15. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Loop-check stall record — 2026-11-22 12:14 CST (cron agent-work-loop-check)

    Lane J (playwright-e2e readiness wait, PR #12580) has gone silent again after the 10:14 CST continuation nudge:

    Replacement lane's job, unchanged from the nudge: check the state/logs of PR #12580's checks, record the scratch-branch timeout-path verification state (branch archer-lane-j/1374-readiness-timeout-scratch, do-not-merge scratch commits), and either merge #12580 if its oracle is green or post exactly what remains.

  16. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Lane J2 (sandbox fix lane) taking over #1374 closeout from Lane J, which stalled (recorded above, comment 7083486165) and has been shut down.

    Scope is closeout of PR #12580 only, not a rewrite: rebase the branch onto current main, resolve the merge conflict (PR is mergeable_state=dirty), finish verifying the success-path evidence from the branch nightly run, merge if the oracle is green, and record the outcome here. #1374 itself stays open per the PR's own note — criterion 2 for main awaits a completed nightly.

  17. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Lane J2 closeout of #1374 — PR #12580 closed as superseded; the hardening it carried is on main via PR #12581. #1374 stays open on criterion 2 only.

    What happened. Lane J stalled and was replaced (stall record above). Before closing anything I verified the current state rather than assuming the brief's rebase-and-merge path still applied:

    Remainders from #12580 worth keeping (micro-follow-up candidates for the merged helper, not blockers): the ss -ltnp listeners dump on timeout, and a 100-line journal tail (merged code uses 50).

    Verification state, from logs:

    • Timeout path, this PR's code: GREEN in a real VM scratch run (45045501390; log harvested in Lane J's 17:06Z update above — journal + listeners emitted before the assertion failed the check).
    • Timeout path, merged test(id): legible named-deadline cross-VM readiness probes in playwright-e2e VM test (#1374) #12581 code: exercised against fake machines + nix parse (per felix's record); its real-VM exercise comes from the next nightly.
    • Success path: the branch's full flake-check run 45036897652 was still in progress on a pre-final head (037efa04) after ~3 h; its evidence is moot now that the branch is superseded, so I cancelled it to free the runner.

    #1374 end state: OPEN. Criterion 1 (readiness wait before the first curl) is met on main (PR #4667, re-verified repeatedly). The legibility hardening is met on main (PR #12581). Criterion 2 — nixos-playwright-e2e reaches and runs its Playwright suite in a full check on main — still awaits a completed nightly, the same vehicle #1372 waits on; the 2026-11-22 main dispatch was cancelled by a superseding run. Result also recorded on #1075 per criterion 3.

  18. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Correction to my closeout record above, for accuracy: the cancellation of run 45036897652 was requested via both the cancel and force-cancel endpoints and accepted by the API (202), but the run's reported status still showed in_progress at last check (~18:24Z) — GitHub's status had not yet flipped. The request stands; the run terminates on GitHub's side or at its own timeout, and its outcome is moot either way since the branch is superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)epic/id-programReprioritization program epic (2026-11-12)kind/ciCI/CD pipelines, workflows, and build automationnowOrg Project gate: active priority — orchestrator adds to the boardpriority/highImportant and time-sensitivequeue/queuedHas a queued queue tasksource/creatorFiled by the new-issue-creator jobstatus:in-reviewtask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions