Repository navigation
Make the hold-probe test actually depend on the exemption - #21
Merged
Merged
Conversation
The test added with the exemption did not pin it. Peer and probe both ran on a 60s step, so the first probe to land set `hist.last()` to its own timestamp and the next one was admitted by the ordinary throttle on the boundary — `last.t > now - INTERVAL` is false at equality. The session sustained its own cadence, the peer never got the slot back, and from the second write on the exemption was not what kept the probes landing. Verified rather than reasoned: an exemption that fired twice and then did nothing passed that test unchanged. Only removing it outright failed, which is the regression least likely to happen and the one a reviewer would catch anyway. The peer now writes one second before each probe on a 61s step, so at every probe the session's own last sample is 61s old — opening the per-session gate — while the shared slot was taken a second ago, so the ordinary throttle would refuse it. Each probe lands only on the exemption. The partial break now fails (5 samples against 40+), as does removal (3). Also narrows the gate from "the counter differs" to "the counter climbed", so it agrees with what `hold` accepts as proof: `hold` releases on `u > first_move`, so a slot spent on a counter that went down buys evidence the release can never use. Unreachable with real cumulative counters; it stops the two rules disagreeing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #20. The test that shipped with the exemption did not pin it.
Peer and probe both ran on a 60s step, so the first probe to land set
hist.last()to its own timestamp and the next was admitted by the ordinary throttle on the boundary —last.t > now - INTERVALis false at equality. The session sustained its own cadence, the peer never regained the slot, and from the second write onward the exemption was not what kept the probes landing.This was found by mutation, not inspection: an exemption that fired twice and then did nothing passed the old test unchanged. Only outright removal failed it — the regression least likely to occur, and the one review would catch anyway.
hold, which releases onu > first_move. A slot spent on a counter that went down buys evidence the release can never use. Unreachable with real cumulative counters; it stops the two rules disagreeing.Test plan
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo build,cargo test --all(85 passed)got 5against the 40+ the schedule produces). This is the regression the old test could not see.got 3)