Skip to content

Conversation

@Kladki
Copy link
Contributor

@Kladki Kladki commented Jul 6, 2024

Rendered

Implementations:


SCT Stuff:

FCP tickyboxes

MSC checklist

Signed-off-by: Matthias Ahouansou <matthias@ahouansou.cz>
@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. 🤷

@@ -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)
  • Lack of details about updating references to replaced room

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.

Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be documented as a potential issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not in this case.

Generally, this is something to keep in mind with proposals for room upgrade behaviors though. My reply above explains the nuance.

Co-authored-by: Andrew Morgan <anoadragon453@users.noreply.github.com>
@turt2live
Copy link
Member

I don't actually know what thread this concern is attached to, so resolving:

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

(if it is attached to a thread, I'm not sure it's so important to block FCP anyway)

@mscbot mscbot removed the unresolved-concerns This proposal has at least one outstanding concern label Dec 9, 2025
@uhoreg
Copy link
Member

uhoreg commented Dec 9, 2025

I don't actually know what thread this concern is attached to, so resolving:

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

(if it is attached to a thread, I'm not sure it's so important to block FCP anyway)

Looks like it would be attached to #4168 (comment)

@clokep
Copy link
Member

clokep commented Dec 10, 2025

@mscbot concern Lack of details about updating references to replaced room

@mscbot mscbot added the unresolved-concerns This proposal has at least one outstanding concern label Dec 10, 2025
…e `via` field of previous space events optional
Comment on lines +18 to +22
- For `m.space.parent` events, a new `m.space.parent` event with `state_key` set to the new room's
ID should be sent. If the
space event pointing to the room to be upgraded has `canonical` set to `true` in `content`,
homeservers SHOULD update that space event to set `canonical` to `false`, while setting it to
`true` in the space event pointing to the new room.
Copy link
Member

Choose a reason for hiding this comment

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

For parent space events, wouldn't it just get copied to the new room with the same state key? Or is the room being upgraded the parent space?

This all sounds simple but gets complicated. Maybe we can have some examples?

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 is talking about space members (when space parents are being upgraded), since the space parent itself won't have any m.space.parent state (unless it is a member of a space itself). I will add examples though.

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.

10 participants