Skip to content

spec(port): land the CR-CHAT-03 wave 3 batch -- 23 targets (Refs #8883) - #10802

Merged
gHashTag merged 33 commits into
Trinity-S-AI-DNA:masterfrom
dmitrii-f-t27:port/cr-chat-03-wave3
Oct 22, 2026
Merged

gHashTag merged 33 commits into
Trinity-S-AI-DNA:masterfrom
dmitrii-f-t27:port/cr-chat-03-wave3

Conversation

@dmitrii-f-t27

@dmitrii-f-t27 dmitrii-f-t27 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Deliver the remaining CR-CHAT-03 targets of the 47-target ring (tracker #8883, epic Trinity-S-AI-DNA/trios#1812) as one ring-batch PR, per specs/policy/pr_budget.t27 (#10067/#10074): the ten wave-3 targets this PR opened with, plus the thirteen TreeKEM tree/update-path guards batched onto the same ring branch.

Targets (wave 3)

  1. reinit_freshness (12 tests)
  2. transcript_hash_chain (13)
  3. treekem_blank_leaf_count_bound_guard (13)
  4. treekem_epoch_transition_integrity_guard (12; the max/max_count ceilings split: u32 depth vs usize count)
  5. treekem_group_membership_change_rate_guard (12; window_start not ported -- unread in the original)
  6. treekem_group_membership_epoch_continuity_guard (13)
  7. treekem_leaf_node_key_freshness_guard (13)
  8. treekem_leaf_node_version_monotonicity_guard (13)
  9. treekem_parent_hash_binding (13)
  10. treekem_parent_hash_chain_continuity_guard (12)

Targets (the thirteen added to the same ring batch)

  1. treekem_parent_node_resolution_depth_guard (12; DuplicateInPath on path[pos] plus ZeroNode, NotIncreasing, the u32/u64/usize max splits)
  2. treekem_path_secret_forward_secrecy_guard (12; verdict is the code alone)
  3. treekem_path_secret_freshness_guard (12; zero update id answers as DuplicateUpdateId, exactly as the original)
  4. treekem_path_secret_uniqueness_guard (12; the first-owner HashMap answers node_a via a forward prefix scan)
  5. treekem_resolution_node_coverage_guard (12; Vec becomes [256]u32 + covered_len, the u32 actual lands as usize with the declared side widened; the incomplete-coverage rule stays declared and unreachable as in the original)
  6. treekem_resolution_path_node_uniqueness_guard (12; Vec<[u8;16]> becomes [65]TrnuNode with node_len)
  7. treekem_sibling_node_independence_guard (12; the two-pass order kept: per-node rules first, the shared-key scan only after a clean first pass)
  8. treekem_unmerged_leaf_count_accumulation_guard (12)
  9. treekem_update_path_coverage_guard (12; the repeated index answers before the non-increasing one, as in the original)
  10. treekem_update_path_length_bound_guard (12)
  11. treekem_update_path_secret_uniqueness_guard (12; reads as TPSU2 - the ring already carries a path secret uniqueness guard on the same prefix)
  12. treekem_update_path_uniqueness_guard (12)
  13. treekem_update_path_validation (12; verdict is the code alone; the leaf-start rule answers as PathTooShort, as in the original)

282 tests in total (126 + 156). Sources: gHashTag/trios @ 8b229e9489ee, crates/trios-chat/rings/CR-CHAT-03/src/<stem>.rs.

Battery

Per spec on the branch tree (master + these twenty-three): t27b test --blockers 0 failed, 0 blockers; t27c test-report pass == tests, 0 FAIL, 0 vacuous; gen 0 unimplemented; gen-rust compiles under rustc (0 &'static str, 0 Vec<const); coverage Untested 0; seals re-saved against the merged master and verified 6/6 MATCH. The expectations ledger carries one path-sorted row per spec. duplicate-bodies green (dupe_scan.py ok on the merged tree: no new group, none grew).

Refs #8883.

CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/reinit_freshness.rs. Five rules in the original's fixed order - non-zero new group id, group-id change, no version downgrade, no version leap, and no committer-only welcomers in a multi-member group - carried as the D5 verdict. 12 tests: the ten original RIN cases plus the helper's direct test and a rule-order probe. Shared ids32_equal and all_zero_bytes come from the CR-CHAT helpers module.
…NA#8883)

CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/transcript_hash_chain.rs. Seven per-entry rules in the original's fixed order; the BTreeSet of confirmed hashes becomes a scan over visited entries, the Vec<u8> hashes become sixty-four-byte buffers with lengths. 13 tests: the ten original THASH cases plus two helper tests and a rule-order probe that keeps the first-entry epoch exemption.
…ty-S-AI-DNA#8883)

CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/treekem_blank_leaf_count_bound_guard.rs. Six rules in the code's fixed order: the batch ceiling, then per snapshot the min and max leaf counts, the power-of-two shape (an eleven-entry table scan, t27 has no bitwise ops), the blank-exceeds-total rule and the blank ratio ceiling. 13 tests: the ten original BLCB cases plus two helper tests and a rule-order probe.
…rinity-S-AI-DNA#8883)

CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/treekem_epoch_transition_integrity_guard.rs. Six rules in the code's fixed order: the batch ceiling, the non-zero epoch, the depth ceiling, the strictly increasing epoch, the changed hash, the fresh hash. The BTreeSet becomes a visited scan; 12 tests: the ten original TETI cases plus the helper and a rule-order probe.
…rinity-S-AI-DNA#8883)

The D5 verdict carried one max field, but the original's TooMany carries a usize count ceiling while DepthExceeded carries a u32 depth ceiling; gen-rust compiled the usize into the u32 field. The verdict now has max (u32) for the depth and max_count (usize) for the batch. Re-sealed; t27b 12/12, test-report 12/12, rustc 0.
…DNA#8883)

CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/treekem_group_membership_change_rate_guard.rs. Six rules in the code's fixed order: the batch ceiling, the non-zero epoch, the increasing epoch, the minimum window duration, the change-count ceiling, the change-type vocabulary. Vec<u8> types become a fixed buffer with a length; window_start is unread and does not cross. 12 tests: the ten original GMCR cases plus the helper and a rule-order probe.
CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/treekem_group_membership_epoch_continuity_guard.rs. Six rules in the code's fixed order: the batch ceiling, the non-zero id, the fresh id, the non-zero epoch, the +1 epoch step, the operation-type vocabulary. BTreeSet becomes a visited scan through shared ids16_equal/zero_id16; Option<u64> becomes a flag; the three got payloads (u64 epoch, u8 type, usize count) are separate fields. 13 tests.
…-DNA#8883)

CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/treekem_leaf_node_key_freshness_guard.rs. Six rules in the code's fixed order: the batch ceiling, the non-zero timestamp, the non-zero hash, the unique index, the fresh hash, the maximum age (a future key is not aged, as in the original). Two BTreeSets become visited scans; the u64 age ceiling and usize leaf ceiling stay separate fields. 13 tests.
…ty-S-AI-DNA#8883)

CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/treekem_leaf_node_version_monotonicity_guard.rs. Six rules in the code's fixed order: the batch ceiling, the non-zero group id, the non-zero leaf id, the non-zero version, the fresh leaf-and-version pair, the strictly increasing version per leaf. BTreeSets become visited scans; zero is the not-seen sentinel for the previous-version lookup because the zero-version rule rejects it. 13 tests.
…#8883)

CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/treekem_parent_hash_binding.rs. Six rules in the code's fixed order: bounds, root/leaf exemptions, sibling inside the tree, non-empty hash, canonical length, recomputed match. Hash bytes travel as thirty-two u64 lanes (no u64-to-u8 narrowing), BE extraction through a power-of-256 table, sibling by plain arithmetic; ComputationFailed stays in the enum though no path produces it. 13 tests.
…-S-AI-DNA#8883)

CR-CHAT-03 W3 T-PORT: crates/trios-chat/rings/CR-CHAT-03/src/treekem_parent_hash_chain_continuity_guard.rs. Six rules in the code's fixed order: the batch ceiling, per chain the depth ceiling, the zero and duplicate node ids, the root's zero parent hash, and the link rule parent_hash[i] == hash[i+1]. The unread chain_id does not cross; nodes ride a fixed 33-slot capacity padded by a const record; BTreeSet becomes a visited scan through the shared ids16_equal/zero_id16. 12 tests.
…-S-AI-DNA#8883)

Ports crates/trios-chat/rings/CR-CHAT-03/src/treekem_parent_node_resolution_depth_guard.rs: the batch ceiling, the zero node, the node ceiling, the depth ceiling and the per-path duplicate and strictly-increasing probes, in the code's order. The Vec<u64> path becomes a fixed [32]u64 with path_len; the BTreeSet probe becomes a seen-before scan; the three same-named max payloads split into max (u32), max_count (usize) and max64 (u64). Twelve tests: the original ten verbatim plus the scan-helper and rule-order probes. Battery: t27b 0 failed, test-report 0 FAIL 0 vacuous, gen-rust rustc-clean, coverage Untested 0, seal 6/6 MATCH; one path-sorted ledger row.
…S-AI-DNA#8883)

Ports crates/trios-chat/rings/CR-CHAT-03/src/treekem_path_secret_forward_secrecy_guard.rs: the empty, minimum and maximum path ceilings, then per secret the length, the zero probe and the duplicate, in the code's order. The &[Vec<u8>] becomes a slice of PathSecret records with the live length in data_len; the BTreeSet probe becomes a seen-before scan on the shared ids32_equal; the zero probe is its own record-bound scan. The error variants carry no payloads, so the verdict is the code alone. Twelve tests: the original ten verbatim plus the probe and rule-order tests. Battery: t27b 0 failed, test-report 0 FAIL 0 vacuous, gen-rust rustc-clean, coverage Untested 0, seal 6/6 MATCH; one path-sorted ledger row.
…NA#8883)

Ports crates/trios-chat/rings/CR-CHAT-03/src/treekem_path_secret_freshness_guard.rs: the batch ceiling, then per update the zero id (the original answers it as DuplicateUpdateId), the repeated id, the zero epoch, the node ceiling, the zero secret and the repeated epoch+node pair, in the code's order. The two BTreeSet probes become seen-before scans; the id scans ride the shared ids16_equal and zero_id16; the zero-secret probe is its own record-bound scan. The usize got/max of TooMany and the u64 got/max of NodeOutOfRange land in got/max_count and got64/max64. Twelve tests: the original ten verbatim (the 513-record boundary table materialized) plus the probe and rule-order tests. Battery: t27b 0 failed, test-report 0 FAIL 0 vacuous, gen-rust rustc-clean, coverage Untested 0, seal 6/6 MATCH; one path-sorted ledger row.
…DNA#8883)

Ports crates/trios-chat/rings/CR-CHAT-03/src/treekem_path_secret_uniqueness_guard.rs: the batch ceiling, then per node the index ceiling, the zero secret, the repeated index and the repeated secret, in the code's order. The BTreeSet probes and the first-owner HashMap become seen-before scans; the secret scans ride the shared ids32_equal; the first-owner scan answers node_a. The payloads are node indices (u64), carried in node/node_a/node_b. Twelve tests: the original ten verbatim (both boundary tables materialized) plus the probe and rule-order tests. Battery: t27b 0 failed, test-report 0 FAIL 0 vacuous, gen-rust rustc-clean, coverage Untested 0, seal 6/6 MATCH; one path-sorted ledger row.
…I-DNA#8883)

Ports crates/trios-chat/rings/CR-CHAT-03/src/treekem_resolution_node_coverage_guard.rs: the batch ceiling, then per entry the zero id, the count equality, then per position the ceiling and the duplicate, in the code's order; the incomplete-coverage rule stays declared and unreachable exactly as in the original. The Vec<u32> positions become a fixed [256]u32 with covered_len; the BTreeSet probe becomes a seen-before scan; the u32 actual payload lands as usize with the comparison widening the declared side. Twelve tests: the original ten verbatim (the 2049-entry boundary table as well-formed identical records, TETI-style) plus the probe and rule-order tests. Battery: t27b 0 failed, test-report 0 FAIL 0 vacuous, gen-rust rustc-clean, coverage Untested 0, seal 6/6 MATCH; one path-sorted ledger row.
# Conflicts:
#	docs/TYPE_CONFLICTS.md
#	docs/reports/type_conflicts_classified.json
This was referenced Oct 22, 2026
@gHashTag
gHashTag merged commit b4495fc into Trinity-S-AI-DNA:master Oct 22, 2026
21 of 29 checks passed
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.

3 participants