You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flaky tests: agents::parent_spawns_child_polls_until_settled and compaction_e2e::doctor_warns_non_fatally_about_a_missing_window fail on a clean develop locally #702
Closed 2026-11-17. One real race was found and fixed (#884): the stand-in child of delegation::delegate::tests wrote env > file in place, a CI runner's environment is over 4 KiB so it is written in several chunks, and the test read a prefix (CI failure on #880, job no-mcp profile, assertion at delegate_tests.rs ~991). fake_reporter and the discussion reviewer_bin now write the record to a temporary name and rename it into place, and the lib tests remove their shared-delegate-data-* directory at exit. The other tests of this issue were NOT reproduced under taskset -c 0 with busy loops and --test-threads 16 to 32 (agents::parent_spawns_child_polls_until_settled and a_run_never_touches_the_machine_home 0/100, compaction_e2e 0/100, config_apply 0/100: its temp dirs no longer use reused pids, session_effort_e2e and wire_size_missions read and left alone). One harness note: the agents tests open the delegation load guard to its bound of 64 load per CPU, so a child is queued only above that, which a CI runner does not reach. Reopen with a failing CI run or a recorded stress failure if one of these tests flakes again. The TUI pty tests were fixed separately in #881 (#877).
Seen by several agents while working on #683, #681, #684 and #588 (PRs #697 to #701). CI Test passed every time; locally, on a clean develop checkout, both fail (one consistently under load on the shared build machine).
Tests
tole-cliagents::parent_spawns_child_polls_until_settled (also delegate::tests::an_independent_participant_is_a_consult_child_settled_with_its_report once under load).
Local gates are the contract agents run before pushing. Tests that fail on a clean develop make it impossible to tell a real regression from the environment, and they hide real failures.
Fix
Reproduce each (CPU-limited, --test-threads high, disk near full) and find the cause: fixed sleeps or timeouts, ports, shared temp names, wall-clock assumptions, environment such as a missing HOME or window size.
Replace sleeps with condition waits, per-test unique temp dirs (not pid-named), bounded and generous timeouts, no network or fixed ports.
Each fix keeps a test that fails without it (for example a deliberately slowed mock).
Do not skip, ignore or quarantine a test to get green.
Status 2026-11-15: the sleep-based waits of the tests named here were converted to the shared wait_until helper in #823 (merged), the nightly one-CPU workflow exists (#824) and is green on develop (run 43689185320), and #826 fixed a leak that only showed under starvation. No failure of these two tests was seen in the stress runs of #823, but one run is not proof: keeping this issue open; close it if the nightly stays green for a week.
Activity
test: fix the load-dependent failures of the agents, doctor and confi…
fix: wait out a transient writer-lock duplicate and make the lock and…
test: wait for conditions instead of fixed sleeps, shared wait_until …
ajianaz commentedon Nov 15, 2026
Status 2026-11-15: the sleep-based waits of the tests named here were converted to the shared
wait_untilhelper in #823 (merged), the nightly one-CPU workflow exists (#824) and is green on develop (run 43689185320), and #826 fixed a leak that only showed under starvation. No failure of these two tests was seen in the stress runs of #823, but one run is not proof: keeping this issue open; close it if the nightly stays green for a week.Generated by Claude Code
fix(delegation): probe a child's liveness once per recovery pass (#712)…
test: make the agent poll test really poll and stop short hand-rolled…
fix(test): wait for the TUI to be idle before the next input and drai…
fix(test): write the discussion reviewer stand-in's argv and env atom…
fix(test): write the fake reporter's argv and env atomically and clea…