Support MSC4446: allow moving fully read markers backwards#19663
Open
SpiritCroc wants to merge 9 commits into
Open
Support MSC4446: allow moving fully read markers backwards#19663SpiritCroc wants to merge 9 commits into
SpiritCroc wants to merge 9 commits into
Conversation
3 tasks
This was referenced Apr 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements MSC4446 support in Synapse, allowing clients to move the m.fully_read marker backwards when explicitly opted-in and when the experimental feature flag is enabled.
Changes:
- Add an experimental config flag (
msc4446_enabled) and expose it via/_matrix/client/versionsas an unstable feature. - Extend the read-marker and receipt endpoints to accept
com.beeper.allow_backward(boolean) to allow backwards movement for fully-read markers when enabled. - Add client REST tests covering default (forwards-only) behavior, opt-in backwards behavior, and invalid usage.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/rest/client/test_receipts.py | Adds tests for backwards movement behavior via the receipts endpoint, including feature-flag gating and invalid usage. |
| tests/rest/client/test_read_marker.py | Adds tests for backwards movement behavior via /read_markers, plus versions endpoint tests for the unstable feature flag. |
| synapse/rest/client/versions.py | Advertises com.beeper.msc4446 in unstable_features based on config. |
| synapse/rest/client/receipts.py | Parses/validates com.beeper.allow_backward (when enabled) and forwards it to the read-marker handler for fully-read receipts. |
| synapse/rest/client/read_marker.py | Parses/validates com.beeper.allow_backward (when enabled) and forwards it to the read-marker handler for m.fully_read. |
| synapse/handlers/read_marker.py | Adds allow_backward support to permit setting m.fully_read to an older event when opted-in. |
| synapse/config/experimental.py | Introduces msc4446_enabled experimental config option. |
| changelog.d/19663.feature | Adds Towncrier newsfragment for the feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
50
to
51
| """Updates the read marker for a given user in a given room if the event ID given | ||
| is ahead in the stream relative to the current read marker. |
anoadragon453
requested changes
Jun 29, 2026
anoadragon453
left a comment
Member
There was a problem hiding this comment.
Sorry for the glacial review time. We're burning down our backlog as a team currently.
Just a couple small things. Otherwise looks pretty good to go!
Comment on lines
+602
to
+603
| # MSC4446: Allow moving the fully read marker backwards. | ||
| self.msc4446_enabled: bool = experimental.get("msc4446_enabled", False) |
Member
There was a problem hiding this comment.
Could you create an experimental feature issue so we can track this implementation going forwards?
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Conflicts: synapse/rest/client/versions.py
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.
MSC4446
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.