wip: refactor: Use upstream ruma state resolution #2408

Draft
nex wants to merge 2 commits from nex/refactor/ruma-state-res into main
Owner

This pull request drops the local state resolution implementation in favour of ruma's own state resolution implementation, which is better maintained and shifts the burden upstream somewhat (which is a good thing, since it has more eyes on it, plus ours once this lands).

There's a marginal performance "regression" around PDU check 5 due to the loss of async state fetch, but this is deemed acceptable for the benefit provided by this change. Other callsites already precomputed relevant data for the auth checks, so don't lose anything in particular here.

Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the contributing guidelines:
This pull request drops the local state resolution implementation in favour of ruma's own state resolution implementation, which is better maintained and shifts the burden upstream somewhat (which is a good thing, since it has more eyes on it, plus ours once this lands). There's a marginal performance "regression" around PDU check 5 due to the loss of async state fetch, but this is deemed acceptable for the benefit provided by this change. Other callsites already precomputed relevant data for the auth checks, so don't lose anything in particular here. **Pull request checklist:** - [x] This pull request targets the `main` branch, and the branch is named something other than `main`. - [x] I have written an appropriate pull request title and my description is clear. - [x] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [x] My contribution follows the [code style][c2], if applicable. - [ ] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [ ] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [x] My commit messages follow the [commit message format][c1cm] and are descriptive. [c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md [c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages
nex added this to the 26.10.0 milestone 2026-10-26 04:39:16 +00:00
nex self-assigned this 2026-10-26 04:39:16 +00:00
wip
Some checks failed
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 7s
Documentation / Build and Deploy Documentation (pull_request) Successful in 10m46s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 23m2s
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 43m43s
71046e1522
Some checks failed
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Required
Details
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 7s
Required
Details
Documentation / Build and Deploy Documentation (pull_request) Successful in 10m46s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 23m2s
Required
Details
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 43m43s
Required
Details
This pull request has changes conflicting with the target branch.
  • src/core/matrix/state_res/mod.rs
  • src/service/rooms/event_handler/policy_server.rs
  • src/service/rooms/membership/mod.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'nex/refactor/ruma-state-res:nex/refactor/ruma-state-res'
git switch 'nex/refactor/ruma-state-res'
Sign in to join this conversation.
No reviewers
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!2408
No description provided.