matrix-org / matrix-org/matrix-spec
StateFilter claims that you can apply a `limit` to state events. This is not true.
Nobody has claimed this yet.
- 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:

**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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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