The fixture's step deadlines are fixed when it starts: the near-deadline browser spec fails once it has been up 2 minutes #134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ui/e2e/step-failure.spec.ts:91("a running step near its deadline says so in the spine and in Step details") expects the clock step's activity line to read/1[23]m left/. Against a fixture backend that has been up for 2 minutes or more, the line reads11m leftand the spec fails. It failed that way in a fast lane on 2026-10-02 under heavy machine load. It passes when run alone.Why
ui/dev/fakeosfd.pysets the deadline once, when the module loads:The console rounds the time left up to the minute (
leftWords). So the line reads13m leftin the fixture's first minute,12m leftin its second, and11m leftfrom 120 s on. Two ways to get there:ui/playwright.config.tshasreuseExistingServer: true, so a run reuses whatever fixture is already on its port, however old it is. Another session's run can leave one on 8719.Reproduced on 2026-10-02 against a fixture started on a private port at 23:54:44. The spec passed at 61 s and failed at 141 s:
_retry_step(run_mediated, used bye2e/failure-mediation.spec.ts) has the same problem, with 100 minutes. After 85 minutes its spine line turns amber. After 100 minutes the gauge readstime is up (2h limit), and that spec's/ of 2h$/fails.Fix
Take these two deadlines from the moment the step is served, not from when the fixture started. Keep each step's time left (13 and 100 minutes) and add it to the time of the request wherever the step and its running attempt are served:
GET /api/runs/{id}, the stream's snapshot, andGET /api/steps/{id}.The spec keeps its meaning: a 1h step with 13 minutes left is in the last quarter of its limit, so it is amber in the spine and in Step details. Check the fix against a fixture started 3 minutes before the run.
Shipped in
58385a6. The proposal is71c62a4and the archive is7b6a101. All three carry[skip ci]: osfd's image ships onlyui/dist, and nothing in it changed, so production was not redeployed.What changed
The fixture.
ui/dev/fakeosfd.pykeeps each clocked step's time left inTIME_LEFT: 13 minutes forrun_clock'sagent.test.browser, and 100 forrun_mediated's. Every response adds that to its own time:_timed);GET /api/steps/{id}, on the step and on its attempt in flight.The attempt that already timed out keeps its fixed deadline.
A new spec.
ui/e2e/fixture-clock.spec.tsuses the API only. It checks that eachdeadline_atis the step's time left after the response's ownts. A fixture that took the deadline at start fails it once that fixture is half a second old, so a lane catches a regression without waiting 2 minutes.The spec of record.
test-laneshas a new requirement: "The fixture backend's deadlines are taken from the request".Unchanged.
step-failure.spec.tsstill expects/1[23]m left/, amber, in the spine and in Step details.Verified
step-failure,failure-mediation,step-last-callandfixture-clockpassed, 16 of 16. In the console, 4 minutes in, the spine readStarting · 13m leftin the signal colour, and Step details read13m left of 1h.Starting · time is up, andfixture-clockreceived -1029 s against 780. Both failed, as expected..arrives, and the agent-view spec fails under load #130