Skip to content

Flaky timer_precision on loaded CI hosts (Windows 756µs; WASI 0.3 2.31ms) #30

Closed

Description

@proggeramlug

timer_precision (crates/turnloop-contract/src/native_surface.rs) failed on windows-2025 default mode in main CI run 34947726746 (commit 7e367cd):

timer precision exceeded platform bound: median lateness 756.2µs

It passed on the same code in the PR run minutes earlier, and on every other recent run. A failing main CI also skips the release workflow, which is how this blocked publishing 0.1.0-alpha.3 until the job was re-run.

The same test also failed once on WASI 0.3 during #22 (median 2.31 ms against a 2 ms bound, host load average 150–180), and passed on rerun.

Options to consider, without weakening the bound for a quiet host:

  • measure the platform's achievable precision once at test start (a short calibration) and compare against that, failing only on a real regression;
  • report the distribution (p50/p90/max) and require the median only, with a documented allowance when the host is demonstrably loaded;
  • retry a bounded number of times and fail only if the median stays out of bound.

Whatever is chosen must still fail when the backend genuinely loses timer precision (prove it by mutation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions