matrix-org / matrix-org/matrix-spec
Example test cases for common edge cases in state resolution
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
As a positive example, the section for Canonical JSON has an [examples subsection](https://spec.matrix.org/v1.12/appendices/#examples) which shows how to encode a few JSON objects into Canonical JSON.
I think a similar set of prescribed example test cases for state resolution would be very helpful for validating an implementation. I imagine each example would have a set of PDUs as input, and the output could be:
* the resolved state
* a list of edges in the auth chain graph of the resolved state
* this would help ensure that the algorithm reaches the correct state by the correct path, rather than doing something wrong but still ending up with the right answer somehow
* the set of rejected events, and ideally the reasons why these events were rejected
* maybe other stuff I'm not thinking of
I acknowledge that because the data involved here would be rather large, it might be hard to actually fit this into the spec somewhere, and I don't have any suggestions for overcoming that.
Keywords: test vectors
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 reviewing the linked Canonical JSON examples subsection and the state resolution specification. Define a format and location for prescribed PDU inputs, resolved state, auth-chain edges, rejected events, and rejection reasons. Done means the proposed edge-case vectors are agreed and documented sufficiently to validate independent implementations.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100