Flake batch 13: bash_watch restart tests retry the post-replay scan

Merged
AF
12h ago
+48-4

Two tests added by #911 (each_line_once_warning_stays_armed_through_ack_and_restart and the acknowledged/unacknowledged replay test) failed in merge-queue groups (Linux and macOS) with Option::unwrap() on an empty frame list: after a simulated restart, a single scan of new output emitted no match.

scan_task_watch_output's early returns never persist a cursor, so a scan that returns without emitting leaves the bytes for production's watchdog to rescan on its next pass. The tests scanned exactly once. They now retry the scan for up to 10 s and, if no match ever arrives, fail with the watch count, running state and cursors, so a real miss still fails and names its state.

Verified: both tests 15x each under concurrent bash_background load on Linux (30/30), and the bash_background lib tests (838 passed). A 6 s pause before the final scan also passed, which rules out task exit at scan time.


Summary by cubic

Fixes two flaky bash_watch restart tests that failed intermittently in merge-queue groups with Option::unwrap() on an empty frame list.

After a simulated restart, a single scan could return without emitting a match because early returns never persist a cursor, so the watchdog rescans the same bytes on its next pass. The tests now retry the post-replay scan for up to 10 s and, on timeout, fail with the watch count, running state, and cursors — a real miss still fails and names its state. Also adds a test-only benchmark slice descriptor.