test(web): sign-out specs: wait for the queued logout; fixture data on RAM (fixes BM14e flakes) #952

Closed
kayg wants to merge 2 commits from fix/signout-test-races into dev
Owner

Fixes the two sign-out flakes that blocked train BM14e (#914). Both are already in prod, so they are test-only fixes.

signout.spec.ts:63 "offline: one confirmation…" (webkit-1440, 2/10 on dev). Last step: GET /auth/me for the old session expected 401, got 200. Signing out anyway while offline leaves the logout pending; it is sent when the device is back online or on the next page load (by design: wipe.ts finishLogout). The sign-in screen (what empty() waits for) is up before that request lands, and the reload right after going online can cancel the first try. The test asked too soon. It now polls (30 s) for the same 401, so it waits for the real condition and the expected value is unchanged.

review6-signout.spec.ts:7 (webkit-390, 1/10 on dev and train). Fails in the fixture's setup ("Test timeout of 30000ms exceeded while setting up device", /healthz never 200), before any sign-out step. A stall dump from a failing run showed the server in state D, wchan jbd2_log_wait_commit: it was blocked in an fsync on the busy virtual disk (the fixture's data folder was in the disk's temp dir). Fix: the fixture's data folder goes on /dev/shm when there is one (as the train's main harness already does for the other servers; PERF=1 keeps the disk), and is removed after the test. No timeout was changed.

Test-only: apps/web/e2e/signout.spec.ts, apps/web/e2e/signout-fixture.ts. Evidence on #914.

Fixes the two sign-out flakes that blocked train BM14e (#914). Both are already in prod, so they are test-only fixes. **signout.spec.ts:63 "offline: one confirmation…" (webkit-1440, 2/10 on dev).** Last step: `GET /auth/me` for the old session expected 401, got 200. Signing out anyway while offline leaves the logout *pending*; it is sent when the device is back online or on the next page load (by design: `wipe.ts` `finishLogout`). The sign-in screen (what `empty()` waits for) is up before that request lands, and the reload right after going online can cancel the first try. The test asked too soon. It now polls (30 s) for the same 401, so it waits for the real condition and the expected value is unchanged. **review6-signout.spec.ts:7 (webkit-390, 1/10 on dev and train).** Fails in the *fixture's setup* ("Test timeout of 30000ms exceeded while setting up device", `/healthz` never 200), before any sign-out step. A stall dump from a failing run showed the server in state `D`, wchan `jbd2_log_wait_commit`: it was blocked in an fsync on the busy virtual disk (the fixture's data folder was in the disk's temp dir). Fix: the fixture's data folder goes on `/dev/shm` when there is one (as the train's main harness already does for the other servers; `PERF=1` keeps the disk), and is removed after the test. No timeout was changed. Test-only: `apps/web/e2e/signout.spec.ts`, `apps/web/e2e/signout-fixture.ts`. Evidence on #914.
Signing out anyway while offline leaves the logout pending; it is sent when the device is back
online or on the next page load. The sign-in screen is up before that request lands, so asking
the server for the old session right away sometimes still got 200.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(web): the sign-out fixture's server keeps its data on RAM and removes it after the test
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled
fcdf9de8ff
A server of this fixture was caught waiting in the file system's journal commit (an fsync on a busy
virtual disk), so it did not answer /healthz inside the test's 30 s (review6-signout, 1 in 10 on
WebKit), and a queued logout reached it late (signout.spec). The folder goes on /dev/shm when there
is one (PERF=1 keeps the disk) and is removed once the server has exited.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Owner

Content landed in dev via 12103f1c97 — closing.

Content landed in dev via 12103f1c973f1e810dd4a9a3bff5a705514d70b0 — closing.
kayg closed this pull request 2026-11-07 18:11:57 +00:00
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!952
No description provided.