Repository navigation
spec(port): port the group context hash consistency guard (Refs #8883) - #9915
Merged
1 commit merged intoOct 17, 2026
Merged
1 commit merged into
1 commit merged into
Conversation
…ty-S-AI-DNA#8883) The tenth CR-CHAT-03 ring target (W3, R-CHAT-4): the group context consensus rules, in the original's order - the member floor (two), then per report the zero-epoch probe, the zero-hash probe, the duplicate-member probe and the reference-hash comparison against the first report - 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 GCHC tests transcribed plus helper and rule-order tests. The original's prose lists a hash-length rule with a WrongHashLength variant, but its hash is a fixed thirty-two-byte array and no code path ever answers it - the variant stays in the enum, declared and unreachable exactly as in the original. The member identifier widens from u32 to usize - t27's loop counters are usize and every fixture value fits both. The original's BTreeSet of seen identifiers becomes a scan over the reports already visited; the Option reference hash becomes a has-reference flag over the record fields. Checks (conventions 0-14): t27b test 14 passed 0 failed; t27c test-report 14/14, 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. Tenth CR-CHAT-03 target (10/47 T-PORT) — requesting owner merge when convenient, Refs #8883. |
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 tenth CR-CHAT-03 ring target (W3, tracker #8883, epic Trinity-S-AI-DNA/trios#1812): port of
crates/trios-chat/rings/CR-CHAT-03/src/group_context_hash_consistency_guard.rs(Wave-59 Lane B, R-CHAT-4).The group context hash pins the tree, the epoch and the membership; two members holding different hashes are a split-brain an attacker opens by tampering a Welcome, withholding an update path or injecting divergent commits. 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. Note: the original's prose lists a hash-length rule with a
WrongHashLengthvariant, but its hash is a fixed[u8; 32]array and no code path ever answers it — the variant stays in the enum, declared and unreachable exactly as in the original (the declared-unreachable convention).Adaptations (t27 conventions): member identifier widens from u32 to usize (t27's loop counters are usize; every fixture value fits both); the
BTreeSetof seen identifiers → scan over the reports already visited; theOption<&[u8; 32]>reference hash → has-reference flag over the record fields.All 10 original GCHC tests transcribed with exact asserts (including the 50-member loop and the mismatch-at-the-end fixtures), plus 3 helper tests and a rule-order ladder stacking all four per-report violations on one report (14 total).
Checks (conventions 0-14):
t27b test14 passed 0 failed, 0 blockers;t27c test-report14/14, 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 #8883