wai: a from-rest burst asserted a 2 ms race, and linux-arm64 called it #192

Merged
dcharlot merged 1 commit from fix/wai-burst-race-assertion into main 2026-10-09 02:49:10 -04:00

2026-10-08

Transaction Science
wai: a from-rest burst asserted a 2 ms race, and linux-arm64 called it
All checks were successful
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 4s
no-vanity-metrics / WAI public text names no comparison (pull_request) Successful in 4s
no-vanity-metrics / WAI public text names no company or product (pull_request) Successful in 3s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m14s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m7s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m56s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m27s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m32s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m34s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 3m6s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m23s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 5m31s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 11m44s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 23s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 26m28s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 11s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 41s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 1m16s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 2m55s
wai-pack / wai-pack · linux (pull_request) Successful in 1m49s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 2m59s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 26s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 2m3s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 4m36s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m47s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 5m9s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 10m42s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 28s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 3m4s
wai-pack / wai-pack · macos (pull_request) Successful in 2m11s
`a_from_rest_burst_counts_only_work_begun_inside_the_window` asserted, inside
the sampler callback, that at most one unit of work per worker had begun by the
instant the window opened:

    assert!(begun <= 3, "no more than one unit per worker can have begun");

Nothing in `burst_from_rest` entails that. Once the barrier releases, each
worker increments the counter and sleeps 2 ms; the caller then calls the
closure. For `begun` to exceed the worker count the caller need only be
descheduled for longer than that 2 ms at exactly this point. It is a race the
test does not control, not a property of the code under test.

A contended host duly called it: the assertion failed on the `linux-arm64`
runner — a colima VM on a box at load 173 — while every other platform passed.
I could not reproduce it here, including under 28 competing busy loops, so this
is reasoned from the code and the CI log rather than from a local repro, and
that is the honest basis for it. The argument does not need one: an assertion
nothing establishes can fail without a defect, and the failing run is evidence
that it does.

The quantity is now recorded rather than asserted — it printed 2 on the first
local run, already below the old bound, which is the variance the bound was
pretending to constrain.

Nothing is lost. What the test establishes about starting from rest is asserted
elsewhere and does not depend on the scheduling: the window opened `FromRest`,
every worker was in flight, and completions never exceed starts by more than the
worker count. That last one bounds a *difference* by the worker count instead of
asserting an instant arrived before a sleep finished, so it holds however the
host schedules — and it now says what it saw when it fails.

This is the fifth copy of this family in the repo. `eoc-meter`,
`jouleclaw-energy` (#166), `proof-cascade` and `sandbox-meter` (#181) each put a
floor on something the host's scheduler controls; this one puts a ceiling on how
much work fits in an interval it does not control. Same mistake, opposite
direction.

wai-rs lib: 187 passed, clippy clean on the touched file. Pre-existing and
untouched by any branch of mine — it surfaced on #183 only because a rebase
fires every path-filtered workflow (#191).

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-10-08 14:36:19 -04:00