upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/purgatory/sync/loop.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-02-03 21:21:33 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-02-03 21:41:19 +0000
commitd392f0bc14bcd687e918d4653ae016226496b4c4 (patch)
tree2738b66be231c90615b15d2da1266e16704c510d /src/purgatory/sync/loop.rs
parentc163d717147b92b16d89da2fbccef775647b5a07 (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 'src/purgatory/sync/loop.rs')
0 files changed, 0 insertions, 0 deletions