Sync: $ME and $LAZY in required_state are not resolved #1661
Labels
No labels
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity#1661
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As described in
MSC3575[EDIT: previous versions of MSC4186 that are still in use by other homeservers like Synapse and Tuwunel, see comment below],*,$MEand$LAZYinrequired_stateare special sentinel values that Continuwuity must resolve. However,$MEand$LAZYare currently not handled incollect_required_stateinsrc/api/client/sync/v5.rs. Only*is considered there.Some clients, especially those relying on the official Matrix Rust SDK, expect these values to be resolved. For example, Element X (iOS and Android), which uses it, fails to load the push rules because
$MEis not handled correctly by Continuwuity. This leads to a fallback to silent notifications. This is documented in several places:I’ve explained the mechanism in #1533 (comment).
Currently, I am not aware of any bugs resulting from the missing handling of
$LAZY, but there may be some.If I understand correctly, MSC3575 is deprecated in favor of MSC4186, where$MEand$LAZYare no longer present (see also this comment). However, the Rust SDK still seems to rely on them (see here) and Synapse uses them too (see this file, where$MEisStateValues.MEand$LAZYisStateValues.LAZY). I am not very familiar with the Matrix specification or its development process, so this is somewhat confusing to me.At the moment, however, they still seem to be required, since implementing support for$MEhas been confirmed to fix the silent notification bug with Element X.nice, hope it would get fixed soon 👍
Sync v5:to Sync:$MEand$LAZYinrequired_stateare not resolved$MEand$LAZYinrequired_stateare not resolvedWanted to add that
$MEand$LAZYwere part of MSC4186 (simplified sliding sync) some months ago (here), removed in this commit. So they aren’t exclusive to MSC3575 (legacy sliding sync). The new booleanlazy_membersis not used by Continuwuity either (did not find it in code).Just for reference, this (lines 194-256) is how Tuwunel does this. And see this file for Synapse, where
$MEisStateValues.MEand$LAZYisStateValues.LAZY).Actually, I'm not convinced we should implement an older version of the proposal, especially when we're already behind and struggling to catch up. To me, that implies the implementations affected by the lack of these sentinel values should be updated instead
Hey @nex, fair enough about not chasing the old MSC versions, but I'd push back on the framing here
$ME and $LAZY aren't really "old proposal" — they're what Synapse, Tuwunel, and the Matrix Rust SDK currently implement and
depend on. MSC4186 is still an unmerged pr (https://github.com/matrix-org/matrix-spec-proposals/pull/4186), so "the latest revision" isn't a stable target anyone else is tracking yet. Until the SDK + Synapse drop them, a server that doesn't resolve them is the odd one out, not the conformant one
The "update the implementations instead" path means coordinated changes across matrix-rust-sdk, Element X iOS, Element X
Android, plus a release cycle and user upgrades — months of work behind multiple maintainers we don't control. The
server-side fix is ~15 lines (kiorul already wrote the $ME part) and fix the issue the moment you merge it
Also: this isn't a neutral wait. peoples are really not having notifications working on element X, and since it's the "main client" it's quite bad :/ (to my eyes at least)
Implementing the sentinels also isn't a commitment to an old proposal — it's a compat shim. The server can resolve $ME and
accept literal user IDs; clients that move to the newer format keep working. Forward-compat is preserved, you just stop
breaking the dominant client today.
If the long-term goal is to push the SDK toward MSC4186-latest, for me the right place to make that argument is a matrix-rust-sdk
issue in parallel of having the fix in c10y, not by blocking the server fix users are hitting right now.
Right, but they aren't in the current proposal anymore. They were removed, those implementations are just behind.
I don't like the implication that the rust sdk and synapse get to dictate the spec and even what version of proposals are implemented. If you want Synapse behaviour, use Synapse.
Correct? That doesn't sound like our problem.
We then have to remember to remove this compatibility function when everyone else has caught up, which, as I've stated before, we don't have time to do. If other implementations are behind, that's not our problem - people make it out problem when we're behind, so I don't see why this is different.
Implementing anything is a committment. If the dominant client is broken because of us not supporting something that doesn't exist anymore, they can have us sign a contract and we'll gladly fix it. They're paid to be fixing this problem, we aren't. I also don't give a toss what the "dominant" client is, in the same way I also don't care what the "flagship" or "reference" implementations are. The spec is the spec, I follow the documents, not other implementations. It's a very slippery slope that I am personally sick of seeing in the ecosystem and striving to course-correct on.
Feel free to open an issue on their repo for being non-complaint, but we shouldn't be implementing legacy versions of a proposal that is still rapidly iterating. This is firmly not a continuwuity problem.
Side note, please don't use AI for communication on the issue tracker.
This should probably be closed, as its not a Continuwuity issue, right?
Yeah, https://github.com/matrix-org/matrix-rust-sdk/issues/6549