Fix two more load-flaky daemon tests #113

Closed
opened 2026-08-24 22:11:30 +01:00 by naps62-yolo · 0 comments
Collaborator

#111 fixed one racy test and, while proving the fix over 30 runs, surfaced two more with the same signature — fail once under load, pass on rerun. Both are pre-existing and unrelated to this milestone's changes.

  • watcher_refreshes_the_blocked_work_indicator (crates/maestro-daemon/tests/session_manager.rs) failed on run 8 of 10 at --test-threads=8, asserting "an unchanged worktree must not re-emit SessionUpdated". Same file as #111 but a different mechanism: this one races the watcher's re-emit suppression, not the retained-store write.
  • a_foreground_pipeline_whose_leader_exited_is_still_awaiting_input (crates/maestro-daemon/tests/activity.rs) failed once under just test load, asserting "a surviving pipeline member still holds the tty".

Reproduce the way #111 did — run each repeatedly under --test-threads=8 rather than trusting a single green run — and fix the synchronisation rather than adding a sleep. #111's fix (wrapping the read in the same wait_for_async helper the neighbouring assertions use) is the pattern to follow where it applies.

These cost real time: a flaky daemon test makes every integration build in this repo a coin toss, and a red build that means nothing trains everyone to rerun instead of read.

A third, added after wave 4. natural_exit_of_a_pristine_worktree_removes_it (crates/maestro-daemon/tests/session_manager.rs) failed once for each of two independent sessions and passed on rerun both times. It is the sibling of the test #111 fixed — same natural-exit path, opposite case (pristine worktree removed rather than guarded worktree retained), and almost certainly the same race between observing Dead and the settle step finishing. #111's fix did not cover it.

#111 fixed one racy test and, while proving the fix over 30 runs, surfaced two more with the same signature — fail once under load, pass on rerun. Both are pre-existing and unrelated to this milestone's changes. - `watcher_refreshes_the_blocked_work_indicator` (`crates/maestro-daemon/tests/session_manager.rs`) failed on run 8 of 10 at `--test-threads=8`, asserting "an unchanged worktree must not re-emit SessionUpdated". Same file as #111 but a different mechanism: this one races the watcher's re-emit suppression, not the retained-store write. - `a_foreground_pipeline_whose_leader_exited_is_still_awaiting_input` (`crates/maestro-daemon/tests/activity.rs`) failed once under `just test` load, asserting "a surviving pipeline member still holds the tty". Reproduce the way #111 did — run each repeatedly under `--test-threads=8` rather than trusting a single green run — and fix the synchronisation rather than adding a sleep. #111's fix (wrapping the read in the same `wait_for_async` helper the neighbouring assertions use) is the pattern to follow where it applies. These cost real time: a flaky daemon test makes every integration build in this repo a coin toss, and a red build that means nothing trains everyone to rerun instead of read. **A third, added after wave 4.** `natural_exit_of_a_pristine_worktree_removes_it` (`crates/maestro-daemon/tests/session_manager.rs`) failed once for each of two independent sessions and passed on rerun both times. It is the sibling of the test #111 fixed — same natural-exit path, opposite case (pristine worktree removed rather than guarded worktree retained), and almost certainly the same race between observing `Dead` and the settle step finishing. #111's fix did not cover it.
naps62-yolo added this to the Sidebar cards milestone 2026-08-24 22:11:30 +01:00
naps62-yolo added the area/daemondifficulty/mediumtype/fix labels 2026-08-24 22:11:30 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: naps62/maestro#113