From 0b593cdc85725099a66ff202552ca7bd265620b0 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 7 Aug 2026 00:36:37 +0300 Subject: [PATCH] Rename to the allocated MSC4525 identifiers Endpoint /_matrix/client/unstable/org.matrix.msc4525/sync, config flag experimental.msc4525_enabled, docs updated. --- synapse/config/experimental.py | 6 ++---- synapse/handlers/sliding_sync/paginated.py | 2 +- synapse/rest/client/paginated_sync.py | 8 ++++---- synapse/types/handlers/paginated_sync.py | 2 +- synapse/types/rest/client/__init__.py | 2 +- tests/rest/client/sliding_sync/test_paginated_sync.py | 8 ++++---- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/synapse/config/experimental.py b/synapse/config/experimental.py index 071d10d6c9..45cb084bdb 100644 --- a/synapse/config/experimental.py +++ b/synapse/config/experimental.py @@ -119,13 +119,11 @@ class ExperimentalConfig(Config): # This is enabled by default as a replacement for the sliding sync proxy. self.msc3575_enabled: bool = experimental.get("msc3575_enabled", True) - # Paginated Sync (MSC TBD): a simplified dialect of Simplified Sliding + # MSC4525: Paginated Sync, a simplified dialect of Simplified Sliding # Sync (MSC4186) without lists/ranges/subscriptions, where the server # pages the client through changed rooms (most recently active first) # with bounded response sizes. - self.paginated_sync_enabled: bool = experimental.get( - "paginated_sync_enabled", False - ) + self.msc4525_enabled: bool = experimental.get("msc4525_enabled", False) # MSC3773: Thread notifications self.msc3773_enabled: bool = experimental.get("msc3773_enabled", False) diff --git a/synapse/handlers/sliding_sync/paginated.py b/synapse/handlers/sliding_sync/paginated.py index d671890d7e..e1f86ab4d4 100644 --- a/synapse/handlers/sliding_sync/paginated.py +++ b/synapse/handlers/sliding_sync/paginated.py @@ -12,7 +12,7 @@ # . # -"""Paginated Sync (MSC TBD): a dialect of Simplified Sliding Sync (MSC4186) +"""Paginated Sync (MSC4525): a dialect of Simplified Sliding Sync (MSC4186) without lists, ranges, subscriptions or expanding timelines. The server pages the client through whatever has changed, most recently active diff --git a/synapse/rest/client/paginated_sync.py b/synapse/rest/client/paginated_sync.py index 16f6636bb1..38e515d7f4 100644 --- a/synapse/rest/client/paginated_sync.py +++ b/synapse/rest/client/paginated_sync.py @@ -12,7 +12,7 @@ # . # -"""The Paginated Sync endpoint (MSC TBD): a dialect of Simplified Sliding Sync +"""The Paginated Sync endpoint (MSC4525): a dialect of Simplified Sliding Sync (MSC4186) without lists/ranges/subscriptions - see `synapse.handlers.sliding_sync.paginated` for the semantics. @@ -48,7 +48,7 @@ logger = logging.getLogger(__name__) class PaginatedSyncRestServlet(SlidingSyncRestServlet): """ - API endpoint for MSC TBD Paginated Sync. `POST` with a JSON body of + API endpoint for MSC4525 Paginated Sync. `POST` with a JSON body of `page_size`/`limit`/`history`/`required_state`/`extensions`; responds with the changed rooms (most recently active first, at most `page_size` of them), a `pending` count of rooms that didn't fit, and `total_rooms`. @@ -59,7 +59,7 @@ class PaginatedSyncRestServlet(SlidingSyncRestServlet): """ PATTERNS = client_patterns( - "/org.matrix.paginated_sync/sync$", releases=[], v1=False, unstable=True + "/org.matrix.msc4525/sync$", releases=[], v1=False, unstable=True ) def __init__(self, hs: "HomeServer"): @@ -156,5 +156,5 @@ class PaginatedSyncRestServlet(SlidingSyncRestServlet): def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None: - if hs.config.experimental.paginated_sync_enabled: + if hs.config.experimental.msc4525_enabled: PaginatedSyncRestServlet(hs).register(http_server) diff --git a/synapse/types/handlers/paginated_sync.py b/synapse/types/handlers/paginated_sync.py index 335b22f81e..4118e1c4b3 100644 --- a/synapse/types/handlers/paginated_sync.py +++ b/synapse/types/handlers/paginated_sync.py @@ -12,7 +12,7 @@ # . # -"""Types for Paginated Sync (MSC TBD): a dialect of Simplified Sliding Sync +"""Types for Paginated Sync (MSC4525): a dialect of Simplified Sliding Sync (MSC4186) without lists/ranges/subscriptions, where the server pages the client through changed rooms (most recently active first) with bounded responses. diff --git a/synapse/types/rest/client/__init__.py b/synapse/types/rest/client/__init__.py index 351d15013b..6d54aeea02 100644 --- a/synapse/types/rest/client/__init__.py +++ b/synapse/types/rest/client/__init__.py @@ -513,7 +513,7 @@ class SlidingSyncBody(RequestBodyModel): class PaginatedSyncBody(RequestBodyModel): """ - Paginated Sync API request body (MSC TBD, a dialect of MSC4186 without + Paginated Sync API request body (MSC4525, a dialect of MSC4186 without lists/ranges/subscriptions). Attributes: diff --git a/tests/rest/client/sliding_sync/test_paginated_sync.py b/tests/rest/client/sliding_sync/test_paginated_sync.py index bc5cdf8b9f..890d6ffa99 100644 --- a/tests/rest/client/sliding_sync/test_paginated_sync.py +++ b/tests/rest/client/sliding_sync/test_paginated_sync.py @@ -12,7 +12,7 @@ # . # -"""Tests for the Paginated Sync endpoint (MSC TBD).""" +"""Tests for the Paginated Sync endpoint (MSC4525).""" import logging import urllib.parse @@ -33,7 +33,7 @@ logger = logging.getLogger(__name__) class PaginatedSyncTestCase(unittest.HomeserverTestCase): """ - Tests for `POST /_matrix/client/unstable/org.matrix.paginated_sync/sync`: + Tests for `POST /_matrix/client/unstable/org.matrix.msc4525/sync`: paging on initial sync, per-room gapping on incremental sync, backlog (`pending`) draining, and most-recent-first ordering. """ @@ -47,11 +47,11 @@ class PaginatedSyncTestCase(unittest.HomeserverTestCase): paginated_sync.register_servlets, ] - sync_endpoint = "/_matrix/client/unstable/org.matrix.paginated_sync/sync" + sync_endpoint = "/_matrix/client/unstable/org.matrix.msc4525/sync" def default_config(self) -> JsonDict: config = super().default_config() - config["experimental_features"] = {"paginated_sync_enabled": True} + config["experimental_features"] = {"msc4525_enabled": True} return config def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None: