Flaky: harness_embed 100-concurrent-turn 20s budget times out under hosted llvm-cov
Summary
openhuman-embed tests/harness_embed.rs::a_harness_runs_a_turn_against_the_provider_it_was_given flaked on main in the hosted llvm-cov coverage lane. The same test passed on a re-run of the same commit. Its 20-second budget for 100 concurrent turns is too tight for an instrumented build on a shared hosted runner.
Evidence
Same commit, main 7d8a4c83e, CI Lite run 36459897204, job "Rust Core Coverage (cargo-llvm-cov)" → step "Run complete root Rust suite with cargo llvm-cov" (scripts/ci/rust-coverage.sh, product features):
- Attempt 1: failed. https://github.com/tinyhumansai/openhuman/actions/runs/36459897204/attempts/1
panicked at crates/openhuman-embed/tests/harness_embed.rs:173:14: 100 concurrent turns did not settle within 20 seconds: Elapsed(()) panicked at crates/openhuman-embed/tests/harness_embed.rs:237:10: library host task did not panic: JoinError::Panic(..., "100 concurrent turns did not settle within 20 seconds: Elapsed(())", ...) - Attempt 2: passed, same commit (job 109089246347):
test a_harness_runs_a_turn_against_the_provider_it_was_given ... ok. https://github.com/tinyhumansai/openhuman/actions/runs/36459897204/attempts/2
The same test also passed:
- in main's previous coverage run (
cef43b2d8); - in the non-instrumented "Test embedding facade" step at
7d8a4c83e; - on the EX63 nextest PR runs of both changes merged in between: #6749 (run 36444406791) and #6754 (run 36452723650).
So this is not a regression from those merges; it is instrumentation and runner timing.
Where the budget is
crates/openhuman-embed/tests/harness_embed.rs on main:
:154-157spawns 100 turns into aJoinSet;:165wraps them intokio::time::timeout(Duration::from_secs(20), …), which fails with the:173message;:177assertselapsed < Duration::from_secs(20)again.
Neither the passing nor the failing run records the actual duration. :175's eprintln! is captured for a passing test, and the timeout fires before it in a failing one. So the real headroom is unknown.
Suggested direction (maintainer's call)
The test mixes a correctness check (100 concurrent turns all settle and 102 requests reach the provider, :192) with a latency budget. Options, least to most invasive:
- Print the elapsed time on both paths, so the next flake shows the actual headroom.
- Scale or relax the budget when the build is instrumented (the llvm-cov run sets
LLVM_PROFILE_FILE/RUSTFLAGSwith-C instrument-coverage), or read the budget from an env var the coverage lane raises. - Keep correctness in this test, and move the latency assertion to a benchmark or a non-instrumented lane.
No product code is implicated.
Flaky test: harness_embed 100-concurrent-turn timeout under coverage instrumentation on shared hosted runner
Labelled priority: p2.
Picking this one up. The plan is to keep what the test actually proves — that the hundred turns overlap instead of running one after another — while giving it a much wider margin, so an instrumented build has room to be slow without the check losing its teeth.