matrix-org / matrix-org/complement

sytest "Can delete canonical alias" is enforcing "MAY" wording in the spec as mandatory

Open
#265 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
99
Forks
72
Avg merge
4d 1h
Merged PRs (30d)
8

Description

Sytest "Can delete canonical alias" checks if the server automatically removes an alias from a `m.room.canonical_alias` event if it is deleted via the `/directory/` API.

However, it is probably wrong to enforce this behaviour in two different ways;

First, the spec talks only about `alt_aliases` being automatically updated, see the [following text](https://spec.matrix.org/v1.1/client-server-api/#get_matrixclientv3roomsroomidaliases);

> Note: Servers **may** choose to update the `alt_aliases` for the `m.room.canonical_alias` state event in the room when an alias is removed. Servers which choose to update the canonical alias event are recommended to, in addition to their other relevant permission checks, delete the alias and return a successful response even if the user does not have permission to update the `m.room.canonical_alias` event.

This does not mention anything about the `alias` part of the state event.

Secondly, this is a **MAY** recommendation, which, in the words of [RFC2119](https://datatracker.ietf.org/doc/html/rfc2119);

> This word, or the adjective "OPTIONAL", mean that an item is truly optional.

---

Thus, in my opinion, this sytest shouldn't become a *compliance*-testing complement test, but i'd like some input on this.

Contributor guide

Open the contributing guide

Research direction

Start with the sytest "Can delete canonical alias" test and compare its assertion with the linked Matrix specification text and RFC2119 guidance. Determine whether the test treats the optional MAY behavior as mandatory; done means the compliance test's expectation matches the specification's stated requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.