Skip to content

Regression test for corrupted auth chains#790

Merged
kegsay merged 6 commits intomainfrom
kegan/corrupt-auth-chains
Aug 15, 2025
Merged

Regression test for corrupted auth chains#790
kegsay merged 6 commits intomainfrom
kegan/corrupt-auth-chains

Conversation

@kegsay
Copy link
Copy Markdown
Member

@kegsay kegsay commented Jul 29, 2025

See element-hq/synapse#18746 - discovered via Chaos testing.

Pull Request Checklist

kegsay added a commit to element-hq/synapse that referenced this pull request Aug 15, 2025
[Complement tests](matrix-org/complement#790)

Basically, when we use `/state_ids` in conjunction with `/event`
requests, the `/event` request can fail causing a partial state to be
returned. When we persist the state, we process dependent events first.
If we fail to process a dependent event due to missing the `auth_event`,
we didn't update the in-memory event map. This meant that we could
incorrectly persist events that depended on dropped events.

Discovered via Chaos testing.

### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct (run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
@kegsay kegsay merged commit 62d6562 into main Aug 15, 2025
4 checks passed
@kegsay kegsay deleted the kegan/corrupt-auth-chains branch August 15, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants