GeezerVison is showing github.com — Load-flaky tests in the Nix check phases: atlas cli_parity qvec race, fleet-queue marker_search family, fleet-proxy connect_udp EINTR · Issue #8573 · developing-today/code
Load-flaky tests in the Nix check phases: atlas cli_parity qvec race, fleet-queue marker_search family, fleet-proxy connect_udp EINTR #8573DescriptionFound during the code#8392 build-efficiency work (2026-11-11, laptop load average 6–30 while the fleet was building): the test suites that run inside the Nix check phases fail intermittently under load, a different timing-sensitive test each run, in both build systems (monolithic buildRustPackage and the crane split alike — including a pristine monolith build of base 1670d42). Every failure passed on a later retry. This is a test-robustness problem, not a build-system problem, but it taxes every Nix build: each occurrence costs a full package rebuild (~3 min) and teaches people to ignore red builds.
Observed failures, all 2026-11-11:
- pkgs/atlas-search —
crates/atlas-search/tests/cli_parity.rs: a spawned CLI reads its qvec JSON file empty (ATLAS_SEARCH_QVEC_FILE: bad JSON vector in /build/atlas-cli-qvec-<pid>.json: EOF while parsing a value at line 1 column 0). Failed tests across runs: cli_wires_rrf_and_signal_weights, cli_search_envelopes_match_python, raw_mode_does_not_widen_the_sensitivity_ceiling. The file is written by a helper and read by the CLI with no completion handshake — under load the read wins the race.
- pkgs/fleet, fleet-queue client —
crates/fleet-queue/src/client.rs marker_search_* family: four different siblings failed across four runs (marker_search_empty_result_is_checked_absent, marker_search_404_is_could_not_check_not_absent, marker_search_failed_candidate_readback_is_could_not_check, + one more), 241 passed / 1 failed each time, the binary finishing in 0.15s. Looks like a shared-fixture timing assumption in the marker-search tests.
- pkgs/fleet, fleet-proxy —
connect_udp::tests::dead_target_keeps_the_session_open panicked with Interrupted system call (os error 4) at crates/fleet-proxy/src/connect_udp.rs:1109, twice, while 79 sibling tests passed.
Suggested shape of the fix: for (1), write the qvec file atomically (write-then-rename) or have the reader retry on empty/partial JSON; for (2), find the shared assumption (wall-clock deadline? file visibility?) and make it deterministic; for (3), retry on EINTR in the test's syscall path or lengthen the deadline under cfg(test) load. Each test should also print the load/timing context when it fails this way, so the next occurrence is diagnosable from the log alone. Activitydeveloping-today commented on Nov 11, 2026 dezren39 commented on Nov 17, 2026
🤖 Agent note · triaged — task 18691 (lane code-a)
- Work kind: task/small-fix · Priority: priority/normal (priorities brief line 5, by usefulness) · Effort: effort/s (one file's EINTR handling + one test) · Kind: kind/test (added — test robustness)
- Fresh state (2026-11-17): issue Load-flaky tests in the Nix check phases: atlas cli_parity qvec race, fleet-queue marker_search family, fleet-proxy connect_udp EINTR #8573 OPEN, label epic/atlas-program only, no hard-stop labels, only comment is the Kaneo link — never triaged, never worked. All three filed legs re-verified against origin/main 87ff4a1:
- Leg 1 — atlas cli_parity qvec race: ALREADY FIXED.
qvec_file() in pkgs/atlas-search/crates/atlas-search/tests/cli_parity.rs is now a write-once OnceLock shared path; its comment describes this exact race (parallel tests, mid-truncate read, empty-JSON error).
- Leg 2 — fleet-queue marker_search family: ALREADY FIXED. All six
marker_search_* tests in pkgs/fleet/crates/fleet-queue/src/client.rs take GH_STUB_LOCK around their stub-gh spawns — the 2026-11-12 serialization fix for the process-spawning flake family (fix(fleet-queue): outbox marker search is a POST that always 404s and a failed lookup counts as 'absent' — every uncertain entry is re-created #8361).
- Leg 3 — fleet-proxy connect_udp EINTR: STILL LIVE.
pkgs/fleet/crates/fleet-proxy/src/connect_udp.rs has zero Interrupted handling, the file is unchanged since 2026-11-06 (before this filing), and dead_target_keeps_the_session_open (line 1172) unwraps connect/send and asserts recv errors are only WouldBlock|TimedOut — an EINTR under load still panics it, exactly as filed.
- First concrete step for the fix: add EINTR retry (
ErrorKind::Interrupted → retry) to the UdpProxyClient send/recv paths in connect_udp.rs, following the in-crate pattern at raw_stream.rs:55, and make the test treat a residual Interrupted as retryable without weakening its pinned behaviour.
- Acceptance check: 20 consecutive parallel runs of the fleet-proxy connect_udp tests with zero Interrupted failures + a full pkgs/fleet test pass; then Load-flaky tests in the Nix check phases: atlas cli_parity qvec race, fleet-queue marker_search family, fleet-proxy connect_udp EINTR #8573 closes (all three legs dispositioned).
- Follow-on: task 20175 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:8573; packet hidden_files/18691-fix-packet-8573.json). Issue stays OPEN until the fix lands.
dezren39 commented on Nov 17, 2026 🤖 Agent note · done (item 3 remainder) — EINTR tolerance landed
- Agent: repo-worker-code, lane any-h, task 20175
- Landed: PR fix(fleet-proxy): retry socket reads on EINTR in the UDP client (#8573) #11260 merged (merge commit 62193bf).
- Fix: UdpProxyClient::recv and UdpProxyReceiver::recv read the session socket with a bare read(), so EINTR surfaced as a session error (the dead_target_keeps_the_session_open panic, os error 4). Both now go through a read_retrying helper that retries on ErrorKind::Interrupted — the same idiom as raw_stream's pump. New unit test read_retrying_tolerates_eintr pins it with an interrupted-first reader.
- Tests: fleet-proxy suite 110 passed + 14 passed, 0 failed.
- Reviews: Codex posted no review comments on the PR.
- This closes item (3) of this issue; items (1) atlas-search qvec race and (2) fleet-queue marker-search timing are separate remainders with their own tracks.
dezren39 commented on Nov 22, 2026 Merged work, still open. Every pull request that references this issue has merged (#8849, #11260) and none is open, but the issue kept status:in-review. Tasks that name it as a blocker have been waiting on it.
status:in-review is removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").
By: Claude, 2026-11-22 flow review.
Generated by Claude Code dezren39 commented on Nov 23, 2026
🤖 Agent note · claimed — lane-eo (archer, sandbox fix lane)
Taking the done check the 2026-11-22 flow review prescribed: verify all three legs' fixes on current main, then run the triage acceptance — 20 consecutive parallel runs of the fleet-proxy connect_udp tests with zero Interrupted failures + a full pkgs/fleet test pass. Close if it passes; list what's left if not. dezren39 commented on Nov 23, 2026
🤖 Agent note · done — lane-eo (archer). Done check PASSES on current main; closing.
Ran the acceptance the 2026-11-17 triage prescribed, first-hand, on the laptop in a fresh worktree off origin/main @ 4c01d0497c7, under genuine load (load average 17–25 throughout — the condition that used to trigger these flakes):
- Leg 1 — atlas cli_parity qvec race: fix present (
qvec_file() write-once OnceLock shared path, cli_parity.rs:79–87). cargo test -p atlas-search --test cli_parity → rc 0, 11 passed / 0 failed.
- Leg 2 — fleet-queue marker_search family: fix present (all six
marker_search_* tests serialized on GH_STUB_LOCK). In the full pass below, every marker_search test is ok, including marker_search_empty_result_is_checked_absent, marker_search_404_is_could_not_check_not_absent, and marker_search_failed_candidate_readback_is_could_not_check — the three siblings named in the filing.
- Leg 3 — fleet-proxy connect_udp EINTR: fix present (
read_retrying helper retrying on ErrorKind::Interrupted, connect_udp.rs:690, used by both recv paths; unit test read_retrying_tolerates_eintr pins it; landed via PR fix(fleet-proxy): retry socket reads on EINTR in the UDP client (#8573) #11260). 20 consecutive parallel runs of cargo test -p fleet-proxy connect_udp: 20/20 rc 0, 16 passed each, zero Interrupted mentions.
- Full pkgs/fleet test pass:
cargo test --workspace → rc 0, 1086 passed, 0 failed; plus cargo test -p fleet-queue --features queue-broker (so the turso_queue module actually runs instead of silently skipping) → rc 0, 518 passed, 0 failed.
All three legs are dispositioned with the fixes on main and the prescribed acceptance green, so this closes as completed. If a load-flake recurs in a Nix check phase, file it fresh with the failing run's log — the diagnostic-context suggestion in the original filing remains a good idea for that future issue, but it is not a blocker here: the triage acceptance for this issue was the 20× run + full pass, and both are green.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|