You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c10e3a8
Browse filesBrowse the repository at this point in the historyBrowse files
test(remote): settle the slow-beat count on arrivals instead of a wall clock
The slow-link case sampled `beatArrivals.length` at a fixed 4.5s and asserted 2.
Both directions of that number depended on event-loop timing: a stall over the
margin between the first answer landing and the assumed cadence arming a third beat
read as three beats, and a stall long enough to keep the second beat out of the
sample read as one. Neither says anything about the loop under test.
The count now waits for the two beats it expects, then keeps watching through a
quiet window of two assumed cadences and returns what arrived. A loop that budgets a
beat at its cadence is still arriving throughout that window and is counted, not
awaited; a loop that moved to the window it just renewed is silent until ten seconds
in. A runner stall delays the read instead of moving a beat across it. Verified by
mutation both ways: budgeting the beat at its interval reports 4 beats, and arming
the opening beat late fails with "only 0 of 2 beats arrived" rather than hanging to
the lane timeout. The assumed cadence is derived from MIN_LEASE_WINDOW_MS instead of
restated, so it cannot drift from what the loop actually assumes.
0 commit comments