matrix-org / matrix-org/matrix-spec

Clarify handling of bigints in string power levels

Open
#1,227 2 comments 0 reactions 0 assignees View on GitHub
clarification
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

**Link to problem area**: https://spec.matrix.org/v1.3/rooms/v1/#mroompower_levels-events-accept-values-as-strings

**Issue**

The spec currently doesn't put a limit on the range of integers allowed in string power levels. If this is taken to mean that there is no limit (which is what Synapse implemented, accidentally), this makes it rather complicated to support room versions 1 through 9 in homeservers other than Synapse. As of right now, Dendrite will reject events containing string power levels that exceed the limit of signed 64 bit integers, while Ruma will reject events containing string power levels that exceed the usual `MIN_SAFE_INTEGER` / `MAX_SAFE_INTEGER` limits imposed on non-stringified numbers in canonical JSON.

cc @neilalexander @turt2live @tulir

Contributor guide

Open the contributing guide

Research direction

Start with the linked Matrix specification section on m.room.power_levels events and compare the stated rules with the Dendrite and Ruma limits described in the issue. Done means the specification explicitly defines the permitted range for string power levels and removes ambiguity for room versions 1 through 9.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 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.