Skip to content

fix(push): take the core push-open dedupe from posthog-android 3.65.0 and posthog-ios 3.75.0 - #578

Merged
turnipdabeets merged 3 commits into
mainfrom
fix/push-open-manual-dedupe
Sep 15, 2026
Merged

turnipdabeets merged 3 commits into
mainfrom
fix/push-open-manual-dedupe

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Takes the push-open deduplication now built into the native SDKs, and drops the plugin-level copy.

posthog-android 3.65.0+ and posthog-ios 3.75.0+ count a PostHog notification tap once, whichever path reports it — the SDK's automatic capture or a manual capturePushNotificationOpened() call. The rule lives at the single choke point every path reaches, so the plugin no longer mirrors it.

What changes for developers: nothing to call differently. A manual capturePushNotificationOpened() for a PostHog-sent push already captured within the last 5 minutes (same invocation_id and action_id) is skipped instead of counted twice. A rerun of the workflow sends a new notification and counts separately. A push from another provider carries nothing to match on, so it is still counted once per report.

The Dart doc now also states the limit that follows from this: a manual call cannot enrich an automatic capture. Android's tray intent carries no notification text, so its automatic event has no $notification_title or $notification_body, and re-reporting the tap with them is skipped rather than merged.

posthog-android floor 3.64.0 → 3.65.2
posthog-ios floor 3.74.0 → 3.75.2

Related PRs

PR What it does
PostHog/posthog-android#783 Core: capture each PostHog push open once (shipped in 3.65.0)
PostHog/posthog-ios#828 Same rule on iOS (shipped in 3.75.0)
PostHog/posthog-js#4919 The same floor raise for React Native
#579 Replay a tap that arrives before setup (merged)
PostHog/posthog.com#20114 Docs for all of the above

@turnipdabeets turnipdabeets self-assigned this Sep 11, 2026
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-09-15 13:57:51 UTC
Duration: 96684ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 136ms
Format Validation.Event Has Uuid 114ms
Format Validation.Event Has Lib Properties 112ms
Format Validation.Distinct Id Is String 110ms
Format Validation.Token Is Present 111ms
Format Validation.Custom Properties Preserved 111ms
Format Validation.Event Has Timestamp 112ms
Retry Behavior.Retries On 503 5324ms
Retry Behavior.Does Not Retry On 400 2112ms
Retry Behavior.Does Not Retry On 401 2114ms
Retry Behavior.Respects Retry After Header 8119ms
Retry Behavior.Implements Backoff 15442ms
Retry Behavior.Retries On 500 5220ms
Retry Behavior.Retries On 502 5221ms
Retry Behavior.Retries On 504 5221ms
Retry Behavior.Max Retries Respected 15439ms
Deduplication.Generates Unique Uuids 116ms
Deduplication.Preserves Uuid On Retry 5221ms
Deduplication.Preserves Uuid And Timestamp On Retry 10330ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5226ms
Deduplication.No Duplicate Events In Batch 117ms
Deduplication.Different Events Have Different Uuids 111ms
Compression.Sends Gzip When Enabled 112ms
Batch Format.Uses Proper Batch Structure 110ms
Batch Format.Flush With No Events Sends Nothing 106ms
Batch Format.Multiple Events Batched Together 117ms
Error Handling.Does Not Retry On 403 2114ms
Error Handling.Does Not Retry On 413 2115ms
Error Handling.Retries On 408 5220ms

Feature_Flags Tests

16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 10ms
Request Payload.Flags Request Uses V2 Query Param 8ms
Request Payload.Flags Request Hits Flags Path Not Decide 8ms
Request Payload.Flags Request Omits Authorization Header 7ms
Request Payload.Token In Flags Body Matches Init 6ms
Request Payload.Groups Round Trip 7ms
Request Payload.Groups Default To Empty Object 6ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It 7ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 6ms
Request Payload.Disable Geoip Omitted Defaults To False 6ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 6ms
Request Lifecycle.No Flags Request On Init Alone 3ms
Request Lifecycle.No Flags Request On Normal Capture 109ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 11ms
Request Lifecycle.Mock Response Value Is Returned To Caller 7ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 110ms

@turnipdabeets
turnipdabeets marked this pull request as ready for review September 11, 2026 14:39
@turnipdabeets
turnipdabeets requested a review from a team as a code owner September 11, 2026 14:39
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown
Prompt To Fix All With AI
### Issue 1
posthog_flutter/android/src/test/kotlin/com/posthog/flutter/AutoCapturedPushOpensTest.kt:12-18
**Tests are not parameterised**

These tests repeat the same setup, remember, and membership checks across separate methods and inline input lists. This violates the repository directive to prefer parameterised tests and works against its OnceAndOnlyOnce rule. Please consolidate the matching, non-matching, and invalid-entry cases into parameterised tests before merging.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix(push): key the push-open dedupe on i..." | Re-trigger Greptile

posthog-android 3.65.0 and posthog-ios 3.75.0 count a PostHog notification
tap once across the automatic and manual paths, so the plugin no longer needs
its own copy of the rule. Raise both floors and document what the window does
and does not do.
@turnipdabeets
turnipdabeets force-pushed the fix/push-open-manual-dedupe branch from a9fce8a to 3e2ce3b Compare September 15, 2026 01:11
@turnipdabeets turnipdabeets changed the title fix(push): require posthog-android 3.64.0 for push-open dedupe fix(push): take the core push-open dedupe from posthog-android 3.65.0 and posthog-ios 3.75.0 Sep 15, 2026
@turnipdabeets
turnipdabeets marked this pull request as ready for review September 15, 2026 01:14
@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown

Reviews (2): Last reviewed commit: "fix(push): take the core push-open dedup..." | Re-trigger Greptile

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good; no qualifying findings. Verdict: correct.

@marandaneto

Copy link
Copy Markdown
Member

CI is unhappy tho

@turnipdabeets
turnipdabeets enabled auto-merge (squash) September 15, 2026 13:55
@turnipdabeets
turnipdabeets merged commit 77c4fe0 into main Sep 15, 2026
28 checks passed
@turnipdabeets
turnipdabeets deleted the fix/push-open-manual-dedupe branch September 15, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants