Skip to content

Live usage-limit stop tests give the monitor 0.3-0.5s and flake on loaded macOS runners #1439

Closed

Description

@JacobStephens2

This was generated by AI during triage.

CI run 40507532942 on main (41e0175, merge of #1430) failed in test-macos-shard (4): experiments::a_baseline_built_before_this_change_pauses_at_its_live_warning panicked at tests/experiments.rs:1649 with "the warned Trial kept working". Every other job passed, including Linux test.

  • It is a flake, not a regression. The Count a ready Pass and its ready dispatch on one pull request once (#1428) #1430 merge touches only src/logs/reading/tests.rs and tests/status.rs, and tests/experiments.rs last changed in 4d3ecfb (Experiments keep every Trial's repository copy and Harness cache after the Verdict #1360).
  • Cause: the fake agent prints an allowed_warning rate-limit event, sleeps 0.3s, then touches a marker file. The test asserts the marker is absent, so it depends on the outer monitor reading the log, signalling, and stopping the process tree in under 0.3s. output_until polls the monitor, and process::stop polls at 100ms (src/process/tree.rs:12). On a loaded macOS runner with ~780 tests in the shard, that loses the race.
  • The sibling test assert_older_arm_native_limits (tests/experiments.rs:1536) checks the same behavior with a 2s window and has not flaked.
  • Two tests/trial.rs tests have the same shape with a 0.5s window: sleep 0.5; touch '{escaped}' at about line 457 and line 491 (the Codex native-warning tests). They have not failed yet but share the risk.
  • Same class as Historical Rust pin Trial test times out on loaded macOS runners #1422: a test that checks behavior, not timing, gives a loaded macOS runner a sub-second budget.

Chosen fix

Widen the post-warning window in these three tests so the "agent continued after the warning" marker only appears if the monitor never stops the Trial, not if it stops it slowly. Use sleep 5 in place of sleep 0.3 / sleep 0.5 before the touch. The default Bar timeout is 1800s (src/evals/experiment.rs:88) and the trial.rs tests do not set a short one, so the timeout cannot hide a missed warning. A passing run is not slower: the monitor kills the agent during the sleep.

Leave the pre-warning sleeps (sleep 1.1 in trial.rs, which order timestamps) and the candidate Arm's sleep 0.1 alone.

Done when all three tests pass, and each still fails if the live limit check is disabled (for example by making Monitor::check return Ok(()) for the experiments test, and the matching live check for the trial.rs tests).

Activity

  1. added
    bug
    ready-for-agent
    on Oct 27, 2026
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

    bugready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions