Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion changelog.d/19463.bugfix

This file was deleted.

15 changes: 3 additions & 12 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,18 +1041,9 @@ async def compute_state_delta(
if event.sender not in first_event_by_sender_map:
Copy link
Copy Markdown
Contributor

@MadLittleMods MadLittleMods Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To better explain, "Why the revert?"

While #19463 still seems sane, the PR that enables the Complement tests is failing in CI, #19460 - These tests pass just fine locally and just require some time to figure out why CI isn't as happy as we are. Additionally, @dbkr even tried it out end-to-end with Element and confirmed it fixes the problem originally reported.

The RC process is underway and we don't want to block it trying to figure out the CI. Easier to revert and re-introduce again.

Additionally, the Complement tests weren't reviewed before #19463 was merged so even if the CI was passing there, merging would mean no new tests would be actually run.

In terms of what to do better next time:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix being re-introduced in #19460

first_event_by_sender_map[event.sender] = event

# When using `state_after`, there is no special treatment with
# regards to state also being in the `timeline`. Always fetch
# relevant membership regardless of whether the state event is in
# the `timeline`.
if sync_config.use_state_after:
members_to_fetch.add(event.sender)
# For `state`, the client is supposed to do a flawed re-construction
# of state over time by starting with the given `state` and layering
# on state from the `timeline` as you go (flawed because state
# resolution). In this case, we only need their membership in
# `state` when their membership isn't already in the `timeline`.
elif (EventTypes.Member, event.sender) not in timeline_state:
# We need the event's sender, unless their membership was in a
# previous timeline event.
if (EventTypes.Member, event.sender) not in timeline_state:
members_to_fetch.add(event.sender)
# FIXME: we also care about invite targets etc.

Expand Down
Loading