carlos / platform Public

CI timing flakes: wall-clock bounds in activator and edge tests fail on a loaded runner open

Timing flakes on the CI runner, 2026-11-03 afternoon. Five different tests failed on five runs, none of them related to the change under test, and two runs timed out at 30m:

  • internal/activator TestReleaseLeaseLossUnprovenLeavesTheHold: a settle stamped 0.2 ms past its deadline (litestream-oom-284 @ 486e00fa). It also fails locally on main at docs-t1.
  • internal/activator TestRootfsWorkerUnprovenKeepsItsFiles: 'timed out waiting for the stop to finish' (main @ 74757d13).
  • internal/edge TestHeldStreamLifecycleSim seed 254: leg 189 ms into the window against a 185 ms bound (litestream-oom-284 @ 525fa67a).
  • internal/edge TestHeldDialWebSocketUpgrade: got 200 {"isValid":true} instead of 101 (litestream-oom-284 @ 5ec4cc6c). Probably another listener answered the dial.
  • Locally on docs-t1, the rootfs release generations-file tests (TestReleaseObligationRetriedUntilProven, TestUnprovenReleaseOnAnAwakeIncumbentIsRetried) and TestSweepBurstOf252MeetsTheDeadline also fail on main. The wall-clock bounds look too tight for a loaded runner. Main is red because of this, at 74757d13.

Timing evidence from main @ 74757d13, compared with the 2026-10-25 floor (test-suite-speed #291): activator 59 s → 272 s; console shards about 65-77 s → 87-167 s; edge 346 s, of which TestHeldStreamLifecycleSim alone took 177 s. Two runs today hit the 30 m job timeout, against a usual 7 m whole run. Read: the runner is slower than usual (several jobs at once?), and the suite's tail has grown since #432's simulations landed. The contention is what pushes the tight wall-clock bounds over. I can't see worker load from the CI role, so whoever owns the runner fleet should check the concurrent-job count and the instance type. Fix branch: ci-timing-flakes-526 (Astra).

Fix branch ci-timing-flakes-526 @ e965aa93 (test-only, Astra implemented, Opus reviewed: READY AFTER FIXES, P1 fixed). Six tests now run on virtual time or wait for the event they assert. Under contention they went from 15/15 failing to 0/60 (activator release tests), and the held-stream simulation from about 195 s to 1 s with all 300 seeds and a tighter 160 ms bound. TestSweepBurstOf252MeetsTheDeadline is left alone: its local failure comes from this machine's disk speed. Merges on green CI.

Follow-ups, not in this branch:

  • TestRootfsWorkerUnprovenKeepsItsFiles: cap the number of sweep passes instead of polling until proof holds.
  • localholdtest.go:227,297 and localholdprobed_test.go:136,153 still use deadAddr + listenLater, the closed-then-rebound port that caused the WebSocket flake. Move them to owned listeners with an injected dialer.
  • TestReleaseLeaseLossUnprovenLeavesTheHold runs in a synctest bubble without the race-mode GOMAXPROCS(1) pin used for Go issue 76691. It passed 20 times under -race, but add the pin or a comment saying why it isn't needed.

A third 30 m CI timeout today, on ci-timing-flakes-526 @ e965aa93. This one printed no output at all from .amadan/test-gate.sh, not even the vet step (usually 27 s). So the worker hung or stalled before any step finished. That's the runner, not the tests. Main passed CI at 9b8b2c50 in the same window. Whoever runs the runner fleet: are workers wedging (a stuck disk, a needrestart-style restart that doesn't SIGTERM)?

Another flake on main, this time a port race rather than a timing bound. At bb8973d1 (P2b-1 squash), internal/edge TestHeldDialPOSTBodyArrives failed with localhold_test.go:197: listen 127.0.0.1:45139: bind: address already in use, then got status 405 instead of 200. listenLater reserves an address and binds it again after a delay, so another process on the shared runner can take the port in between. The same test passed on the branch tip 2f232c7c and 5/5 locally on bb8973d1. The fix would be to keep the reserved listener open, or retry on EADDRINUSE. Not P2b-related; the branch touched only internal/edge testdata.