Skip to content

WPB-26626: Parameterize conversation types over GroupConvType, add GroupConvTypeLegacy#5296

Open
blackheaven wants to merge 11 commits into
developfrom
feat/group-conv-type-legacy-pr1
Open

WPB-26626: Parameterize conversation types over GroupConvType, add GroupConvTypeLegacy#5296
blackheaven wants to merge 11 commits into
developfrom
feat/group-conv-type-legacy-pr1

Conversation

@blackheaven

@blackheaven blackheaven commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

https://wearezeta.atlassian.net/browse/WPB-26626

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@blackheaven blackheaven force-pushed the feat/group-conv-type-legacy-pr1 branch from fb1e82e to 1dc78db Compare June 29, 2026 18:33
@blackheaven blackheaven changed the title Parameterize conversation types over GroupConvType, add GroupConvTypeLegacy WPB-26626: Parameterize conversation types over GroupConvType, add GroupConvTypeLegacy Jun 29, 2026
@blackheaven blackheaven marked this pull request as ready for review June 29, 2026 18:35
@blackheaven blackheaven requested review from a team as code owners June 29, 2026 18:35
@supersven supersven requested a review from Copilot June 30, 2026 07:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Wire conversation API model to be parameterized over the group-conversation-type (gct), then concretizes most of the server/test surface to GroupConvType, while also introducing GroupConvTypeLegacy plus conversion helpers for backward-compatibility scenarios.

Changes:

  • Parameterize ConversationMetadata, OwnConversation, Conversation, and related response wrappers over gct, and propagate GroupConvType through subsystem/store APIs.
  • Update Servant route types and a large set of integration/unit/golden tests to use the new ... GroupConvType types.
  • Add GroupConvTypeLegacy with conversion helpers (fromGroupConvTypeLegacy, toGroupConvTypeLegacy) and a changelog entry for WPB-26626.

Reviewed changes

Copilot reviewed 33 out of 35 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
services/galley/test/integration/API/Util.hs Adjust integration test helpers to decode/compare OwnConversation/Conversation ... GroupConvType.
services/galley/test/integration/API/Teams.hs Add explicit OwnConversation GroupConvType typing for decoded responses.
services/galley/test/integration/API/Roles.hs Update decoded conversation types to Conversation GroupConvType.
services/galley/test/integration/API/MLS/Util.hs Update MLS test helper to return Conversation GroupConvType.
services/galley/test/integration/API/MLS.hs Update MLS integration test decoding to OwnConversation GroupConvType.
services/galley/test/integration/API/MessageTimer.hs Disambiguate responseJsonUnsafe/Maybe decoding with OwnConversation GroupConvType annotations.
services/galley/test/integration/API/Federation.hs Update federation integration tests to Conversation(s)Response GroupConvType and OwnConversation GroupConvType.
services/galley/test/integration/API.hs Propagate GroupConvType through integration tests and response decoding.
libs/wire-subsystems/test/unit/Wire/StoredConversationSpec.hs Update unit test generators/helpers to ... GroupConvType.
libs/wire-subsystems/src/Wire/StoredConversation.hs Store/use ConversationMetadata GroupConvType and return Conversation/OwnConversation ... GroupConvType views.
libs/wire-subsystems/src/Wire/GalleyAPIAccess/Rpc.hs Update RPC access layer return types to ... GroupConvType.
libs/wire-subsystems/src/Wire/GalleyAPIAccess.hs Update effect GADT signatures to ... GroupConvType.
libs/wire-subsystems/src/Wire/ConversationSubsystem/Util.hs Update event mapping to return Public.OwnConversation GroupConvType.
libs/wire-subsystems/src/Wire/ConversationSubsystem/Update.hs Update update operations to return OwnConversation GroupConvType.
libs/wire-subsystems/src/Wire/ConversationSubsystem/Query.hs Update query operations to return Conversation/OwnConversation/... GroupConvType and related wrappers.
libs/wire-subsystems/src/Wire/ConversationSubsystem/MLS/One2One.hs Update MLS 1-1 helpers to ... GroupConvType.
libs/wire-subsystems/src/Wire/ConversationSubsystem/MLS/Conversation.hs Update MLS conversation constructor to take ConversationMetadata GroupConvType.
libs/wire-subsystems/src/Wire/ConversationSubsystem/Create.hs Update creation responses to wrap Public.OwnConversation GroupConvType and related types.
libs/wire-subsystems/src/Wire/ConversationSubsystem.hs Update subsystem effect signatures to use ... GroupConvType.
libs/wire-subsystems/src/Wire/ConversationStore/Postgres.hs Update metadata query to return ConversationMetadata GroupConvType.
libs/wire-subsystems/src/Wire/ConversationStore/MLS/Types.hs Update MLS store types/field accessors to ConversationMetadata GroupConvType.
libs/wire-subsystems/src/Wire/ConversationStore/Cassandra.hs Update Cassandra metadata query to return ConversationMetadata GroupConvType.
libs/wire-subsystems/src/Wire/ConversationStore.hs Update store effect signature for metadata to ConversationMetadata GroupConvType.
libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs Update roundtrip tests to use Conversation.* ... GroupConvType.
libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/CreateGroupConversation.hs Update golden objects to CreateGroupOwnConversation GroupConvType.
libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/ConversationsResponse.hs Update golden objects to ConversationsResponse GroupConvType.
libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/ConversationList_20Conversation_user.hs Update generated golden objects to ConversationList (OwnConversation GroupConvType).
libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Conversation_user.hs Update generated golden OwnConversation objects to OwnConversation GroupConvType.
libs/wire-api/test/golden/Test/Wire/API/Golden/FromJSON.hs Update FromJSON failure test to target OwnConversation GroupConvType.
libs/wire-api/src/Wire/API/Routes/Public/Galley/Conversation.hs Parameterize conversation creation response unions over gct; pin most endpoints to GroupConvType.
libs/wire-api/src/Wire/API/Routes/Internal/Galley.hs Pin internal conversation endpoints to ... GroupConvType.
libs/wire-api/src/Wire/API/Event/Conversation.hs Pin EdConversation payload to OwnConversation GroupConvType.
libs/wire-api/src/Wire/API/Conversation.hs Core refactor: parameterize conversation types over gct; add GroupConvTypeLegacy and conversion helpers.
libs/wire-api-federation/src/Wire/API/Federation/API/Galley.hs Pin federation conversation metadata types to ConversationMetadata GroupConvType.
changelog.d/1-api-changes/WPB-26626 Add changelog entry describing meeting conversation support/version expectations.

Comment thread libs/wire-api/src/Wire/API/Conversation.hs Outdated
Comment thread changelog.d/1-api-changes/WPB-26626 Outdated
Comment thread libs/wire-api/src/Wire/API/Conversation.hs Outdated
Comment thread libs/wire-api/src/Wire/API/Conversation.hs
@supersven

Copy link
Copy Markdown
Contributor

The get-conversations and list-conversations endpoints may need attention (if not done in a follow-up PR): Both use plain GroupConvType, even for versioned editions.

Comment thread libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs
domain = Domain "golden.example.com"

testObject_Conversation_user_1 :: OwnConversation
testObject_Conversation_user_1 :: OwnConversation GroupConvType

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be good to run these golden tests with both types, showing that legacy is compatible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@supersven supersven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ConversationMetadata usages look suspicious: They are always declared as ConversationMetadata GroupConvType. 🤔

- Reword changelog to reflect what this PR delivers (adding MeetingConversation);
  drop V16-gating/list-filtering claims (deferred to follow-up PR).
- Add JSON roundtrip tests for GroupConvType and GroupConvTypeLegacy.
- Add property test asserting fromGroupConvTypeLegacy/toGroupConvTypeLegacy are
  consistent inverses (covers the aligned-enums alignment request).
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Jun 30, 2026
@blackheaven

Copy link
Copy Markdown
Contributor Author

The get-conversations and list-conversations endpoints may need attention (if not done in a follow-up PR): Both use plain GroupConvType, even for versioned editions.

ConversationMetadata usages look suspicious: They are always declared as ConversationMetadata GroupConvType. 🤔

Yes, it'll be handle in upcoming PRs

Mirror the existing GroupConvType roundtrip tests with GroupConvTypeLegacy
counterparts for OwnConversation, Conversation, ConversationList and
ConversationMetadata, exercising the legacy type through the parameterized
JSON instances.
@supersven

supersven commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The get-conversations and list-conversations endpoints may need attention (if not done in a follow-up PR): Both use plain GroupConvType, even for versioned editions.

ConversationMetadata usages look suspicious: They are always declared as ConversationMetadata GroupConvType. 🤔

Yes, it'll be handle in upcoming PRs

Hm, looks like I messed up the comment structure here. 😆

However, is it safe to deploy this PR without the follow-ups? I mean, what happens when we merge this one and before we get to the next ones, you catch a cold or something (i.e. aren't available to finish the,).... Would this be fine to go into production? 🤔

@blackheaven

Copy link
Copy Markdown
Contributor Author

However, is it safe to deploy this PR without the follow-ups? I mean, what happens when we merge this one and before we get to the next ones, you catch a cold or something (i.e. aren't available to finish the,).... Would this be fine to go into production? 🤔

It will not break (further).

BTW, the next PRs are:

Propagate the GroupConvType type parameter to OwnConversation/Conversation
usages that were missed when parameterizing the conversation types:
- stern: getUserConversations (Stern.Intra)
- brig: acceptLocalConnectConv/acceptConnectConv, guardConvAdmin
- brig-integration: add type applications/annotations for responseJson*
  decoders in API.Provider, API.OAuth, API.User.Auth, API.User.Connection,
  API.User.Account and Federation.End2end.

@supersven supersven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants