WPB-25328 autopromotion for adminless groups - #5256
Merged
battermann merged 10 commits intoJun 11, 2026
Merged
Conversation
battermann
marked this pull request as ready for review
June 10, 2026 15:46
Contributor
There was a problem hiding this comment.
Pull request overview
Implements “Prevent adminless groups” autopromotion behavior so that when a team conversation would become adminless (e.g., last admin leaves or is removed via team-member deletion), eligible members can be promoted automatically depending on the configured promotion strategy.
Changes:
- Adds a pure selection helper (
selectAutopromotionCandidate) and unit tests for strategy-based autopromotion candidate selection. - Extends the conversation removal flow (
removeMemberQualified/guardPreventAdminlessGroups) to trigger autopromotion for legacy responses, and introduces a ConversationSubsystem operation to clean a user out of all team conversations while applying the guard. - Updates Galley API call sites and integration tests to cover autopromotion on v15 leave and on team member deletion / user deletion.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| services/galley/src/Galley/API/Teams.hs | Routes team-member deletion cleanup through ConversationSubsystem (deleteUserFromTeamConversations). |
| services/galley/src/Galley/API/Public/Conversation.hs | Adapts remove-member endpoints to updated removeMemberQualified conn-id shape (Maybe ConnId). |
| services/galley/src/Galley/API/LegalHold.hs | Switches policy-conflict removals to use removeMemberQualified. |
| libs/wire-subsystems/wire-subsystems.cabal | Registers new AdminlessGroups module and its unit spec in cabal. |
| libs/wire-subsystems/test/unit/Wire/ConversationSubsystem/InterpreterSpec.hs | Extends interpreter spec error stack for new error paths involved in removal/autopromotion. |
| libs/wire-subsystems/test/unit/Wire/ConversationSubsystem/AdminlessGroupsSpec.hs | Adds unit coverage for autopromotion strategy selection behavior. |
| libs/wire-subsystems/src/Wire/ConversationSubsystem/Update.hs | Implements autopromotion guard behavior and team-conversation cleanup implementation. |
| libs/wire-subsystems/src/Wire/ConversationSubsystem/Interpreter.hs | Wires new ConversationSubsystem operation into the interpreter. |
| libs/wire-subsystems/src/Wire/ConversationSubsystem/AdminlessGroups.hs | New pure helper module for deterministic autopromotion candidate selection. |
| libs/wire-subsystems/src/Wire/ConversationSubsystem.hs | Adjusts subsystem API (conn-id optionality; new DeleteUserFromTeamConversations operation). |
| integration/test/Test/AdminlessGroups.hs | Adds integration coverage for autopromotion on v15 leave and deletion scenarios. |
| changelog.d/2-features/WPB-25313 | Updates changelog entry text for the feature (but ticket/file mismatch vs PR). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Base automatically changed from
WPB-25313-backend-implement-adminless-check-on-leave-endpoint
to
develop
June 11, 2026 07:48
battermann
force-pushed
the
WPB-25328-backend-autopromotion-for-adminless-groups
branch
from
June 11, 2026 08:04
2a87186 to
87d9f91
Compare
blackheaven
approved these changes
Jun 11, 2026
battermann
deleted the
WPB-25328-backend-autopromotion-for-adminless-groups
branch
June 11, 2026 09:38
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.
https://wearezeta.atlassian.net/browse/WPB-25328
Checklist
changelog.d