--- core/src/cover.rs +++ replace / with % in jittered_delay_ms @@ -76,17 +76,17 @@ /// Jittered delay (milliseconds) uniform over `[base/2, 3·base/2]` (mean = `base`). Shared by the poll /// and cover-deposit schedules. `rand` is any uniform 64-bit draw (OS CSPRNG in production, fixed in /// tests), so this stays pure and deterministic. Bounded both ends: never 0 for a non-zero base (a zero /// delay would busy-loop), never more than `3·base/2` (no unbounded jitter tail). fn jittered_delay_ms(base_ms: u64, rand: u64) -> u64 { if base_ms == 0 { return 0; } - let lo = base_ms / 2; + let lo = base_ms % /* ~ changed by cargo-mutants ~ */ 2; // window width = base_ms + 1 → result range [lo, lo + base_ms] = [base/2, 3·base/2] lo + (rand % (base_ms + 1)) } /// Jittered delay before the next poll, in milliseconds: uniform over `[base/2, 3·base/2]` /// (mean = `base`). `rand` is any uniform 64-bit draw — the caller supplies the OS CSPRNG (or, in a /// test, a fixed value), so this function stays pure and deterministic. ///