Feat/dedupe events - #7
Open
tomasvanrijsse wants to merge 4 commits into
Open
Conversation
Google Calendar sync only looked 15 minutes back, matching its own 15-minute schedule with no overlap margin. A single delayed or skipped run permanently lost any event that started during the gap. Add events.external_id (unique per source) and widen the calendar sync lookback to 60 minutes, deduping on the Google event id so overlapping fetches from a recovered run no longer create duplicates.
Hoist the lookback boundary to a named variable, inline test setup per file instead of shared global helpers, and tighten test naming.
Push and PR events had no real delivery-identity check: pushed commits were matched by title+timestamp (a heuristic meant to recognize rebases, not to detect redelivery), and PR events had no dedup at all, so a retried webhook could log a second commit_pushed/pr_* event or even fabricate a spurious rebase event for a plain replay. Dedupe commit_pushed events on repository+commit hash and PR events on event key+PR id+timestamp via events.external_id, same mechanism as the Google Calendar sync fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.