Skip to content

Conversation

@Kladki
Copy link
Contributor

@Kladki Kladki commented Jul 6, 2024

Rendered

Implementations:


SCT Stuff:

FCP tickyboxes

MSC checklist

@tulir tulir added proposal A matrix spec change proposal client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Jul 7, 2024
Copy link
Member

Choose a reason for hiding this comment

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

Implementation requirements:

  • Server

Copy link
Contributor

Choose a reason for hiding this comment

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

continuwuity has a complete implementation of this MSC: https://forgejo.ellis.link/continuwuation/continuwuity/pulls/907

Copy link
Member

Choose a reason for hiding this comment

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

Synapse has a partial implementation (it copies m.space.child): element-hq/synapse@63f28e4

if there is a use-case for not updating events in other rooms. If there is one, then a query parameter can
be added to toggle this feature.

## Alternatives
Copy link
Member

Choose a reason for hiding this comment

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

MSC3385 seems to mention spaces but doesn't really make a proposal. 🤷

Comment on lines 14 to 15
has the permission to do so, servers SHOULD send a new state event for the old room, removing the `via` field
from it, and send a new event of the same type, with `state_key` being the new room ID, and `via` just
Copy link
Member

Choose a reason for hiding this comment

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

I think you want to keep the old m.space.child events and just add the upgraded one so that upgraded rooms properly appear in the right space? I'd be curious of the algorithm that Element Web uses when you upgrade it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I didn't want to keep the old m.space.child event is because otherwise in the space you would see both the old and upgraded room, likely leading to confusion due to them both having the same icon, description, name, etc.

Copy link
Member

Choose a reason for hiding this comment

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

The alternative is that the old room then gets kicked "out" of the space, which I think is more confusing? Element clients don't show rooms which are upgraded if you're also in the upgraded room, I'm unsure how common that is in clients though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK Element is the only client to do this. Personally I haven't seen anyone confused about kicking old rooms out of the space when I have done upgrades, so I'm not sure whether that's true or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, I think Element would still display both rooms if you are in neither the old or new room, since it wouldn't be able to know that one was an upgrade of the other.

Copy link
Contributor

@MadLittleMods MadLittleMods Aug 11, 2025

Choose a reason for hiding this comment

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

The other problem with doing this is it prevents future people from joining if it uses restricted (inherited) m.room.join_rules.

I also created a dedicated spec issue around this problem: matrix-org/matrix-spec#2194

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can be instead addressed by adding m.room.tombstone to the list of recommended stripped state events.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I meant adding room upgrade details to room summaries/space hierarchies, but the above is something that should probably be done anyways.

Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest leaving whether to kick the children out of the space to the implementation as an implementation detail for now. It's likely that Synapse will do so, but other servers might not. If we find we need a way to control that behaviour, we can always open another MSC.

@@ -0,0 +1,46 @@
# MSC4168: Update `m.space.*` state on room upgrade
Copy link
Member

Choose a reason for hiding this comment

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

It's unclear to me if we want to be more prescriptive in the room upgrade process: matrix-org/matrix-spec#1906 exists for discussion.

