Skip to content

Flaky tests: fixed wall-clock deadlines in process supervision, exec transport and transfer tests #5672

Open

Description

@AdamRajfer

Four test families with fixed wall-clock deadlines fail intermittently in CI and pass on a re-run of the same commit. Between 2026-11-03 and 2026-11-05 they failed on at least ten unrelated pull requests, in the merge queue and on main, in each case without the change touching the code under test.

Tests

Test Where Failed in
test_only_detached_services_survive_harness_group_termination[*] (normal, grace, timeout, crash variants) tests/unit_tests/agents/test_process_supervisor.py, Core tests (shard 2) #5603, #4970, #4885, #5479, #5483, main
test_exec_only_supervision_leaves_task_children_for_sandbox_owner[*] (timeout, cancel, close) tests/test_exec_transport.py of opencode_agent, codex_agent and openclaw_agent #5603, #5661, #5487, merge queue (1, 2), main
test_missing_native_step_diagnostics_survive_http_close responses_api_agents/opencode_agent/tests/test_continuation.py #5603
test_optional_transfer_uses_remaining_budget_and_retains_reward[*] (download, archive) resources_servers/terminal_bench_4 #5595, #4813, #5481, #5537, merge queue

A re-run of the failed jobs passed on the same commit for #5603, #5595 and #5537. The same tests also pass in repeated local runs, at the PR heads and at main (#5603: 3 of 3 each).

Common cause: each test bounds a real process or sandbox operation with a fixed wall-clock deadline: a termination deadline, an exec timeout, an HTTP close, a transfer budget. The failure messages are timeouts or deadline errors ("termination deadline exceeded", TimeoutError) rather than wrong results. On a loaded runner the operation takes longer than the fixed budget, so the test fails without any change in behaviour.

Possible fix:

  • assert the ordering and the enforcement (the supervisor stopped at the deadline, children were left to the sandbox owner) instead of an absolute time window;
  • or derive each deadline from a baseline measured in the test, for example a multiple of a no-op exec;
  • or run these tests serially (an xdist_group or a marker), so they do not compete with the rest of the shard.

Similar to #5434, #5429 and #5433.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions