Repository navigation
feat(group): add MlsGroup::member_at_epoch - #63
Merged
Merged
Conversation
Return the member at a leaf index in a given epoch, reading the leaves retained for past epochs. Callers can compare the leaf that signed a past-epoch message with the leaf that holds that index now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Adds a read-only lookup for members in the current or retained past epochs, with regression coverage. It leaves existing behavior, retention policies, and cryptographic state unchanged. You can add or adjust custom eligibility rules. Learn more. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macroscopeapp
Bot
dismissed
their stale review
October 30, 2026 00:40
Dismissing prior approval to re-evaluate ce59e41
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.
Adds a public
MlsGroup::member_at_epoch(epoch, leaf_index)accessor. For the current epoch it returnsmember_at(leaf_index); for a retained past epoch it returns theMemberstored for that leaf in the message secrets store (the same leavesprocess_messagealready uses to verify past-epoch senders). It returnsNonefor a blank leaf or an epoch that is not retained.libxmtp needs this to check that the leaf which signed a past-epoch application message is still held by the same signature key in the current tree.
Test:
member_at_epoch_reads_retained_leavesadds and then removes a member and checks that the accessor returns the member for the retained epoch,Nonefor the current tree, andNonefor an epoch that is no longer retained.🤖 Generated with Claude Code
Note
Add
MlsGroup::member_at_epochmember lookup for current and past epochsAdds a public method to look up a member by leaf index in membership.rs. For the current epoch it delegates to the current-tree lookup; for past epochs it reads stored leaves and clones the member if present. Returns
Nonewhen the leaf or epoch is unavailable.The test in past_secrets.rs covers a current member, a removed member in a retained epoch, a blank leaf, and an epoch that is no longer retained.
Macroscope summarized ce59e41.