Skip to content

tests: test wait and timing audit follow-up #2219

Todo

Description

@eric8810

Context

Tracking issue for the static test wait/timing audit of 5,331 Rust test functions in crates/, tests/ and xtask/ on 2026-11-26.

Full inventory: test-wait-audit.md

The audit is mechanical. It was sampled (43 rows; 7 suspicious items checked) and the classifier was corrected for production-code sleeps, comment text, let elapsed bounds, long while conditions and loop-body scope. It has not been reviewed row by row; E / E? / X / T / S are keyword and context matches.

Counts

Set Count
Parsed test functions 5,331
Listed rows 1,566
Direct/helper sleep 1,133
E (in-process state poll) 697
E? (one-shot/generic in-process wait) 121
N (absence assertion after sleep) 33
X (external process/file/CLI poll) 183
M (machine-sensitive time constraint) 327
D (debug-only) 39
P (measurement/benchmark) 4
G (hang guard only) 472
O (unclassified) 90

Follow-ups

Method

  • Inventory generated by parsing test bodies, direct sleep calls, in-scope sleep-bearing test helpers, timeout calls and elapsed() comparisons.
  • Helper calls resolve only inside the same test scope; production methods in src/ are excluded.
  • M is not assigned to tests whose only time control is start_paused, unless the same test also has a real bound or a short timeout.
  • G covers soon/patient and explicit timeouts above 5 s.

Out of scope

First wave

The per-issue batching tables are in #2215, #2216 and #2217.

Not planned

Activity

  1. self-assigned this
    on Nov 26, 2026
  2. eric8810 commented on Nov 26, 2026

    @eric8810
    CollaboratorAuthor

    Baseline and rough impact estimate for the four child issues.

    Baseline (last 300 ci.yml runs in the local gh run list window, 2026-10-30 to 2026-11-26):

    • 135 success, 60 failure, 99 cancelled, 6 queued/blank.
    • Completed-run failure rate: 60 / 195 = 30.8%.
    • Pull requests: 37 / 158 = 23.4%.
    • Pushes to main: 18 / 32 = 56.2%.
    • Cancelled runs are excluded from the rate; they are superseded runs, not failures.

    Sample of 28 failed runs with logs:

    • 7 / 28 (25%) were compile, static-check, Web or unknown failures with no failing Rust test.
    • 21 / 28 (75%) were test failures.
    • 6–7 / 28 (21–25%) had only or mostly wait/timing-related failures: minimal_execution occupying bursts, managed_oauth_flow, daemon_replace two-starting-clients, extensions startup timeout, agents::sessions initialization timeout, MCP handshake timeout.
    • Recurring failures not covered by the current flags include fork_checks_rest_points_without_scanning_completed_history (5 runs; its 30 s wait lives in a helper) and extensions::missing_dependency... (2 s builder timeout). So the timing share above is likely a lower bound.
    • A separate cluster is xtask scenario_eval: 6 / 28 runs, including two runs with ~46 failures. These are eval-tool tests, not the four issues below.

    Estimate:

    • If the fixes remove 10% of current failed runs: PR 23.4% → ~21.1%, main push 56.2% → ~50.6%.
    • If they remove 15–20%: PR → ~18.7–19.9%, main push → ~45.0–47.8%.
    • If they remove 25–30% (all timing-only runs): PR → ~16.4–17.6%, main push → ~39.3–42.2%.

    A realistic range for the four issues is 10–20% relative reduction in completed failure rate (roughly 2–4 points on PRs, 6–11 points on main pushes), assuming the fixes cover 50–80% of the timing-only failures. The effects are not additive: E/M overlap heavily, and D/P mainly remove wall time unless the debug-only tests are the ones failing.

    The estimate excludes:

    • deterministic test failures and compile/check/web failures;
    • the scenario_eval cluster, which is outside these four issues;
    • waits hidden in helpers or builder timeouts that the audit does not flag.
  3. added
    roadmap
    P2
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2roadmap

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions