Skip to content

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

Open
turnipdabeets wants to merge 1 commit into
mainfrom
fix/push-open-manual-dedupe
Open

turnipdabeets wants to merge 1 commit 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.0
posthog-ios floor 3.74.0 → 3.75.0

Related PRs

PR What it does
PostHog/posthog-android#783 Core: capture each PostHog push open once (merged, ships as 3.65.0)
PostHog/posthog-ios#828 Same rule on iOS (merged, ships as 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

CI is red until posthog-android 3.65.0 and posthog-ios 3.75.0 are published — the version resolution jobs cannot find them yet. Everything else passes. Both are merged to their default branches and release Monday.

@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 01:16:28 UTC
Duration: 96814ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 142ms
Format Validation.Event Has Uuid 118ms
Format Validation.Event Has Lib Properties 115ms
Format Validation.Distinct Id Is String 115ms
Format Validation.Token Is Present 114ms
Format Validation.Custom Properties Preserved 116ms
Format Validation.Event Has Timestamp 117ms
Retry Behavior.Retries On 503 5330ms
Retry Behavior.Does Not Retry On 400 2118ms
Retry Behavior.Does Not Retry On 401 2117ms
Retry Behavior.Respects Retry After Header 8125ms
Retry Behavior.Implements Backoff 15443ms
Retry Behavior.Retries On 500 5226ms
Retry Behavior.Retries On 502 5224ms
Retry Behavior.Retries On 504 5224ms
Retry Behavior.Max Retries Respected 15442ms
Deduplication.Generates Unique Uuids 124ms
Deduplication.Preserves Uuid On Retry 5222ms
Deduplication.Preserves Uuid And Timestamp On Retry 10334ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5228ms
Deduplication.No Duplicate Events In Batch 124ms
Deduplication.Different Events Have Different Uuids 115ms
Compression.Sends Gzip When Enabled 115ms
Batch Format.Uses Proper Batch Structure 113ms
Batch Format.Flush With No Events Sends Nothing 108ms
Batch Format.Multiple Events Batched Together 123ms
Error Handling.Does Not Retry On 403 2115ms
Error Handling.Does Not Retry On 413 2117ms
Error Handling.Retries On 408 5223ms

Feature_Flags Tests

16/16 tests passed

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

@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

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.

1 participant