Skip to content

spec(port): port the external commit forgery guard (Refs #8883) - #9909

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

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

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Contributor

The sixth 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/external_commit.rs (Wave-14 Lane B, L-CHAT-3-extern, RFC 9420 12.2).

An external commit lets a non-member join without a Welcome — an atomic Commit with a path blob and a self-Add, signed by the joiner's leaf key. The gate holds the failure modes closed: forged from_epoch (replay or leap-ahead), stale Welcome rebound, self-Add aimed at another leaf, sender claiming an occupied leaf. Rules, in the original's fixed order:

  1. group_id == local_group_id,
  2. claimed_epoch == local_epoch,
  3. joining_leaf not in occupied,
  4. sender == joining_leaf (only self-Add allowed),
  5. ops exactly [Add(joining_leaf)],
  6. signature non-empty (placeholder verifier; the real one lives behind the openmls flag).

Carried as the D5 verdict with every payload field: the claimed/actual epochs (EpochMismatch), the conflicting leaf (LeafOccupied), the sender/joining pair (SenderMismatch), and the offending operations list carried by value with its length (OpsScopeViolation).

Adaptations (t27 conventions): the original's newtypes flatten to bare integers (GroupId → [32]u8, Epoch → u64, LeafIndex → u32); the Op enum → kind enum + one record form (Update carries its unread leaf as zero); occupied-leaf probe → scan over the leaf slice; single-self-Add rule → length gate then kind+leaf probe.

All 6 original EXT tests transcribed with exact asserts (EXT-05 pins both the remove-riding-along and the update-without-self-Add scope violations; EXT-06 pins both the cross-group injection and the empty signature), plus helper tests and a full rule-order ladder (9 total).

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

…-DNA#8883)

The sixth CR-CHAT-03 ring target (W3, L-CHAT-3-extern, RFC
9420 12.2): the external-commit acceptance rules, in the
original's fixed order - the group agreement, the claimed
epoch equal to the local one, the joining leaf not
occupied, the sender equal to the joining leaf, the
operations exactly one self-Add of the joining leaf, and
the non-empty signature (the placeholder verifier) - as
the D5 verdict with every payload field (the claimed and
actual epochs, the conflicting leaf, the sender and
joining pair, and the offending operations list carried
by value with its length), the original's rule order, and
all six EXT tests transcribed plus helper and rule-order
tests.

The original's newtypes flatten to their bare integers -
the group identifier to its thirty-two bytes, the epoch to
u64, the leaf indices to u32 - and the Op enum becomes a
kind enum plus one record form, Update carrying its unread
leaf as zero. The occupied-leaf probe becomes a scan over
the leaf slice and the single-self-Add rule a length gate
then a kind and leaf probe.

Checks (conventions 0-14): t27b test 9 passed 0 failed; t27c
test-report 9/9, 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. Sixth CR-CHAT-03 target (6/47 T-PORT) — requesting owner merge when convenient, Refs #8883.

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