codex_app_server lib tests are load-flaky on macOS — fail in full-suite runs, pass in isolation
Environment
- macOS arm64 (Darwin), rust via nixpkgs (cargo/rustc 1.94-era toolchain)
cargo test -p st2 --lib, repo main d29c37f2
- Linux x86_64: not observed to flake (343/343 across many runs)
Rate
Full suite, 3 consecutive runs:
| run |
result |
failing test |
| 1 |
336 passed, 1 failed |
process_group_cleanup_reaps_a_native_launcher_descendant |
| 2 |
337 passed, 0 failed |
— |
| 3 |
336 passed, 1 failed |
process_group_cleanup_reaps_a_native_launcher_descendant |
Both known-flaky tests pass deterministically in isolation (each looped 10×: ok=10 fail=0):
codex_app_server::tests::process_group_cleanup_reaps_a_native_launcher_descendant
codex_app_server::tests::subscribed_control_pump_delivers_a_typed_reference_to_the_real_fifo_head
Panics observed
thread 'process_group_cleanup_reaps_a_native_launcher_descendant' panicked at src/codex_app_server.rs:4591:
called `Result::unwrap()` on an `Err` value: ParseIntError { kind: Empty }
thread 'subscribed_control_pump_delivers_a_typed_reference_to_the_real_fifo_head' panicked at src/codex_app_server.rs:3180:
assertion `left == right` failed
left: Attempted
right: Accepted
Hypothesis (to confirm)
The first smells like parsing external process output (ps-style) before it is fully written — an empty read mid-write becomes "".parse::<u32>(). The second looks like asserting a state transition (Attempted → Accepted) without waiting for it, i.e. sleep/yield-based synchronization racing the pump under load.
codex_app_serverlib tests are load-flaky on macOS — fail in full-suite runs, pass in isolationEnvironment
cargo test -p st2 --lib, repo maind29c37f2Rate
Full suite, 3 consecutive runs:
process_group_cleanup_reaps_a_native_launcher_descendantprocess_group_cleanup_reaps_a_native_launcher_descendantBoth known-flaky tests pass deterministically in isolation (each looped 10×:
ok=10 fail=0):codex_app_server::tests::process_group_cleanup_reaps_a_native_launcher_descendantcodex_app_server::tests::subscribed_control_pump_delivers_a_typed_reference_to_the_real_fifo_headPanics observed
Hypothesis (to confirm)
The first smells like parsing external process output (
ps-style) before it is fully written — an empty read mid-write becomes"".parse::<u32>(). The second looks like asserting a state transition (Attempted→Accepted) without waiting for it, i.e. sleep/yield-based synchronization racing the pump under load.