mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 22:07:34 +00:00
Phase 3 of the sync-in-Rust plan: `SyncHandler.generate_room_entry` ports `_generate_room_entry` for a joined or archived room, reading through the sync store. It covers the timeline (gap check, filtering, visibility and the backward pagination loop), the state delta on the full, incremental and `state_after` paths with the lazy-loaded members cache, the room summary, sticky events and unread counts. Partial state rooms raise `RustSyncFallback`. Bundled aggregations stay with Python. A room records the lazy-loaded members it sends only once its entry is computed. A room that fails part way records none, so Python can compute it from the same cache. Python reads and writes that cache through `ll_member_was_sent` and `ll_member_mark_sent`. The visibility checks get a batch loader over the store, and the store gains `events_have_relations` for relation filters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194eNQP5weBtVMg8NKtc6VU