diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-03 21:21:33 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-03 21:41:19 +0000 |
| commit | d392f0bc14bcd687e918d4653ae016226496b4c4 (patch) | |
| tree | 2738b66be231c90615b15d2da1266e16704c510d /docs/reference/relay-limits.md | |
| parent | c163d717147b92b16d89da2fbccef775647b5a07 (diff) | |
feat: add diagnostic logging for partial state event matches
Improves observability when pushes are rejected due to state events that
only partially match the pushed refs. Previously, logs only showed 'No
state event found' even when state events existed but didn't match.
Changes:
- Add diagnose_state_mismatch() to explain why state events don't match
- Log specific reasons: missing refs, wrong SHAs, or extra refs
- Update rejection message to 'No matching state event found' (more accurate)
- Add 4 unit tests for diagnostic function
Example diagnostic output:
WARN State event abc123 from authorized author doesn't match push:
refs/heads/main missing (state declares 9cc3d93b)
This addresses the issue where a push with only refs/heads/test was
rejected because the state event also declared refs/heads/main, but
logs didn't explain why the match failed.
Diffstat (limited to 'docs/reference/relay-limits.md')
0 files changed, 0 insertions, 0 deletions