Repository navigation
spec(port): port the traffic volume correlation guard (Refs #8887) - #9871
Merged
1 commit merged intoOct 17, 2026
Merged
1 commit merged into
1 commit merged into
Conversation
…-AI-DNA#8887) The thirty-third CR-CHAT-07 ring target (W2, R-CHAT-10): the window volume rules - the window ceiling (one hundred twenty-eight), the emission floor (four), the per-emission zero probe, single-emission ceiling (sixteen thousand three hundred eighty-four) and narrow volume band (seven hundred sixty-eight to twelve hundred eighty), then the standard-deviation ceiling over the window - as the D5 verdict (all six original variants carry no payload, so the code is the whole verdict), the original's rule order, and all ten TVCG tests transcribed plus the rule-order test. The original's standard-deviation ceiling is float arithmetic - the f64 mean, variance and sqrt against 256 * 0.9. t27 has no int-to-float cast, so the check is re-based to the exact rational form in pure u64: with S the volume sum, n the window length and W the fold of squared deviations |v*n - S| squared, the variance is W/n^3 exactly and the ceiling fires exactly when 25*W > 1327104*n^3, because (256*0.9)^2 is 1327104/25. The f64 original rounds only within a band of relative width about 1e-16 around the boundary; no original test sits there (the accepted boundary fixture answers a standard deviation of one hundred eighty-one, the rejected one two hundred fifty-six, against the cut of two hundred thirty point four). The original's saturating low bound never saturates at its constants and ports as the plain band edge. Checks (conventions 0-14): t27b test 11 passed 0 failed; t27c test-report 11/11, 0 vacuous; gen-rust output compiles under rustc; coverage Untested 0; ASCII only; seal saved, all hashes MATCH;
Contributor
Author
|
All required checks green (validate, check-linked-issue, parse-ratchet, t27b-native-linux, t27b-native-macos); cli-tri / duplicate-bodies / t27b-native-ratchet are the known non-required reds. Steward READY. Requesting owner merge when convenient — 33 of ~34 CR-CHAT-07 targets delivered, Refs #8887. |
This was referenced Oct 17, 2026
Merged
Merged
Merged
This was referenced Oct 17, 2026
Merged
Merged
gHashTag
enabled auto-merge (squash)
October 17, 2026 18:14
This was referenced Oct 17, 2026
gHashTag
disabled auto-merge
October 17, 2026 18:42
This was referenced Oct 17, 2026
spec(policy): l2_generation -- gen/json/ is t27c gen-json's backend directory (Closes #10079)
#10082
Merged
Merged
Merged
Merged
12f5af8
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.
The thirty-third CR-CHAT-07 ring target (W2, R-CHAT-10, tracker #8887): port of
crates/trios-chat/rings/CR-CHAT-07/src/traffic_volume_correlation_guard.rs.An attacker watching wire volume per unit of time reads an active user off an idle one whenever the active user sends more; the defense holds the real-plus-cover volume of every window near a constant. Rules, in the original's order:
Carried as the D5 verdict — all six original error variants carry no payload, so the code is the whole verdict.
Adaptation (t27 conventions): the original's standard-deviation ceiling is float arithmetic (f64 mean, variance, sqrt against
256 * 0.9); t27 has no int-to-float cast, so the check is re-based to the exact rational form in pure u64 — with S the volume sum, n the window length and W the fold of squared deviations |v·n − S|², the variance is W/n³ exactly and the ceiling fires exactly when25·W > 1327104·n³, because (256·0.9)² = 1327104/25. The f64 original rounds only within a band of relative width ~1e-16 around that boundary; no original test sits there (accepted boundary fixture: stddev 181; rejected fixture: stddev 256; cut: 230.4).All 10 original TVCG tests transcribed with exact asserts, plus a rule-order test (11 total): the window ceiling answers over a flooded window of zero volumes; the zero probe, the single ceiling and the band each answer on all-violation fixtures.
Checks (conventions 0-14):
t27b test11 passed 0 failed, 0 blockers;t27c test-report11/11, 0 vacuous; gen-rust output compiles under rustc (0'static str, 0Vec<const); coverage Untested 0; ASCII only; seal saved, all hashes MATCH; ledger row added todocs/reports/t27b_expectations.json.Refs #8887