Fix issues regarding event ordering in state res #2621

Merged
nex merged 4 commits from jade/oldest-events into main 2026-11-30 17:57:30 +00:00
Owner

(check the commits, mainly v12 fix, edge cases)

(check the commits, mainly v12 fix, edge cases)
Assigning depth 0 to the oldest mainline power-levels event collided
with the 0 sentinel for events with no mainline ancestor, breaking ties
by timestamp instead of sorting no-ancestor events strictly earlier as
required by the Matrix spec.
fix(state-res): Use infinite power level for v12 room creators
Some checks failed
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 3s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Documentation / Build and Deploy Documentation (pull_request) Successful in 33s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m27s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 13m59s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 6s
6fd851ffd4
Representing v12 creators as Int::MAX allowed a non-creator explicitly
assigned Int::MAX to tie with a room creator during reverse topological
power sorting instead of ranking strictly below them.
eleboucher approved these changes 2026-11-28 17:00:21 +00:00
chore: Changelog fragment
All checks were successful
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 8s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 38s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m32s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m25s
0b72a90b6a
nex added this to the 26.11.0 milestone 2026-11-29 15:51:26 +00:00
nex requested review from nex 2026-11-29 15:51:48 +00:00
nex approved these changes 2026-11-29 16:08:07 +00:00
Dismissed
@ -448,2 +451,3 @@
Fut: Future<Output = Result<(Int, MilliSecondsSinceUnixEpoch)>> + Send,
Fut: Future<Output = Result<(P, MilliSecondsSinceUnixEpoch)>> + Send,
Id: Borrow<EventId> + Clone + Eq + Hash + Ord + Send + Sync,
P: Ord + Send,
Owner

nit: is there a reason to use a generic here over just UserPowerLevel?

nit: is there a reason to use a generic here over just `UserPowerLevel`?
Owner

+1, this seems silly

+1, this seems silly
Author
Owner

This is to avoid breaking build_local_dag + some tests

This is to avoid breaking build_local_dag + some tests
Author
Owner

mm I can make it less generic

mm I can make it less generic
Owner

I think you ought to refactor those things to use UserPowerLevel

I think you ought to refactor those things to use `UserPowerLevel`
Jade marked this conversation as resolved
refactor: Use concrete UserPowerLevel type
All checks were successful
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 7s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m30s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m31s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m15s
f17bc965c3
nex approved these changes 2026-11-30 17:45:56 +00:00
Jade scheduled this pull request to auto merge when all checks succeed 2026-11-30 17:46:13 +00:00
ginger approved these changes 2026-11-30 17:46:34 +00:00
nex merged commit c0ee45192a into main 2026-11-30 17:57:30 +00:00
nex deleted branch jade/oldest-events 2026-11-30 17:57:30 +00:00
Sign in to join this conversation.
No milestone
No assignees
5 participants
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!2621
No description provided.