Skip to content

spec(port): port the traffic shaping burst uniformity guard (Refs #8887) - #9870

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

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

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Contributor

The thirty-second CR-CHAT-07 ring target (W2, R-CHAT-7, tracker #8887): port of crates/trios-chat/rings/CR-CHAT-07/src/traffic_shaping_burst_uniformity_guard.rs.

Traffic shaping hides message sizes by batching into uniform bursts; a non-uniform batch lets an observer tell padding from real traffic, fingerprint the user by timing and count messages by size. Rules, in the original's order:

  • count floor (2), count ceiling (256),
  • first burst's size floor (64) and ceiling (65536),
  • per-burst size walk: a size differing from the first answers before that burst's own floor and ceiling,
  • interval uniformity walk over batches of 3+ (every inter-burst gap must equal the first).

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 i64 gap subtraction is re-based additively — gap(i) equals gap(0) exactly when ts[i+1] + ts[0] == ts[1] + ts[i], pure u64 addition with no subtraction to underflow. A dedicated test pins the preserved edge semantics: a uniformly decreasing batch has equal negative gaps in the original and stays accepted.

All 10 original TSBU tests transcribed with exact asserts, plus the re-basing edge test and a rule-order test (12 total): the count floor answers over a single tiny burst; the count ceiling answers over a flooded batch of tiny bursts; the first burst's size rules answer before the per-burst walk; the non-uniform probe answers before that burst's own floor; the size walk answers before the interval walk ever reads a timestamp.

Checks (conventions 0-14): t27b test 12 passed 0 failed, 0 blockers; t27c test-report 12/12, 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

…nity-S-AI-DNA#8887)

The thirty-second CR-CHAT-07 ring target (W2, R-CHAT-7): the
shaped-burst uniformity rules - the count floor (two), the
count ceiling (two hundred fifty-six), the first burst's size
floor (sixty-four) and ceiling (sixty-five thousand five
hundred thirty-six), the per-burst size walk (a size
differing from the first answers before that burst's own
floor and ceiling), and the interval uniformity walk over
batches of three or more - 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 TSBU tests
transcribed plus re-basing and rule-order tests.

The original casts timestamps to i64 to subtract the gaps; the
gap equality is re-based additively - gap(i) equals gap(0)
exactly when ts[i+1] + ts[0] equals ts[1] + ts[i], pure u64
addition - and a dedicated test pins the preserved edge: a
uniformly decreasing batch stays accepted, as with the
original's equal negative gaps. Batches of two skip the
interval walk exactly as the original's length-three gate.

Checks (conventions 0-14): t27b test 12 passed 0 failed; t27c
test-report 12/12, 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 — 32 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