crates/mds-cli/tests/cli_watch.rs:4102-4111 (main 2b91850) polls every 20 ms and RETURNS whatever text it has when the timeout elapses instead of panicking. Any assertion that counts occurrences in its return value cannot distinguish "not arrived yet" from "wrong count". Related: i16–i20 sample stderr_tap.text() with no wait at all right after a file-content wait, and in dir mode the duplicate-key warning is emitted AFTER the output write (watch.rs:2021 after :1597), so the sample races the emit (i17 left 1, right 2 in run 34404318888). Fix direction (C2): a bounded wait_for_stderr_count(tap, needle, n, timeout) that panics with the text on timeout, followed by a joined finish_text for the exact count; migrate the count sites; keep or delete the vacuous helper. Refs #320.
crates/mds-cli/tests/cli_watch.rs:4102-4111(main2b91850) polls every 20 ms and RETURNS whatever text it has when the timeout elapses instead of panicking. Any assertion that counts occurrences in its return value cannot distinguish "not arrived yet" from "wrong count". Related: i16–i20 samplestderr_tap.text()with no wait at all right after a file-content wait, and in dir mode the duplicate-key warning is emitted AFTER the output write (watch.rs:2021after:1597), so the sample races the emit (i17left 1, right 2in run 34404318888). Fix direction (C2): a boundedwait_for_stderr_count(tap, needle, n, timeout)that panics with the text on timeout, followed by a joinedfinish_textfor the exact count; migrate the count sites; keep or delete the vacuous helper. Refs #320.