element-hq / element-hq/dendrite

Assertions needed to catch zero NIDs

Open
#955 3 comments 0 reactions 0 assignees View on GitHub
C-Roomserver T-Defect
Dominant language
Go
Stars
965
Forks
101
PR merge metrics
No merged PRs in 30d

Description

*This issue was originally created by [**@neilalexander**](https://github.com/neilalexander) at .*

All NIDs (event, event type, state block, state snapshot, event state key, room, etc) always start from `1`, but there are sometimes cases where bugs cause us to request `0` NIDs. We should put some assertion to catch these bugs as they happen.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the NID request paths for event, event type, state block, state snapshot, event state key, and room identifiers, then determine where zero values can be caught; done means assertions cover the relevant NID requests and tests demonstrate that zero NIDs are rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.