Skip to content

spec(port): port the traffic volume correlation guard (Refs #8887) - #9871

Merged
1 commit merged into
Trinity-S-AI-DNA:masterfrom
dmitrii-f-t27:port/cr-chat-07-ah
Oct 17, 2026
Merged

1 commit merged into
Trinity-S-AI-DNA:masterfrom
dmitrii-f-t27:port/cr-chat-07-ah

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Contributor

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:

  • window ceiling (128), emission floor (4),
  • per emission: zero probe, single-emission ceiling (16384), narrow volume band ([768, 1280] around the expected 1024; the original's saturating low bound never saturates at its constants),
  • standard-deviation ceiling over the window.

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 when 25·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 test 11 passed 0 failed, 0 blockers; t27c test-report 11/11, 0 vacuous; gen-rust output compiles under rustc (0 'static str, 0 Vec<const); coverage Untested 0; ASCII only; seal saved, all hashes MATCH; ledger row added to docs/reports/t27b_expectations.json.

Refs #8887

…-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;
@dmitrii-f-t27

Copy link
Copy Markdown
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
@gHashTag
gHashTag enabled auto-merge (squash) October 17, 2026 18:14
@gHashTag
gHashTag disabled auto-merge October 17, 2026 18:42
@gHashTag gHashTag closed this pull request by merging all changes into Trinity-S-AI-DNA:master in 12f5af8 Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants