Skip to content

feat: event de-duplication based on event id#4

Merged
albanm merged 3 commits intomainfrom
feat-event-id
Feb 23, 2026
Merged

feat: event de-duplication based on event id#4
albanm merged 3 commits intomainfrom
feat-event-id

Conversation

@kernoeb
Copy link
Contributor

@kernoeb kernoeb commented Feb 20, 2026

Summary

  • Add simple de-duplication of events and notifications based on an optional eventId field, using a MongoDB unique index
  • Fix notification processing so it continues after successful insert (WS, push, email) and only skips duplicates
  • Add integration tests for event de-duplication and WebSocket notification delivery (including duplicate filtering)

Test plan

  • Existing tests pass (19/19)
  • New test: event with same id sent twice is de-duplicated
  • New test: direct notifications delivered via WebSocket
  • New test: duplicate notification with same eventId does not produce extra WS message

🤖 Generated with Claude Code

The early return was placed after insertOne instead of inside the
duplicate-key catch block, causing all notifications to stop processing
after DB insert. Also adds a WS delivery integration test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@albanm albanm merged commit 5e10800 into main Feb 23, 2026
3 checks passed
@albanm albanm deleted the feat-event-id branch February 23, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants