mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 15:37:49 +00:00
Port `_calculate_sliding_sync_table_changes` and `_get_sliding_sync_insert_values_from_state_map` to `rust/src/persist/sliding_sync.rs`. The reads go through a `SlidingSyncReads` trait over the persist reader. State events that are not in the chunk come from the Rust event loader, redacted and without rejected events, as `get_events` returns them. The membership snapshots to insert are sorted by user ID. Python lists them in the order of the delta. The stripped state helper only runs inside the write transaction, for out-of-band memberships, so it moves to phase 2. `SlidingSyncTestCase` compares the two over the same database, chunk and delta. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UHKYPSc37kWqGACn9aKxKL