bug: /sync: with include_leave: true, every incremental sync resends all left rooms with their full state #2516

Open
opened 2026-11-13 18:14:44 +00:00 by GlitchedAxiom · 0 comments

What is the bug?

When a client's sync filter sets room.include_leave: true, continuwuity includes every left (not forgotten) room in rooms.leave on every incremental sync, even if nothing changed in those rooms since since (lol). Each of those rooms also gets its full state at the time of the leave, not just the state that changed.

Because the response is never empty, the long-poll returns immediately. The client ends up in a tight loop of re-processing the same left rooms about every 2s in my case.

Steps to reproduce

  1. Leave a room (don't forget it).
  2. Sync with a filter that has include_leave: true and take next_batch: GET /_matrix/client/v3/sync?filter={"room":{"include_leave":true}}
  3. Sync incrementally twice in a row, each time with the previous next_batch: GET /_matrix/client/v3/sync?since=<next_batch>&timeout=30000&filter={"room":{"include_leave":true}}

Server name and version

26.11.0-alpha.1

Additional context

Synapse behaviour is to send these rooms only on initial sync. There are some Complement tests for this too which c10y currently fails. I found this issue by using the Trixnity library where this is apparently a default behaviour if the forget capability is advertised, which was always(?) the case up to recently, thanks to !2452

### What is the bug? When a client's sync filter sets room.include_leave: true, continuwuity includes every left (not forgotten) room in rooms.leave on every incremental sync, even if nothing changed in those rooms since `since` (lol). Each of those rooms also gets its full state at the time of the leave, not just the state that changed. Because the response is never empty, the long-poll returns immediately. The client ends up in a tight loop of re-processing the same left rooms about every 2s in my case. ### Steps to reproduce 1. Leave a room (don't forget it). 2. Sync with a filter that has include_leave: true and take next_batch: GET /_matrix/client/v3/sync?filter={"room":{"include_leave":true}} 3. Sync incrementally twice in a row, each time with the previous next_batch: GET /_matrix/client/v3/sync?since=<next_batch>&timeout=30000&filter={"room":{"include_leave":true}} ### Server name and version 26.11.0-alpha.1 ### Additional context Synapse behaviour is to send these rooms only on initial sync. There are some Complement tests for this too which c10y currently fails. I found this issue by using the Trixnity library where this is apparently a default behaviour if the forget capability is advertised, which was always(?) the case up to recently, thanks to !2452
ginger self-assigned this 2026-11-13 18:33:00 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity#2516
No description provided.