Skip to content

Conversation

@pcapriotti
Copy link
Contributor

@pcapriotti pcapriotti commented Nov 20, 2025

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

Checklist

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

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Nov 20, 2025
@pcapriotti pcapriotti force-pushed the out-of-sync-error-versioning branch from e377eee to 2df261e Compare November 21, 2025 07:48
@pcapriotti pcapriotti marked this pull request as ready for review November 21, 2025 15:27
@pcapriotti pcapriotti requested review from a team as code owners November 21, 2025 15:27
@battermann battermann requested a review from Copilot November 21, 2025 15:48
Copy link
Contributor

Copilot AI left a comment

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 introduces versioning for the MLS "out of sync" error functionality to ensure backward compatibility with older API versions. The out-of-sync check is disabled for API versions below V13, preventing breaking changes for clients using older API versions.

Key changes:

  • Adds a new EnableOutOfSyncCheck type to control whether out-of-sync checks are performed
  • Introduces APIVersion combinator to pass API version information to handlers
  • Updates MLS message and commit bundle handlers to conditionally apply out-of-sync checks based on API version
  • Extends federation API to include enableOutOfSyncCheck field for cross-backend compatibility

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
libs/wire-api/src/Wire/API/MLS/OutOfSync.hs New module defining EnableOutOfSyncCheck data type with default value DisableOutOfSyncCheck
libs/wire-api/src/Wire/API/VersionInfo.hs Adds APIVersion servant combinator and getVersionHeader helper function for extracting version from requests
libs/wire-api/src/Wire/API/Routes/SpecialiseToVersion.hs Extends version specialization to support APIVersion combinator
libs/wire-api/src/Wire/API/Routes/Public/Galley/MLS.hs Adds APIVersion to MLS message and commit bundle API routes
libs/wire-api-federation/src/Wire/API/Federation/API/Galley.hs Adds optional enableOutOfSyncCheck field to MLSMessageSendRequest for federation support
services/galley/src/Galley/API/MLS/Message.hs Implements version-based logic with enableOutOfSyncCheckFromVersion function and updates handlers to accept version parameter
services/galley/src/Galley/API/MLS/OutOfSync.hs Modifies checkConversationOutOfSync to respect EnableOutOfSyncCheck input
services/galley/src/Galley/API/Federation.hs Updates federation handlers to propagate enableOutOfSyncCheck from incoming requests using default when not provided
services/galley/test/integration/API/MLS.hs Updates test utilities to set enableOutOfSyncCheck = Nothing for federated message send requests
services/galley/test/integration/API/MLS/Util.hs Updates test helper to include enableOutOfSyncCheck field
integration/test/Test/Channels.hs Adds comprehensive test coverage for version-based behavior in both local and federated scenarios
libs/wire-api/wire-api.cabal Registers new Wire.API.MLS.OutOfSync module
changelog.d/3-bug-fixes/out-of-sync-error-versioning Documents the bug fix for older backends

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pcapriotti pcapriotti merged commit 112c2a3 into develop Nov 24, 2025
10 checks passed
@pcapriotti pcapriotti deleted the out-of-sync-error-versioning branch November 24, 2025 10:28
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.

5 participants