--- core/src/cover.rs +++ replace jittered_delay_ms -> u64 with 1 @@ -73,22 +73,17 @@ /// identical to a real one-bucket envelope. const COVER_ENVELOPE_OVERHEAD: usize = 24; /// 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; - // window width = base_ms + 1 → result range [lo, lo + base_ms] = [base/2, 3·base/2] - lo + (rand % (base_ms + 1)) + 1 /* ~ changed by cargo-mutants ~ */ } /// 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. /// /// Bounded on both ends: never 0 for a non-zero base (a zero delay would busy-loop) and never more /// than `3·base/2` (a message is never delayed by an unbounded jitter tail).