Repository navigation
chore!: remove PostHogDataMode.cellular for v4 - #890
Merged
turnipdabeets merged 1 commit intoOct 5, 2026
Merged
Conversation
Contributor
posthog-ios Compliance ReportDate: 2026-10-05 16:59:23 UTC
|
| Test | Status | Duration |
|---|---|---|
| Format Validation.Event Has Required Fields | ✅ | 2991ms |
| Format Validation.Event Has Uuid | ✅ | 3237ms |
| Format Validation.Event Has Lib Properties | ✅ | 460ms |
| Format Validation.Distinct Id Is String | ✅ | 3107ms |
| Format Validation.Token Is Present | ✅ | 3020ms |
| Format Validation.Custom Properties Preserved | ✅ | 2830ms |
| Format Validation.Event Has Timestamp | ✅ | 2778ms |
| Retry Behavior.Retries On 503 | ✅ | 11734ms |
| Retry Behavior.Does Not Retry On 400 | ✅ | 4806ms |
| Retry Behavior.Does Not Retry On 401 | ✅ | 5095ms |
| Retry Behavior.Respects Retry After Header | ✅ | 7832ms |
| Retry Behavior.Implements Backoff | ✅ | 21725ms |
| Retry Behavior.Retries On 500 | ✅ | 9632ms |
| Retry Behavior.Retries On 502 | ✅ | 6136ms |
| Retry Behavior.Retries On 504 | ✅ | 9308ms |
| Retry Behavior.Max Retries Respected | ❌ | 15592ms |
| Deduplication.Generates Unique Uuids | ✅ | 3151ms |
| Deduplication.Preserves Uuid On Retry | ✅ | 9278ms |
| Deduplication.Preserves Uuid And Timestamp On Retry | ✅ | 16349ms |
| Deduplication.Preserves Uuid And Timestamp On Batch Retry | ✅ | 7911ms |
| Deduplication.No Duplicate Events In Batch | ✅ | 2884ms |
| Deduplication.Different Events Have Different Uuids | ✅ | 2788ms |
| Compression.Sends Gzip When Enabled | ✅ | 2943ms |
| Batch Format.Uses Proper Batch Structure | ✅ | 2844ms |
| Batch Format.Flush With No Events Sends Nothing | ✅ | 208ms |
| Batch Format.Multiple Events Batched Together | ✅ | 2966ms |
| Error Handling.Does Not Retry On 403 | ✅ | 4828ms |
| Error Handling.Does Not Retry On 413 | ✅ | 4771ms |
| Error Handling.Retries On 408 | ✅ | 5440ms |
Failures
retry_behavior.max_retries_respected
Expected 4 requests, got 5
Feature_Flags Tests
✅ 16/16 tests passed
View Details
| Test | Status | Duration |
|---|---|---|
| Request Payload.Request With Person Properties Device Id | ✅ | 2992ms |
| Request Payload.Flags Request Uses V2 Query Param | ✅ | 2777ms |
| Request Payload.Flags Request Hits Flags Path Not Decide | ✅ | 2858ms |
| Request Payload.Flags Request Omits Authorization Header | ✅ | 2937ms |
| Request Payload.Token In Flags Body Matches Init | ✅ | 2865ms |
| Request Payload.Groups Round Trip | ✅ | 2926ms |
| Request Payload.Groups Default To Empty Object | ✅ | 2897ms |
| Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It | ✅ | 2941ms |
| Request Payload.Disable Geoip False Propagates As Geoip Disable False | ✅ | 2840ms |
| Request Payload.Disable Geoip Omitted Defaults To False | ✅ | 2955ms |
| Request Payload.Flag Keys To Evaluate Contains Only Requested Key | ✅ | 3004ms |
| Request Lifecycle.No Flags Request On Init Alone | ✅ | 215ms |
| Request Lifecycle.No Flags Request On Normal Capture | ✅ | 471ms |
| Request Lifecycle.Two Flag Calls Produce Two Remote Requests | ✅ | 5808ms |
| Request Lifecycle.Mock Response Value Is Returned To Caller | ✅ | 2893ms |
| Side Effect Events.Get Feature Flag Captures Feature Flag Called Event | ✅ | 3178ms |
This was referenced Oct 2, 2026
turnipdabeets
force-pushed
the
chore/v4-remove-datamode-cellular
branch
from
October 5, 2026 16:16
3794607 to
d9bb4e9
Compare
turnipdabeets
force-pushed
the
chore/v4-remove-deprecated
branch
from
October 5, 2026 16:16
6db44c0 to
9393686
Compare
PostHogDataMode.cellular has always behaved the same as .any. Remove it; callers switch to .any with identical flushing behavior. .wifi and .any keep explicit raw values 0 and 2 so the Objective-C constants and any stored raw values stay the same as in 3.x. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
turnipdabeets
force-pushed
the
chore/v4-remove-datamode-cellular
branch
from
October 5, 2026 16:42
d9bb4e9 to
56834d2
Compare
turnipdabeets
marked this pull request as ready for review
October 5, 2026 17:13
Contributor
|
[High risk] Removes a public API enum case in a major version. The PR appears safe to merge as part of the planned v4 API removal. Reviews (1) · Last reviewed commit: "chore!: remove PostHogDataMode.cellular ..." |
dustinbyrne
approved these changes
Oct 5, 2026
turnipdabeets
added a commit
that referenced
this pull request
Oct 7, 2026
PostHogDataMode.cellular has always behaved the same as .any. Remove it; callers switch to .any with identical flushing behavior. .wifi and .any keep explicit raw values 0 and 2 so the Objective-C constants and any stored raw values stay the same as in 3.x. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
turnipdabeets
added a commit
that referenced
this pull request
Oct 9, 2026
PostHogDataMode.cellular has always behaved the same as .any. Remove it; callers switch to .any with identical flushing behavior. .wifi and .any keep explicit raw values 0 and 2 so the Objective-C constants and any stored raw values stay the same as in 3.x. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
turnipdabeets
added a commit
that referenced
this pull request
Oct 20, 2026
PostHogDataMode.cellular has always behaved the same as .any. Remove it; callers switch to .any with identical flushing behavior. .wifi and .any keep explicit raw values 0 and 2 so the Objective-C constants and any stored raw values stay the same as in 3.x. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
1 of 5 tasks
turnipdabeets
added a commit
that referenced
this pull request
Oct 23, 2026
PostHogDataMode.cellular has always behaved the same as .any. Remove it; callers switch to .any with identical flushing behavior. .wifi and .any keep explicit raw values 0 and 2 so the Objective-C constants and any stored raw values stay the same as in 3.x. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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
Part of the 4.0 stack, on top of #873.
Removes
PostHogDataMode.cellular. It was deprecated in 3.x by #891 (merged) because it has never done anything different from.any:dataModeis only read inPostHogQueue.updatePauseState. The queue pauses when there is no connection, or whendataMode == .wifiand the device isn't on Wi-Fi. Every other case sends, so.cellularfalls through exactly like.any.Nothing changes at runtime. Anyone using
.cellularswitches to.anyand gets identical behavior.Migration: replace
.cellularwith.any(PostHogDataModeCellularwithPostHogDataModeAnyin Objective-C).Raw values
PostHogDataModeis an@objcIntenum. Without explicit raw values, removing the middle case would renumber.anyfrom 2 to 1. This PR pins them:case wifi = 0,case any = 2. The generated header now hasPostHogDataModeWifi = 0andPostHogDataModeAny = 2, the same as 3.x.Why keep
.anyat 2:2baked in forPostHogDataModeAny. It keeps meaning "any".rawValuekeeps working. A stale1(the old.cellular) still behaves like.any, because the queue only checks== .wifi.PostHogDataMode(rawValue: 1)returnsnil.Changes
PostHogDataMode.cellularremoved..wifiand.anyget explicit raw values 0 and 2.posthog-iosmajor.API snapshot diff:
No tests or example apps referenced
PostHogDataMode.cellular.Reachability.Connection.cellularand$network_cellularare separate and untouched.Wrapper SDKs
"cellular"to.anyand deprecates the DartPostHogDataMode.cellular. PostHog/posthog-flutter#637 (v6, draft) removes the Dart value; it currently conflicts withmainon that sameswitchand needs a rebase.PosthogReactNativePlugin.swiftnever setsdataMode.dataMode.💚 How did you test it?
make test: passed (XCTest: 169 tests, 0 failures; Swift Testing: 909 tests in 147 suites)make buildSdk: succeeded for iOS, macOS, tvOS, watchOS and visionOSmake apiCheck: showed only the two removedcellularlines above. Snapshot updated withmake apiUpdate.PostHog-Swift.hforPostHogDataModeWifi = 0andPostHogDataModeAny = 2..wifiand.anyis unchanged, and the existingdataModedefault check inPostHogConfigTeststill passes.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code made the change, ran
make format,make test,make buildSdkandmake apiCheck/apiUpdate, and checked the generated Objective-C header. The main decision was pinning raw values so.anystays 2 (see above), rather than letting it renumber to 1.🤖 Generated with Claude Code