matrix-org / matrix-org/matrix-spec

StateFilter claims that you can apply a `limit` to state events. This is not true.

Open
#1,314 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

spec-bug
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.4/client-server-api/#post_matrixclientv3useruseridfilter

says:

Screenshot 2022-11-02 at 09 08 44

**Issue**

I don't believe that it's ever valid to place a limit on state events (given you will randomly lose events and have no way to recover them). I think this is a spec bug, caused by the `limit` field on event_filter.yaml being pulled in by room_event_filter.yaml which is then bluntly labelled StateFilter in sync_filter.yaml.

**Expected behaviour**

Remove the `limit` from StateFilter by refactoring the underlying OpenAPI definitions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading event_filter.yaml, room_event_filter.yaml, and sync_filter.yaml, then compare their generated StateFilter shape with the linked Matrix Client-Server API section. Remove the inherited limit from StateFilter by refactoring the OpenAPI definitions, and validate that the resulting specification no longer advertises a state-event limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, yaml
Domain
api, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.