Skip to content

codex_app_server lib tests are load-flaky on macOS (pass isolated) #315

Description

@schickling

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 (AttemptedAccepted) without waiting for it, i.e. sleep/yield-based synchronization racing the pump under load.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions