Repository navigation
spec(port): port the ratchet tree extension tampering guard (Refs #8887) - #9868
Merged
1 commit merged intoOct 17, 2026
Merged
1 commit merged into
1 commit merged into
Conversation
…nity-S-AI-DNA#8887) The thirtieth CR-CHAT-07 ring target (W2, R-CHAT-12, RFC 9420 12.4.3.3): the Welcome ratchet_tree extension rules - the present-but-empty extension probe (a downgrade), the leaf-count pre-pass (the minimum-leaf floor, then the counted leaves against the welcomer's claim), then per node the index range over the derived node count, the duplicate-index probe and the leaf signature probe; blanks hold no index claim and skip - as the D5 verdict (all five original variants carry no payload, so the code is the whole verdict), the original's rule order, and all ten RTX tests transcribed plus helper and rule-order tests. The original's enum-with-payload tree nodes become a kind enum plus one record form; the Vec<u8> signature blob becomes the fixed [64]u8 capacity plus its length; the welcomer's view struct becomes the expected-leaf-count parameter; the BTreeSet of seen indices becomes a scan over the visited nodes that skips blanks. The original's saturating node count saturates only past two billion leaves - the port spells the saturated edge explicitly. The crate-Result convenience adapter stays with the crate; the core validator is what ports. Checks (conventions 0-14): t27b test 13 passed 0 failed; t27c test-report 13/13, 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 — 30 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:13
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 thirtieth CR-CHAT-07 ring target (W2, R-CHAT-12, tracker #8887): port of
crates/trios-chat/rings/CR-CHAT-07/src/ratchet_tree_extension_tampering.rs.RFC 9420 12.4.3.3 lets a Welcome message carry a
ratchet_treeextension so the joiner rebuilds the tree without a directory fetch. Five tamperings must reject before any key is derived, in the original's order:expected_leaf_count,node_count = 2*leaves-1, duplicate-index probe, leaf signature probe; blanks hold no index claim and skip.Carried as the D5 verdict — all five original error variants carry no payload, so the code is the whole verdict (burst precedent).
Adaptations (t27 conventions): enum-with-payload tree nodes → kind enum + one record form;
Vec<u8>signature blob → fixed[64]u8+sig_len; welcomer's view struct →expected_leaf_countparameter;BTreeSetof seen indices → visited-scan helper that skips blanks; the saturating node count saturates only past two billion leaves — the saturated edge is spelled explicitly; the crate-Resultconvenience adapter stays with the crate.All 10 original RTX tests transcribed with exact asserts, plus helper tests (
count_leaves,index_seen_before— the blank deliberately carries an unread index to prove blanks hold no claim) and a rule-order test (13 total): the empty extension answers even under a zero leaf claim; the leaf-count pre-pass answers before any index arithmetic (an over-range index never reaches its rule while the count is wrong); the index range answers before the duplicate and signature probes on the same leaf; the duplicate probe answers before the signature probe.Checks (conventions 0-14):
t27b test13 passed 0 failed, 0 blockers;t27c test-report13/13, 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