@github-project-automation github-project-automation bot moved this to Tracking for review in Spec Core Team Workflow Jul 20, 2025
@turt2live turt2live moved this from Tracking for review to Proposed for FCP readiness in Spec Core Team Workflow Jul 20, 2025
Comment on lines +3 to +6
When a [room upgrade](https://spec.matrix.org/v1.11/client-server-api/#room-upgrades) is performed,
many state events are copied over to the new room, to minimize the amount of work the user has to do
after the upgrade. However, the spec doesn't currently recommend that `m.space.child` or `m.space.parent`
be copied over, as well as these events being updated in other rooms.

Choose a reason for hiding this comment

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

I don't agree that this is a good solution - infact, copying far too much stuff is exactly why I avoid the entire upgrade endpoint in all circumtances, and manage tombstones/creation myself... I would be more interested in making the entire copy events thing opt-in instead (and configurable via passing either a list of event IDs or type/key pairs to replicate, or a DSL to pick and transform items...)

Copy link
Contributor Author

@Kladki Kladki Jul 20, 2025

Choose a reason for hiding this comment

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

I think that would be better suited in another MSC (however, this (your) suggestion has it's own issues, e.g. especially the first bullet point here, but all of them apply to some extent).

@turt2live turt2live added implementation-needs-checking The MSC has an implementation, but the SCT has not yet checked it. and removed needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Jul 28, 2025
@turt2live turt2live removed the implementation-needs-checking The MSC has an implementation, but the SCT has not yet checked it. label Nov 18, 2025
@turt2live
Copy link
Member

turt2live commented Nov 18, 2025

MSCs proposed for Final Comment Period (FCP) should meet the requirements outlined in the checklist prior to being accepted into the spec. This checklist is a bit long, but aims to reduce the number of follow-on MSCs after a feature lands.

SCT members: please check off things you check for, and raise a concern against FCP if the checklist is incomplete. If an item doesn't apply, prefer to check it rather than remove it. Unchecking items is encouraged where applicable.

MSC authors: feel free to ask in a thread on your MSC or in the#matrix-spec:matrix.org room for clarification of any of these points.

  • Are appropriate implementation(s) specified in the MSC’s PR description?
  • Are all MSCs that this MSC depends on already accepted?
  • For each new endpoint that is introduced:
    • Have authentication requirements been specified?
    • Have rate-limiting requirements been specified?
    • Have guest access requirements been specified?
    • Are error responses specified?
      • Does each error case have a specified errcode (e.g. M_FORBIDDEN) and HTTP status code?
        • If a new errcode is introduced, is it clear that it is new?
  • Will the MSC require a new room version, and if so, has that been made clear?
    • Is the reason for a new room version clearly stated? For example, modifying the set of redacted fields changes how event IDs are calculated, thus requiring a new room version.
  • Are backwards-compatibility concerns appropriately addressed?
  • Are the endpoint conventions honoured?
    • Do HTTP endpoints use_underscores_like_this?
    • Will the endpoint return unbounded data? If so, has pagination been considered?
    • If the endpoint utilises pagination, is it consistent with the appendices?
  • An introduction exists and clearly outlines the problem being solved. Ideally, the first paragraph should be understandable by a non-technical audience.
  • All outstanding threads are resolved
    • All feedback is incorporated into the proposal text itself, either as a fix or noted as an alternative
  • While the exact sections do not need to be present, the details implied by the proposal template are covered. Namely:
    • Introduction
    • Proposal text
    • Potential issues
    • Alternatives
    • Dependencies
  • Stable identifiers are used throughout the proposal, except for the unstable prefix section
    • Unstable prefixes consider the awkward accepted-but-not-merged state
    • Chosen unstable prefixes do not pollute any global namespace (use “org.matrix.mscXXXX”, not “org.matrix”).
  • Changes have applicable Sign Off from all authors/editors/contributors
  • There is a dedicated "Security Considerations" section which detail any possible attacks/vulnerabilities this proposal may introduce, even if this is "None.". See RFC3552 for things to think about, but in particular pay attention to the OWASP Top Ten.

@turt2live
Copy link
Member

@mscbot fcp merge
@mscbot concern TravisR - Decide to either always update children of spaces, never update, or leave it as an implementation detail (my preferred choice)

@mscbot
Copy link
Collaborator

mscbot commented Nov 18, 2025

Team member @mscbot has proposed to merge this. The next step is review by the rest of the tagged people:

Concerns:

  • TravisR - Decide to either always update children of spaces, never update, or leave it as an implementation detail (my preferred choice)

Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for information about what commands tagged team members can give me.

@mscbot mscbot added proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. disposition-merge unresolved-concerns This proposal has at least one outstanding concern labels Nov 18, 2025
@turt2live turt2live moved this from Proposed for FCP readiness to Ready for FCP ticks in Spec Core Team Workflow Nov 18, 2025
@turt2live turt2live added the 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. label Nov 18, 2025
When a room upgrade is performed, servers SHOULD replicate `m.space.child` and `m.space.parent` state
in the new room.

In addition, `m.space.child` and `m.space.parent` events in other rooms, where the caller of `/upgrade`
Copy link
Member

Choose a reason for hiding this comment

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

Note that rooms can also be upgraded by sending an m.room.tombstone into the room. We shouldn't exclude copying over state events in this case, just because the user didn't use /upgrade.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 For more context on this point, there is a recent case in Synapse where we don't handle this kind of thing.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think that's an 'upgrade' necessarily though? I'm not sure servers should be doing special logic in that case.

You might send a tombstone to redirect to a different room or "close" it.

Copy link
Member

Choose a reason for hiding this comment

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

We historically have not considered manually sending tombstones as "upgrades" in the protocol. The spec wants callers to perform upgrades using the endpoint, not by sending events manually.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is some nuance here.

The whole problem is that from the remote homeservers perspective, it doesn't matter whether you've used the /upgrade endpoint or not. It just looks like a m.room.tombstone was put in the room either way.

In the case I mentioned around push rules and where I think @anoadragon453's point is spawning from, I think it does make sense to copy push rules over whenever the homeserver notices the room was upgraded (m.room.tombstone and new room has a predecessor). Copying push rules is something that can only be done by the local homeserver for the user. And it doesn't make sense to handle this for remote rooms but not local rooms. This kind of discussion is probably why that clarification probably deserves it's own MSC.

(same with copying over local aliases and room tags) -- Anything that the local homeserver has to do.

Whereas in this case, a local homeserver doesn't need to take any action about space state in the room when it notices a m.room.tombstone. All of the action is from the person doing the "upgrade" (or sending the state) and can manually transfer state as they see fit.

In shorter words, I don't think we should copy over m.space.child or m.space.parent when a m.room.tombstone event is sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. client-server Client-Server API disposition-merge kind:maintenance MSC which clarifies/updates existing spec proposal A matrix spec change proposal proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. unresolved-concerns This proposal has at least one outstanding concern

Projects

Status: Ready for FCP ticks

Development

Successfully merging this pull request may close these issues.

9 participants