Flaky test: watched_stream_ending_stops_watching_by_itself times out under load #908

Closed
opened 2026-11-18 16:56:08 +00:00 by charles · 1 comment
Owner

apps/fluxer/tests/screenshare_runtime.rs watched_stream_ending_stops_watching_by_itself (added by PR #875 for #867) fails intermittently: "timed out waiting for: ada's frames are gone from the bus". Seen in a full gate run on the shell branch at a load average of about 15–17, and 1 time in 3 when run alone on that loaded machine. It is on textchat too, so it can fail CI and block a nightly.

To do. Find why: the 4 s republish grace measured in real time against the test's wait budget, the order of the room event and the voice-state update, frames still being pushed by the fake room after the publication went, or a real race in dropping the watch (in which case users can be left with a frozen "ended" tile — say which). Make the test deterministic (paused/driven clock, or wait on the store's state rather than on a wall-clock budget) without weakening what it proves: a quick republish keeps the watch, a real end drops it after the grace and the frames leave the bus. Run it 50 times under load (stress-free: run several copies of the test binary in parallel, niced) to show it holds.

`apps/fluxer/tests/screenshare_runtime.rs` `watched_stream_ending_stops_watching_by_itself` (added by PR #875 for #867) fails intermittently: "timed out waiting for: ada's frames are gone from the bus". Seen in a full gate run on the `shell` branch at a load average of about 15–17, and 1 time in 3 when run alone on that loaded machine. It is on `textchat` too, so it can fail CI and block a nightly. **To do.** Find why: the 4 s republish grace measured in real time against the test's wait budget, the order of the room event and the voice-state update, frames still being pushed by the fake room after the publication went, or a real race in dropping the watch (in which case users can be left with a frozen "ended" tile — say which). Make the test deterministic (paused/driven clock, or wait on the store's state rather than on a wall-clock budget) without weakening what it proves: a quick republish keeps the watch, a real end drops it after the grace and the frames leave the bus. Run it 50 times under load (`stress`-free: run several copies of the test binary in parallel, niced) to show it holds.
Author
Owner

In nightly 2026.1118.390 (PR #909): a real race in the client, not only the test — a late video frame after the track was unpublished was put back on the frame bus and stayed (a frozen frame under "Stream ended"). Exercised with the simulated room only.

In nightly 2026.1118.390 (PR #909): a real race in the client, not only the test — a late video frame after the track was unpublished was put back on the frame bus and stayed (a frozen frame under "Stream ended"). Exercised with the simulated room only.
Sign in to join this conversation.
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
charles/fluxer-native#908
No description provided.