refactor: establish MLS groups with one single transaction [WPB-23744]#20521
Merged
thisisamir98 merged 12 commits intodevfrom Mar 2, 2026
Merged
refactor: establish MLS groups with one single transaction [WPB-23744]#20521thisisamir98 merged 12 commits intodevfrom
thisisamir98 merged 12 commits intodevfrom
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (46.87%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## dev #20521 +/- ##
==========================================
- Coverage 45.47% 45.47% -0.01%
==========================================
Files 1639 1639
Lines 40402 40411 +9
Branches 8345 8346 +1
==========================================
+ Hits 18371 18375 +4
- Misses 20095 20100 +5
Partials 1936 1936
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Contributor
|
🔗 Download Full Report Artifact 🧪 Playwright Test Summary
specs/CriticalFlow/backupRestoration-TC-8634.spec.ts (❌ 0 failed,
|
screendriver
previously approved these changes
Mar 2, 2026
screendriver
approved these changes
Mar 2, 2026
|
screendriver
pushed a commit
that referenced
this pull request
Mar 4, 2026
#20521) * adds new operation name for establishing mls groups * Adds policy entries for establishGroup * adds new tests for establish group operation * executes group establishment method through mls recovery orchestrator * uses passed transaction context instead of creating it's own transaction * uses passed transaction context instead of creating it's own transaction * establishes MLS groups with one single transaction * avoids fetching mls public keys inside transaction * avoids fetching keypackages inside transaction * update key material using parent transaction context * adds tests
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.



Problem statement
We identified race conditions during MLS establish/reset flows.
If multiple clients try to establish or reset the same group concurrently, only one “wins” the race. Others may end up in a broken epoch 0 state.
Currently, the flow is split across multiple transactions:
This allows partial state to persist if a failure or race occurs.
Solution
Refactor the Web MLS establish flow to run fully inside a single Core Crypto transaction.