Repository navigation
fix: report capture's dropped duplicate copies as drops - #1113
Merged
Merged
Conversation
Capture now keeps the first event for each uuid in a request and returns duplicates_dropped on that uuid's result. The SDK reports that many later copies as drops with reason duplicate_event_uuid and never resends them, and verdict_summary counts each drop by its own reason. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
eli-r-ph
marked this pull request as ready for review
October 22, 2026 23:24
marandaneto
approved these changes
Oct 23, 2026
marandaneto
left a comment
Member
There was a problem hiding this comment.
The code looks good; no qualifying findings. Verdict: correct.
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.
💡 Motivation and Context
Capture v1 now keeps the first event for each uuid in a request and drops the later copies, instead of rejecting the whole batch (PostHog/posthog#122305). It reports the dropped copies as
duplicates_dropped: non that uuid's result. Without this change the SDK counts those copies as delivered with the kept copy's verdict, and resends them when that verdict isretry.ncopies are reported inCaptureError.dropsas(uuid, "duplicate_event_uuid")and never resent.verdict_summary()counts each drop by its own reason, so a dropped copy no longer shows the kept copy's verdict.duplicates_droppedbehave as before, and a value that is not a positive integer is ignored.💚 How did you test it?
duplicates_dropped, with string, bool, negative, zero, float and null values ignored.event_resultsandverdict_summary().verdict_summary()fix reverted.pytest posthog/test,ruff check,ruff format --check,mypyandmake public_api_checkpass locally.📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Written with Claude Code (Claude Opus 5.5). Copies past
nkeep the existing behavior and take the kept copy's verdict. The private parse result carries the counts, so the publicCaptureEventResultis unchanged.🤖 Generated with Claude Code