Skip to content

chore!: Flutter Major Release v6 - #637

Draft
turnipdabeets wants to merge 59 commits into
mainfrom
chore/v6-posthog-ios-4
Draft

turnipdabeets wants to merge 59 commits into
mainfrom
chore/v6-posthog-ios-4

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

This is the posthog_flutter 6.0 release PR. Don't merge it until every item under "Before release" is done. publish.yml releases on every changeset push to main, so merging it publishes 6.0.0. "Release day" and "After release" items don't block the merge. Every stacked 6.0 PR is merged into this branch (chore/v6-posthog-ios-4), and the single changeset is .changeset/v6-major-release.md.

💡 Motivation and Context

posthog_flutter 6.0 wraps posthog-ios 4.0 and posthog-android 4.0:

  • Events go to capture v1 (/i/v1/analytics/events) on iOS, macOS, Android, Windows and Linux. The new captureAi() sends AI events to /i/v1/ai/events. Web keeps posthog-js and doesn't change transport.
  • Per-event capture options, registerOptions(), and one property precedence everywhere: SDK-set, then registered, then event properties, then beforeSend.
  • beforeSend is synchronous and runs on the event the native SDK built.
  • APIs deprecated in 5.x are removed, onFeatureFlags becomes a listener you can unsubscribe, CocoaPods is gone (SPM only), and Flutter 3.41, iOS 15, macOS 11 and Xcode 26 are the new floors.

The upgrade guide is posthog_flutter/MIGRATION.md.

Docs and onboarding that ship with this release (merge once 6.0.0 is on pub.dev):

What gets released

Artifact Bump Why
posthog_flutter 5.60.3 → 6.0.0 Removed APIs, platform interface changes, new native majors, new floors.
posthog-ios dependency 3.x → 4.0.0 ..< 5.0.0 (SPM only) Capture v1, iOS 15 / macOS 11, Xcode 26. The podspec is removed (#697).
posthog-android dependency [3.75.0, 4.0.0) → [4.0.0, 5.0.0), strict (#729) Capture v1. A dependency that pulls posthog-android 5.x fails the build instead of crashing at runtime.
Flutter SDK any → 3.41 or later on every platform (#713) SPM for plugins. Add-to-app modules on iOS need 3.50 (flutter/flutter#184590).

Merged into this branch

PR Change
#638 Remove 5.x-deprecated names (apiKey, enable/disable, sendFeatureFlagEvents, getFeatureFlagPayload, debouncerDelay, PostHogDataMode.cellular, widget states)
#645, #646, #647 Platform enable/disable → optIn/optOut; toMap/fromMap out of the public API; getFeatureFlagResult(sendEvent:) → sendFeatureFlagEvent:
#643, #649 (with #663) Adopt posthog-ios 4.0 and posthog-android 4.0
#662, #694 getFeatureFlagResult() follows config.sendFeatureFlagEvent; isFeatureEnabled(defaultValue:)
#670 (with #695) Posthog().onFeatureFlags() listener with unsubscribe() replaces PostHogConfig.onFeatureFlags
#673 Capture v1 on every platform, per-event options, captureAi. Landed with #678, #679, #681, #682, #686, #688, #690, #698, #699, #701, #703, #704 merged into it (see the landing order in #673)
#697 Remove the podspec and CocoaPods CI
#711 An empty-string variant reads as disabled on every platform
#712 Web doesn't send $app_language until posthog-js supports it
#713 Require Flutter 3.41 or later
#715 registerOptions() / unregisterOptions()
#716, #718, #730 Desktop: false-like process_person_profile kept out of $set dedup; a registered personless setting stays off identity events; docs for identity calls under it
#729 Strict posthog-android 4.x range

main is merged in up to 5.60.3 (0cbea71), including #721 (exclude failed Dart flag values on Windows and Linux). Its new test was adapted to the capture v1 sender.

Release review changes in this PR

2026-11-13

2026-11-05 / 2026-11-06

  • d824b45 merges main (5.60.0). featureFlagRequestMaxRetries (feat(flags): add featureFlagRequestMaxRetries config #702) goes through channel_serialization.dart, and the desktop /flags retry count reads it.
  • e1463a3 runs the SDK compliance harness 1.28.0.
  • aa2cdd2: with beforeSend set, capture, screen, captureException and captureAi threw Binding has not yet been initialized before WidgetsFlutterBinding.ensureInitialized() instead of being skipped with a warning. Fixed, regression test extended.
  • 580fc7f completes the changeset and migration guide (property precedence on iOS, macOS and Android, platform interface changes, iOS reachability, Android JSON null payload, iOS empty-variant isFeatureEnabled()).
  • c5a7956 keeps $lib and $lib_version on Windows and Linux capture v1 events, matching posthog-ios#1036 and posthog-android#942.

Before release

Release day, after 6.0.0 is on pub.dev

These pin ^6.0.0, so they can't merge earlier.

After release

Follow-ups found during the review

No blocking issues.

  • Failed flags on Windows and Linux keep $feature_flag_response: null on $feature_flag_called (fix: exclude failed Dart flag values on Windows and Linux #721, already in 5.60.3), while iOS, macOS and Android 4.0 leave the key out for a failed or missing flag. Small parity fix for a minor.
  • frontend/src/scenes/feature-flags/FeatureFlagSnippets.tsx:578 in the posthog monorepo (remote-config snippet) reads result.payload on a nullable PostHogFeatureFlagResult?, which doesn't compile in Dart. Pre-existing, not 6.0-specific.

Deliberately excluded

💚 How did you test it?

How to build and test this branch (native 4.0 isn't published yet)

build-apple, build-android and CodeQL fail on this PR only because posthog-ios 4.0 and posthog-android 4.0 aren't released. #709 runs this branch's CI against the unreleased native branches, and every check passes there. To build or test locally, point the branch at the same native branches. Verified 2026-11-06 at c5a7956 (iOS simulator, macOS and Android debug builds); the 2026-11-13 changes are a main merge, one test and docs. Don't commit any of this.

iOS / macOS: in posthog_flutter/darwin/posthog_flutter/Package.swift, change the posthog-ios dependency to:

.package(url: "https://github.com/PostHog/posthog-ios", branch: "chore/v4-remove-deprecated"),

Xcode re-resolves the example's Package.resolved to the branch by itself.

Android: publish posthog-android 4.0 to mavenLocal:

git clone --depth 1 -b chore/v4-remove-deprecated https://github.com/PostHog/posthog-android.git /tmp/posthog-android
cd /tmp/posthog-android
sed -i.bak 's/^coreVersion=.*/coreVersion=7.0.0/; s/^androidVersion=.*/androidVersion=4.0.0/' gradle.properties
CI=false ./gradlew :posthog:publishToMavenLocal :posthog-android:publishToMavenLocal  # CI=true requires a signing key

Then add mavenLocal() as the first entry of allprojects { repositories { … } } in example/android/build.gradle.kts.

Gradle resolves [4.0.0, 5.0.0) to the highest 4.x in ~/.m2, so delete any other com/posthog/posthog-android/4.* versions there first. To check, run ./gradlew :app:dependencies --configuration debugRuntimeClasspath | grep com.posthog from example/android. It should print posthog-android:[4.0.0,5.0.0) -> 4.0.0.

Run:

cd example
flutter pub get
flutter run -d <device>          # iOS, macOS or Android
flutter test integration_test    # optional

Automated

  • flutter analyze, dart format, scripts/check-api-dart.sh: clean.
  • flutter test: 1,587 VM tests pass (2026-11-13, after the 5.60.3 merge). Chrome tests pass (the 3 app-version tests need the FLUTTER_BUILD_NAME define that CI's Flutter injects).
  • Compliance adapter unit tests: 36 pass. Compliance harness 1.28.0 in CI: passes.
  • Kotlin plugin unit tests (:posthog_flutter:testDebugUnitTest, not run by CI) against posthog-android 4.0: 67/67.
  • ci: [do not merge] build v6 against unreleased native 4.0 #709 builds iOS, macOS and the iOS plugin tests against posthog-ios chore/v4-remove-deprecated: green. Its Android job was fixed today (signing on mavenLocal publish, repositories), see ci: [do not merge] build v6 against unreleased native 4.0 #709.

On devices, against unreleased native 4.0

Native: posthog-ios and posthog-android chore/v4-remove-deprecated (capture v1 included), wired through a local SPM path package and mavenLocal (version checked in the built APK).

1. Scenario suite against a local capture server (58 scenarios, flutter test integration_test, events checked from the decoded request bodies)

Platform Device Result
Android Pixel 10a, Android 16 58/58
iOS iPhone 14 Pro Max, iOS 26.5.2 (profile build, results posted to the server) 58/58
iOS Simulator, iOS 26.4 58/58
macOS this Mac 58/58

What the scenarios cover:

  • New in 6.0:
    • capture v1: endpoint, PostHog-Sdk-Info header, gzip, root session_id/uuid/timestamp
    • options: per-event options, the legacy $process_person_profile property moved into options, options set in beforeSend
    • captureAi: AI endpoint, returned uuid, beforeSend drop returns null; capture('$ai_…') stays on analytics
    • $locale and $app_language: normalization (pt_BR → pt-BR), kept across reset(), cleared by setAppLanguage(null)
    • onFeatureFlags: loads, unsubscribe()
    • reloadFeatureFlags(): result, and errorsLoading with last-known flags on a 502
    • isFeatureEnabled(defaultValue:): only for unknown flags
    • getFeatureFlagResult: $feature_flag_called by default, sendFeatureFlagEvent: false, config.sendFeatureFlagEvent = false with per-call override, JSON payload, malformed payload → null
    • featureFlagRequestMaxRetries: 0, default and 3 (1, 2 and 4 /flags requests against a 502, with exponential backoff)
  • beforeSend: the 38 scenarios from the feat!: make beforeSend callbacks synchronous #686/fix: keep events and user properties through beforeSend #698 work, now on the final API:
    • ordering against reset/identify/alias/group/register/optOut
    • drop, throw, mutate, rename once
    • hooks that capture, call getters, reset, optOut, setup, identify
    • the built event (uuid, distinct ID, super properties) and close()/setup() right after a capture
    • observer screens, zoned errors, log redaction and drop
    • a 30-cycle identify/capture/reset burst and a 200 ms hook
  • Regression: identify → $identify with $set, group → $groupidentify, optOut/isOptOut/optIn, setPersonPropertiesForFlags reaching /flags, exception steps, getAllFeatureFlags, logs on /i/v1/logs.

Measurements were identical on Android and iOS for retries, defaultValue and payloads. A sync capture() hand-off took 10–154 µs.

2. The example app against real PostHog Cloud (project 381971, through a recording forward proxy, so each request's real response was checked)

Platform Events (capture v1 per-event result) Replay Other
Android, Pixel 10a 19 events, all ok 102 snapshot requests, recording native crash captured and sent on relaunch; Flutter, Dart and isolate errors captured; logs 200; flags and remote config 200
iPhone 14 Pro Max, cold launch Application Opened ok replay snapshot uploaded (200) flags and remote config 200
iOS Simulator 26.4 13 events, all ok 17 snapshot requests, recording logs 200; flags and remote config 200

Events included lifecycle, $screen, custom events, $identify, $create_alias, $groupidentify, $exception, $feature_flag_called, and the beforeSend "modify me" event. The dropped "drop me" event never left the device.

Not tested on a device

  • Windows (CI desktop job only) and Linux (CI and unit tests; not re-run on a device in this review).
  • Surveys and push notifications.
  • Web beyond the Chrome unit tests: web doesn't use capture v1 in 6.0.

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed. posthog.com#20924 and posthog#128557 (drafts, merge at release)
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Made with Claude Code. The 2026-11-05 release review merged main, bumped the compliance harness, fixed one bug, completed the docs and ran the device tests above. The 2026-11-13 review merged main (5.60.3), updated the add-to-app guidance for Flutter 3.50 and reviewed the docs PRs. The device test harness isn't committed.

🤖 Generated with Claude Code

@turnipdabeets turnipdabeets self-assigned this Oct 3, 2026
@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Retrigger

[High risk] Upgrades PostHog iOS SDK and removes deprecated APIs.

The reviewed changes appear safe to merge, with one non-blocking release-note correction.

Reviews (1) · Last reviewed commit: "chore!: adopt posthog-ios 4.0 and remove..."

Comment thread .changeset/v6-posthog-ios-4.md Resolved
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-11-13T23:32:45.446221+00:00
Duration: 369588ms

✅ All Tests Passed!

232/232 tests passed


Capture_V1 Tests

✅ 105/105 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint ✅ 206ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 122ms
Required Headers.Has Authorization Bearer Header ✅ 119ms
Required Headers.Has Content Type Json ✅ 121ms
Required Headers.Has Posthog Sdk Info Format ✅ 118ms
Required Headers.Has Posthog Attempt Header ✅ 117ms
Required Headers.Has Posthog Request Id ✅ 117ms
Required Headers.Has Posthog Request Timestamp ✅ 117ms
Required Headers.Has User Agent ✅ 121ms
Body Format.Body Has Created At And Batch ✅ 120ms
Body Format.No Api Key In Body ✅ 117ms
Body Format.No Sent At In Body ✅ 117ms
Event Format.Event Has Required Root Fields ✅ 116ms
Event Format.Event Uuid Is Valid ✅ 117ms
Event Format.Event Timestamp Is Rfc3339 ✅ 116ms
Event Format.Non Utc Event Timestamp Is Converted To Utc ✅ 115ms
Event Format.Distinct Id Is String ✅ 117ms
Event Format.Distinct Id At Root Not Properties ✅ 115ms
Event Format.Custom Properties Preserved ✅ 115ms
Event Format.Set Properties Preserved ✅ 117ms
Event Format.Set Once Properties Preserved ✅ 115ms
Event Format.Groups Properties Preserved ✅ 115ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 116ms
Event Format.Event Has Required Root Fields Batch ✅ 119ms
Event Format.Event Uuid Is Valid Batch ✅ 119ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 118ms
Event Format.Distinct Id Is String Batch ✅ 119ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 119ms
Event Format.Custom Properties Preserved Batch ✅ 119ms
Event Format.Set Properties Preserved Batch ✅ 121ms
Event Format.Set Once Properties Preserved Batch ✅ 119ms
Event Format.Groups Properties Preserved Batch ✅ 118ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 119ms
Batch Behavior.Multiple Events In Single Batch ✅ 123ms
Batch Behavior.Batch Envelope Smoke ✅ 121ms
Batch Behavior.Flush With No Events Sends Nothing ✅ 107ms
Batch Behavior.Flush At Triggers Batch ✅ 1012ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 117ms
Deduplication.Generates Unique Uuids ✅ 123ms
Deduplication.Different Events Same Content Different Uuids ✅ 116ms
Deduplication.Preserves Uuid On Retry ✅ 5120ms
Deduplication.Preserves Timestamp On Retry ✅ 5122ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5124ms
Deduplication.No Duplicate Events In Batch ✅ 124ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 113ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 10125ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 5120ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2228ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 5123ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 116ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 119ms
Response Format Validation.Success No Retry After When All Ok ✅ 117ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 118ms
Response Format Validation.Success No Retry After When Drop Only ✅ 119ms
Response Format Validation.Response Echoes Request Id ✅ 116ms
Retry Behavior.Retries On 408 ✅ 5121ms
Retry Behavior.Retries On 500 ✅ 5120ms
Retry Behavior.Retries On 503 ✅ 5120ms
Retry Behavior.Retries On 504 ✅ 5120ms
Retry Behavior.Retries On 404 ✅ 5118ms
Retry Behavior.Retries On 429 ✅ 5116ms
Retry Behavior.Retries On 502 ✅ 5120ms
Retry Behavior.Retryable Errors Have Retry After ✅ 2117ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 8122ms
Retry Behavior.Does Not Retry On 400 ✅ 2117ms
Retry Behavior.Does Not Retry On 401 ✅ 2117ms
Retry Behavior.Does Not Retry On 402 ✅ 2118ms
Retry Behavior.Does Not Retry On 413 ✅ 2116ms
Retry Behavior.Does Not Retry On 415 ✅ 2116ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 2117ms
Retry Behavior.Implements Backoff ✅ 12121ms
Partial Batch Handling.Handles 200 Full Success ✅ 2117ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3121ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3119ms
Partial Batch Handling.Does Not Retry Warning Events ✅ 3119ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 5121ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 5122ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 5124ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 5121ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 5122ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 5118ms
Partial Batch Handling.Respects Retry After On Partial ✅ 5121ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3117ms
Partial Batch Handling.Mixed Ok Drop Warning No Retry ✅ 3123ms
Compression.Sends Gzip Content Encoding ✅ 116ms
Compression.No Content Encoding When Disabled ✅ 113ms
Compression.Compressed Body Is Decompressible ✅ 113ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 2115ms
Event Options.Cookieless Mode Override ✅ 114ms
Event Options.Disable Skew Correction Override ✅ 113ms
Event Options.Process Person Profile Override ✅ 113ms
Event Options.Product Tour Id Override ✅ 113ms
Event Options.Unset Options Omitted ✅ 113ms
Event Options.Options Override In Batch ✅ 116ms
Event Options.Unknown Option Passes Through ✅ 114ms
Event Options.Option Value Is Not Converted ✅ 113ms
Event Options.Lenient Bool Option Values Are Not Converted ✅ 113ms
Event Options.Option Wins Over Legacy Property ✅ 112ms
Event Options.Legacy Property Fills Unset Option ✅ 113ms
Event Options.Null Option Falls Back To Legacy Property ✅ 113ms
Property Layers.Caller Property Beats Registered Property ✅ 113ms
Property Layers.Before Send Runs Last ✅ 113ms
Fail Open.Empty Api Key Sends Nothing ✅ 1109ms
Fail Open.Personal Api Key Sends Nothing ✅ 1109ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 115ms

Capture_Ai_V1 Tests

✅ 110/110 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint ✅ 115ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 113ms
Endpoint And Method.Capture Does Not Reroute Ai Named Events ✅ 113ms
Endpoint And Method.Capture Ai Does Not Reroute Non Ai Events ✅ 113ms
Lane Isolation.Failing Ai Lane Does Not Delay Analytics ✅ 5127ms
Required Headers.Has Authorization Bearer Header ✅ 114ms
Required Headers.Has Content Type Json ✅ 113ms
Required Headers.Has Posthog Sdk Info Format ✅ 113ms
Required Headers.Has Posthog Attempt Header ✅ 112ms
Required Headers.Has Posthog Request Id ✅ 112ms
Required Headers.Has Posthog Request Timestamp ✅ 112ms
Required Headers.Has User Agent ✅ 112ms
Body Format.Body Has Created At And Batch ✅ 113ms
Body Format.No Api Key In Body ✅ 112ms
Body Format.No Sent At In Body ✅ 112ms
Event Format.Event Has Required Root Fields ✅ 112ms
Event Format.Event Uuid Is Valid ✅ 113ms
Event Format.Event Timestamp Is Rfc3339 ✅ 112ms
Event Format.Non Utc Event Timestamp Is Converted To Utc ✅ 113ms
Event Format.Distinct Id Is String ✅ 112ms
Event Format.Distinct Id At Root Not Properties ✅ 112ms
Event Format.Custom Properties Preserved ✅ 113ms
Event Format.Set Properties Preserved ✅ 112ms
Event Format.Set Once Properties Preserved ✅ 112ms
Event Format.Groups Properties Preserved ✅ 113ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 113ms
Event Format.Event Has Required Root Fields Batch ✅ 116ms
Event Format.Event Uuid Is Valid Batch ✅ 116ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 116ms
Event Format.Distinct Id Is String Batch ✅ 117ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 116ms
Event Format.Custom Properties Preserved Batch ✅ 116ms
Event Format.Set Properties Preserved Batch ✅ 116ms
Event Format.Set Once Properties Preserved Batch ✅ 116ms
Event Format.Groups Properties Preserved Batch ✅ 116ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 116ms
Batch Behavior.Multiple Events In Single Batch ✅ 120ms
Batch Behavior.Batch Envelope Smoke ✅ 119ms
Batch Behavior.Flush At Triggers Batch ✅ 1011ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 113ms
Deduplication.Generates Unique Uuids ✅ 121ms
Deduplication.Different Events Same Content Different Uuids ✅ 114ms
Deduplication.Preserves Uuid On Retry ✅ 5119ms
Deduplication.Preserves Timestamp On Retry ✅ 5119ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5122ms
Deduplication.No Duplicate Events In Batch ✅ 121ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 114ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 10123ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 5116ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2226ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 5119ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 113ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 117ms
Response Format Validation.Success No Retry After When All Ok ✅ 115ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 115ms
Response Format Validation.Success No Retry After When Drop Only ✅ 115ms
Response Format Validation.Response Echoes Request Id ✅ 113ms
Retry Behavior.Retries On 408 ✅ 5118ms
Retry Behavior.Retries On 500 ✅ 5114ms
Retry Behavior.Retries On 503 ✅ 5120ms
Retry Behavior.Retries On 504 ✅ 5119ms
Retry Behavior.Retries On 404 ✅ 5119ms
Retry Behavior.Retries On 429 ✅ 5118ms
Retry Behavior.Retries On 502 ✅ 5119ms
Retry Behavior.Retryable Errors Have Retry After ✅ 2116ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 8122ms
Retry Behavior.Does Not Retry On 400 ✅ 2116ms
Retry Behavior.Does Not Retry On 401 ✅ 2117ms
Retry Behavior.Does Not Retry On 402 ✅ 2116ms
Retry Behavior.Does Not Retry On 413 ✅ 2116ms
Retry Behavior.Does Not Retry On 415 ✅ 2116ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 2115ms
Retry Behavior.Implements Backoff ✅ 12126ms
Partial Batch Handling.Handles 200 Full Success ✅ 2116ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3121ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3119ms
Partial Batch Handling.Does Not Retry Warning Events ✅ 3119ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 5121ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 5120ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 5122ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 5118ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 5121ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 5121ms
Partial Batch Handling.Respects Retry After On Partial ✅ 5121ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3119ms
Partial Batch Handling.Mixed Ok Drop Warning No Retry ✅ 3122ms
Compression.Sends Gzip Content Encoding ✅ 113ms
Compression.No Content Encoding When Disabled ✅ 112ms
Compression.Compressed Body Is Decompressible ✅ 113ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 2115ms
Event Options.Cookieless Mode Override ✅ 114ms
Event Options.Disable Skew Correction Override ✅ 112ms
Event Options.Process Person Profile Override ✅ 112ms
Event Options.Product Tour Id Override ✅ 112ms
Event Options.Unset Options Omitted ✅ 112ms
Event Options.Options Override In Batch ✅ 116ms
Event Options.Unknown Option Passes Through ✅ 112ms
Event Options.Option Value Is Not Converted ✅ 112ms
Event Options.Lenient Bool Option Values Are Not Converted ✅ 112ms
Event Options.Option Wins Over Legacy Property ✅ 113ms
Event Options.Legacy Property Fills Unset Option ✅ 112ms
Event Options.Null Option Falls Back To Legacy Property ✅ 112ms
Event Size.Event Over Ceiling Is Not Sent ✅ 4024ms
Event Size.Over Ceiling Drop Is Reported Or Logged Without Content ✅ 2176ms
Event Size.Batches Close Before Byte Target ✅ 6090ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 116ms
Property Layers.Caller Property Beats Registered Property ✅ 112ms
Property Layers.Before Send Runs Last ✅ 112ms
Fail Open.Empty Api Key Sends Nothing ✅ 1110ms
Fail Open.Personal Api Key Sends Nothing ✅ 1109ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 17ms
Request Payload.Flags Request Uses V2 Query Param ✅ 12ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 9ms
Request Payload.Flags Request Omits Authorization Header ✅ 9ms
Request Payload.Token In Flags Body Matches Init ✅ 10ms
Request Payload.Groups Round Trip ✅ 9ms
Request Payload.Groups Default To Empty Object ✅ 9ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 9ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 8ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 10ms
Request Lifecycle.No Flags Request On Init Alone ✅ 4ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 111ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 14ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 10ms
Retry Behavior.Retries Flags On 502 ✅ 315ms
Retry Behavior.Retries Flags On 504 ✅ 315ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 116ms

@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch 3 times, most recently from b996dea to 047d564 Compare October 5, 2026 17:19
@turnipdabeets
turnipdabeets marked this pull request as ready for review October 6, 2026 22:09
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 6, 2026 22:09
@turnipdabeets turnipdabeets changed the title chore!: adopt posthog-ios 4.0 and remove deprecated APIs for v6 chore!: Flutter Major Release v6 Oct 7, 2026
@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from 0ae4f04 to 9279d41 Compare October 7, 2026 00:31
@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from 5fced53 to 5022778 Compare October 7, 2026 20:01
@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from e1927f4 to a700edb Compare October 8, 2026 15:45
@github-actions

Copy link
Copy Markdown
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@github-actions github-actions Bot added the stale label Oct 16, 2026
Comment thread .changeset/v6-hide-serialization.md Resolved
@marandaneto
marandaneto requested a review from a team October 21, 2026 11:49
#716)

* fix(desktop): keep false-like process_person_profile out of $set dedup

Capture reads 'no', 'false', 'off', 0 and 0.0 as false, so a $set sent
with one of them is personless. The desktop core only recognised boolean
false, cached that event's hash, and dropped the next identical
setPersonProperties as a duplicate, losing the profile update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(desktop): clear the $set dedup hash for non-boolean person processing

Capture reads strings and numbers such as 'yes' or 'no' either way, so a
$set sent with one leaves the profile's state unknown. Keeping the old
hash dropped a later revert to that value; clear it instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
turnipdabeets and others added 2 commits November 9, 2026 22:01
…ty layer

Another library's $lib no longer gets posthog-flutter's version, and a
$lib_version without $lib is replaced, per sdk-specs#146 and matching
posthog-ios#1050 and posthog-android#956.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #652 (keep the Android surveys delegate across repeated setup) and the
5.60.1 release. PosthogFlutterPlugin.kt keeps both sides: v6's feature flags
subscription field and unsubscribe on detach, plus main's engine lifecycle
listener and surveys delegate detach.

Claude-Session: https://claude.ai/code/session_019xLynttdFZAHfqTem5BhPQ
turnipdabeets added a commit that referenced this pull request Nov 10, 2026
…v6-native-4-prerelease

Picks up #637's latest, including its merge of main. No conflicts.

Claude-Session: https://claude.ai/code/session_019xLynttdFZAHfqTem5BhPQ
turnipdabeets and others added 2 commits November 10, 2026 11:34
…he 6.0 guide

Make the $lib/$lib_version pair rule platform-wide now that iOS #1050 and
Android #956 fill the pair, widen the missing-flag $feature_flag_response
change to iOS and macOS, document null handling on iOS/macOS/Android, how an
empty distinct ID from Dart vs native beforeSend behaves, and rolling back
to 5.x.

Claude-Session: https://claude.ai/code/session_019xLynttdFZAHfqTem5BhPQ
…etting (#718)

* docs: show how to keep identity calls under a registered personless setting

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: point registered personless users to identifiedOnly and note billing

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Anna Garcia <anna.g@posthog.com>
gewenyu99 added a commit that referenced this pull request Nov 11, 2026
)

* docs: generate the Flutter SDK reference for 5.x

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs: generate the Flutter SDK reference for the 6.x experimental major

Generated from feat/v6-desktop-capture-v1 (#637 and #673) with the capability tags applied.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs: regenerate the Flutter references from dart doc

The 6.x page comes from chore/v6-posthog-ios-4 (the 6.0 branch) with the
capability tags and getting-started applied. Both still need to land there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: regenerate the Flutter references with code braces and clean signatures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: regenerate the Flutter 6.x reference with Capture AI and On feature flags

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: add the Flutter 5.x to 6.0 migration page

Built from posthog_flutter/MIGRATION.md on chore/v6-posthog-ios-4 (#637),
the way the generator builds it once that guide is on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: regenerate the Flutter migration page from the current 6.0 guide

Rebuilt from posthog_flutter/MIGRATION.md on chore/v6-posthog-ios-4, which now
notes the beforeSend option loss on native and the new flag and event fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: regenerate the Flutter references

Member headings show their names again, and the 6.x and migration pages are
rebuilt from the current chore/v6-posthog-ios-4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: regenerate the references with the getting-started intro

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
turnipdabeets and others added 3 commits November 12, 2026 10:07
# Conflicts:
#	posthog_flutter/lib/posthog_flutter_web.dart
#	posthog_flutter/lib/src/posthog_flutter_web_handler.dart
#	posthog_flutter/test/web_before_send_test.dart
#	pubspec.lock
…file false

A $set sent with process_person_profile: false kept the stored hash, so
reverting to the previous properties was dropped as a duplicate. Clear it
for every value other than missing or true, per PostHog/sdk-specs#208 and
posthog-ios 4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecklist

posthog-android 4.0 shares the 3.x queue folder and keeps options on the
queued event, so a rollback loses them on Android as on iOS. Add the
pre-upgrade steps the guide asks for to the checklist, give the posthog-ios
2.x queue note its own heading, and split run-on paragraphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eli-r-ph

Copy link
Copy Markdown

posthog_flutter/MIGRATION.md:266 links https://posthog.com/docs/libraries/capture-v1. That page is removed in the capture v1 docs (PostHog/posthog.com#21385, on PostHog/posthog.com#22061) and now redirects to the SDK overview. The other links to it were moved to /docs/api/capture-v1, so this one can point there too.

@turnipdabeets

Copy link
Copy Markdown
Contributor Author

Fixed in 862cdd3: the MIGRATION.md link now points to /docs/api/capture-v1. The two inline threads were already fixed in 84ee635 and 88594d6.

turnipdabeets and others added 2 commits November 12, 2026 15:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….x rollback

Verified on the iOS simulator and the Android emulator: AI events 6.0
queued stay on the device while 5.x runs and are sent once the app is on
6.x again, and options registered with registerOptions() return with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
turnipdabeets and others added 2 commits November 13, 2026 12:58
A plain range lets Gradle raise posthog-android past 4.x when something else
in the app asks for a newer major, and the plugin, compiled against 4.x, would
crash at runtime instead of failing the build.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@eli-r-ph

Copy link
Copy Markdown

The Dart test jobs fail on posthog_core_failed_flags_test.dart, which #721 added to main. It runs here through the PR merge with main and fails against the capture v1 sender. Merging main and adapting that test should clear it.

#721's failed-flags test answered every request with a /flags body,
which the capture v1 sender reads as a 2xx without per-event results.
Answer only /flags with it so capture gets its default results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@turnipdabeets

Copy link
Copy Markdown
Contributor Author

Merged main (5.60.3) in 0cbea71. #721's test answered every request with the /flags body, so the capture v1 sender got a 2xx without per-event results; it now answers only /flags with it. flutter test passes locally (1,587), API snapshot unchanged.

Flutter 3.50.0 stable (2026-11-11) ships flutter/flutter#184590, so
`flutter build swift-package` no longer needs a podspec for a module's
plugins. Verified: a 3.50 module with posthog_flutter 6 generates and
compiles its Swift package for the iOS simulator. Modules don't target
macOS, so the module text covers iOS only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
turnipdabeets added a commit that referenced this pull request Nov 13, 2026
Keeps this branch's restructured MIGRATION.md and changeset, and carries
over what changed on #637 since the last merge:
- #730: a registered process_person_profile no longer applies to
  identity events, so "Fix identity calls" becomes "Check registered
  person processing" and the identify example goes away
- #729: Android build fails instead of crashing past posthog-android 4.x
- e1178f8: iOS add-to-app modules work on Flutter 3.50.0
- 862cdd3: capture v1 link points at /docs/api/capture-v1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ange (#726)

* docs: sort the Flutter 6.0.0 migration guide by when you make each change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: keep the 6.0.0 guide's table cells to one value

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: name the platforms that move to capture v1 in the 6.0.0 guide

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: move the posthog.com Flutter SDK page into the reference

The posthog.com Flutter SDK page redirects to this reference once
6.0.0 ships, so its setup, how-to, and product sections now live in
docs/getting-started.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: title a single migration guide's page with its H1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit efbeb50)

* Revert "docs: move the posthog.com Flutter SDK page into the reference"

This reverts commit 5a477a6.

* docs: add the Flutter facts from the retired posthog.com page that no other page has

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: preserve flutter reference details

* docs: name the SDK in versions, cut self-hosted notes, and split dashes and semicolons

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: address review on the sorted 6.0.0 migration guide

- Intro: only analytics and AI events move to capture v1; replay, logs,
  flags and web keep their endpoints
- Follow ups: say why they can wait (6.x.x still accepts the old names)
- Redirects: iOS, macOS and Android follow the same same-origin 307/308
  rule; in 5.x.x they followed redirects to any host
- Native guide links point at #prepare-your-proxy and the native
  long-ID sections, which now exist there
- Send AI events: $ai_* events sent with capture still arrive, so the
  move to captureAi stays a follow up
- Checklist items for the six sections that had none (flag values,
  batch sizes, timestamps and IDs, queued events, reachability, rollback)
- Regenerate references/posthog-flutter-migration.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Anna Garcia <anna.g@posthog.com>

This branch has not been deployed

No deployments
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.

$locale collected different from iOS

5 participants