Repository navigation
feat!: posthog-android 4.0 and posthog 7.0 - #871
Merged
Merged
Conversation
Contributor
posthog-android Compliance ReportDate: 2026-11-20T14:58:22.840227+00:00 ✅ All Tests Passed!232/232 tests passed Capture_V1 Tests✅ 105/105 tests passed View Details
Capture_Ai_V1 Tests✅ 110/110 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
4 of 5 tasks
marandaneto
marked this pull request as draft
October 23, 2026 08:55
Member
|
moved to draft since its not mergeable yet |
turnipdabeets
force-pushed
the
chore/v4-remove-deprecated
branch
from
October 23, 2026 15:47
48776ff to
2f486a0
Compare
This was referenced Oct 23, 2026
Merged
turnipdabeets
marked this pull request as ready for review
October 24, 2026 15:58
This was referenced Oct 24, 2026
turnipdabeets
force-pushed
the
chore/v4-remove-deprecated
branch
from
October 26, 2026 16:29
2f486a0 to
a41d9b9
Compare
5 of 6 tasks
Remove the public APIs already marked deprecated: apiKey and the apiKey factories, propertiesSanitizer and PostHogPropertiesSanitizer, evaluationEnvironments, getFeatureFlagPayload, and the replay debouncerDelayMs. remoteConfig moves to its own change because setting it to false still changes setup behavior. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
turnipdabeets
force-pushed
the
chore/v4-remove-deprecated
branch
from
October 26, 2026 18:47
a41d9b9 to
caf64bd
Compare
turnipdabeets
marked this pull request as draft
October 26, 2026 22:43
Matches posthog-ios 4.0 and the sdk-specs payload decoding contract.
* chore!: make SDK-internal helpers non-public for posthog-android 4.0 Make internal the public declarations that no other module in this repo and no wrapper (Flutter, React Native, KMP) uses. LogLine and LogcatParser are Java, so they become package-private. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix: keep GzipRequestInterceptor public for the compliance adapter sdk_compliance_adapter is a separate Gradle module, only included by its Dockerfile, and constructs GzipRequestInterceptor directly. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Setup now always loads /config. With remoteConfig = false, setup used to skip /config, which left remote settings unloaded since /flags stopped returning config. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
10 of 15 tasks
* chore!: pass the load result to the feature flags callback PostHogConfig.onFeatureFlags and reloadFeatureFlags() now take a PostHogFeatureFlagsCallback, whose loaded() receives a PostHogFeatureFlagsLoaded with the enabled flags, their values, and errorsLoading, matching posthog-ios 4.0. Every path that invoked the callback passes an accurate result, including failures, a disabled SDK, and bootstrap. PostHogOnFeatureFlags moves to posthog-server under the same name, so the server's API is unchanged and it can drop the type in its own major. * chore: drop the unused server callback wrapper posthog-server calls its own PostHogOnFeatureFlags directly, and the core stateless client never calls config.onFeatureFlags. Bump posthog-server to minor since it now depends on core 7.0, and document that a bootstrapped onFeatureFlags runs on the setup() thread. * fix: report persisted flags when the first flags load fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: isolate the bootstrap internal flags callback from setup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep loaded flags when a flags reload fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: retry flag cache hydration while storage is unreadable A failed load now hydrates the flag cache before the callback. Under Direct Boot that read returned empty values and latched, so persisted flags stayed hidden after unlock. Only latch once the preferences are readable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: skip flag cache reads while storage is unreadable Every flag getter retried hydration under Direct Boot and re-read each cached key, each read failing against locked preferences. Check availability once and skip the reads until storage is readable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: don't let cache hydration undo a concurrent reset Hydration reads the cache off the flags lock, so a reset() landing between the read and the commit had the previous identity's flags restored. clear() now bumps a generation and hydration drops a commit from an older one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 28, 2026
The text-area inset was applied to the already-clipped visible rect, so an EditText or Button scrolled partly out of its parent left a strip of text unmasked. Inset the unclipped bounds, then intersect them with the visible rect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A proxy that strips Authorization makes every batch return 401, which was only logged at debug level. Print one warning even with debug off, and drop the unused isFalseOptionValue helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core 7 no longer supports it as an entry point; point callers at posthog-server instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PostHogInternal on the class doesn't cover its public companion, so EndpointSpec, LocalEvaluationApiResponse and PostHogPreferences companions still showed up in posthog.api. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
posthog-server 2.25.x and older crash with NoSuchMethodError when an app on posthog-android 4.0.0 pulls in core 7. Add a Gradle constraint, like the posthog-android one, so Gradle upgrades posthog-server to 2.26.0, the first release built against core 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sformed The text-area inset used the untransformed width and padding, so an EditText or Button inside a scaled parent got a mask smaller than what it draws. Keep the full visible rect when the view or an ancestor has a transform, and stop ignoring Rect.intersect's result, which lint flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 19, 2026
Closed
posthog-server 2.26.0 pulls in core 7, which makes Gradle upgrade a posthog-android 3.x in the same module to 4.0. Label it so release notes and Dependabot PRs show it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ioannisj
approved these changes
Nov 20, 2026
marandaneto
reviewed
Nov 20, 2026
marandaneto
left a comment
Member
There was a problem hiding this comment.
Agent-drafted and reviewed by Manoel.
marandaneto
reviewed
Nov 20, 2026
| @@ -0,0 +1,15 @@ | |||
| --- | |||
| 'posthog-server': minor | |||
Member
There was a problem hiding this comment.
theres a thread about this already, are you sure this does not need to be major?
Contributor
Author
There was a problem hiding this comment.
discussed in slack: https://posthog.slack.com/archives/C0ACMS2BNTU/p1795185547955689
marandaneto
reviewed
Nov 20, 2026
| - '.github/workflows/sdk-compliance-tests.yml' | ||
| pull_request: | ||
| branches: [ main ] | ||
| branches: [ main, 'chore/v4-*', 'feat/v4-*' ] |
Member
There was a problem hiding this comment.
we shoul rollback those changes
captureAi measures the event on the caller's thread but writes it later, so a caller reusing a nested list could grow it past the limit. AI events now get their own nested values even without beforeSend hooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Capture v1 retries a uuid's first copy and drops later copies in the same batch for good, so the disk queue keeps only the first matching file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sendBuiltEventForWrapper on the AI lane measured the event but kept the wrapper's nested values, so editing the built event afterwards could grow it past captureAiMaxEventBytes. It now copies them, as captureAi does.
turnipdabeets
added a commit
that referenced
this pull request
Nov 20, 2026
4.0 landed on main (#871), so take main's tree everywhere and keep only this PR's workflow change. Drop the 4.0 changesets main's release already consumed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Important
This is the posthog-android 4.0 integration PR. Don't merge it until every item under "Before release" is done. "Release day" and "After release" items don't block the merge. All stacked 4.0 PRs are merged into this branch (
chore/v4-remove-deprecated), and this PR merges them intomainat once. The branch carries the core and Android changeset.changeset/android-v4-major.md, the Android-only.changeset/android-v4-replay-and-device.md, and the server-only.changeset/server-keep-on-feature-flags.md.Closes #822
💡 Motivation and Context
posthog-android 4.0 and core
posthog7.0:/i/v1/analytics/events), and the newcaptureAisends AI events to/i/v1/ai/events.options, and one property precedence: SDK-set, then super properties, then event properties, thenbeforeSend.The upgrade guide is
MIGRATION.md.Docs and onboarding that ship with this release (merge once 4.0.0 is on Maven Central):
projectToken,4.+,onFeatureFlags), Compose and WebView replay masking, removed replay installation snippetprojectToken,4.+, screenshot-only replay) and the Android, iOS and FluttercaptureAitabs in LLM analytics manual captureWhat gets released
posthog-androidposthog(core)PostHog,PostHogConfig,PostHogInterfaceand the flags types live in core, so the Android API breaks are core API breaks. Apps get core 7.0 throughposthog-android4.0.posthog-serverapi(project(":posthog")), so 2.26 pulls in core 7.0. 2.25.0 already shipped frommainon core 6.50.0. Its own API is unchanged (PostHogOnFeatureFlagsmoves into it with the same name), it stays on/batchand its ownPostHogMemoryQueue, andPostHogEventkeeps its 3.x constructor andcopy.posthog-android-surveys-composemainand here, and it only uses APIs 4.0 keeps, so the published 0.5.x works with 4.0. Verified on device (survey below).posthog-server-openfeaturecom.posthog.server.*.The Flutter and React Native Android plugins are unaffected until they move to 4.0: Flutter 5 pins
[3.75.0,4.0.0)and React Native pins exact 3.x versions. With #974, core 7.0 makes Gradle upgrade the app'sposthog-android3.x to 4.0, soposthog-server2.26 next toposthog-android3.x resolves 4.0 instead of crashing at runtime. A Flutter 5 app that also pulls in core 7 still crashes at runtime: theposthog_flutter5 plugin compiles in its own Gradle project against 3.x and calls APIs 4.0 removes (checked with posthog_flutter 5.60.2). The guide covers both.Merged into this branch
apiKey,propertiesSanitizer,evaluationEnvironments,getFeatureFlagPayload(),debouncerDelayMsremoteConfigoptionPostHogFeatureFlagsCallback)onFeatureFlagslistener you can unsubscribenullfor malformed feature flag payloadsdefaultValuefromgetFeatureFlagPostHogConfig.onFeatureFlagsin favor of the listenerposthog-androidto core's major with a Gradle constraintMIGRATION.md, the guide describes #974's Gradle upgrade, and two personless dedup tests test something again$liband$lib_versionon capture v1 events, filled last and as a paironFeatureFlagsaftersetup()gets its catch-up on the main thread without waiting for the startup loadgetFeatureFlagResultandPostHogFeatureFlagsLoaded@PostHogInternaldeclarations from the API dump$feature_flag_responsefor a missing flagnullarray elements in event properties$process_person_profile(or wrapper-registered option) no longer applies to$identify,$create_alias,$merge_dangerously,$groupidentify,$setand$set_once, so it can't stop identifying userssurveysby default, matching iOS, Flutter, React Native, web and KMP. Surveys still only display withposthog-android-surveys-composeor asurveysDelegate. Its changeset line is inandroid-v4-major.md, andMIGRATION.mdhas a "Check surveys" sectionTextIndent, read cleared text semantics on Compose 1.0–1.2 instead of discarding the frame, and re-queue a 3.x event stored twice only oncecaptureAi,$locale/$app_language, wrapperbeforeSend, and the capture v1 fixes (#897, #901, #902, #903, #904, #905, #909, #924, #927, #928, #929, #930, #934)mainis merged in up to the 3.76.0 release, including #922 (drop touches inside masked views), #937 (no$feature_flag_calledfor survey targeting flags) and #823 (compose activity and dialog windows into one scene, released in 3.76.0). A follow-up commit makes #922's touch hit test read the unmerged semantics tree, which the 4.0 mask walk uses. #823 is adapted to 4.0, which removes wireframe mode andRRStyle: a dialog's dim is a small translucent screenshot image stretched over the scene, and a dialog masked whole is a masked screenshot. Only that part is in the 4.0 changeset, since 3.76.0 already released the composed scene.mainis then merged up to 3.77.1, later up to #982 (Gradle plugin: runposthog-clithroughcmd /con Windows), and then up to the Gradle plugin 1.8.1 release and the dependency bumps #986–#990 (64758b74). 1.8.1 released #982's changeset frommain, so this branch no longer carries it. The earlier merges brought in #967 (person-properties hash stored once the update is queued), #971 (disableGeoIp) and #970 (failed flag records read as unavailable). Where they conflicted with 4.0, 4.0's shape is kept and main's behavior comes through:getFeatureFlagreturnsnull(4.0 has nodefaultValue), and its$feature_flag_calledomits$feature_flag_responseinstead of sending"", with main's$feature_flag_error(evaluation_failed, …) added.disableGeoIpstamps$geoip_disableafter the caller's properties, as onmain. Under capture v1 it stays an event property (the capture v1 spec'sgeoip_disable_injected_into_properties), not an option, and it's on the minimal$feature_flag_calledallowlist next to the legacy option properties.main, so the 4.0 changesets are unchanged.sdk-specs: 4.0 implements the capture v1 contract (PostHog/sdk-specs#146, #147) and the property precedence from PostHog/sdk-specs#143. #881's description lists where Android differs from the spec. An event named only with whitespace is sent, as the capture spec only requires a non-empty name.
Release review changes in this PR
posthog-serverguidance named 2.25.0, which already shipped frommainon core 6.50.0. The guide and server changeset now say 2.26.0 (0ed079c7).maskAllTextInputs = false, text inside a Compose container markedpassword()(a custom PIN or OTP display) was recorded unmasked, because 4.0 reads the unmerged semantics tree. 3.x masked it. Fixed in08e92e8bwith a regression test that fails without the fix.Retry-After, migrated 3.x queues, non-string map keys). The server changeset now lists the core changes it also gets:PostHogEvent.options, the map key fix,beforeSendcopies and quieter debug logs.posthog-android4.0.0 or later instead of4.+; PostHog no longer saves non-JSON payloads, so only older payloads are affected; the first event after a language change carries the previous$localeor$app_language, and a runtimesetOverrideLocaleConfigchange alone isn't picked up (both confirmed on API 32 and API 37 emulators); a self-hosted proxy set up from PostHog's guides before 29 October 2026 stripsAuthorization, so events get401and are dropped.PostHogMemoryPreferences) afterclose()andsetup()threw aNullPointerExceptionto the caller when a cached failed flag had no metadata. fix(flags): decode payloads cached by 3.x from the cached flag details #935's 3.x payload migration readmetadata.payloadunguarded. Fixed in3cf406d4with a regression test. Android'sSharedPreferencescache wasn't affected.references/posthog-android-migration.mdfromMIGRATION.md(7bd8b195). It still said a registered$process_person_profilereachesidentify,alias,groupandsetPersonProperties, which fix: keep a registered personless setting off identity events #979 changed. The release regenerates it too, but only as a best-effort step.debugon (found on the Android 8 run).Before release
surveysdefaults totrue) and added it to the table above.references/posthog-android-migration.mdis regenerated with its "Check surveys" section (6248fc68).MIGRATION.mdopens with a link tohttps://posthog.com/docs/api/capture-v1, which is a 404 until it merges. ThecaptureAidocs (#21963) are merged into its branch too. Not a hard blocker: the upgrade steps don't depend on that page.Release day, after 4.0.0 is on Maven Central
These pin
4.+, so they can't merge earlier. Until they do, the docs and onboarding pin3.+and their snippets compile on 3.x, so a few days' lag is fine.context_mill_version(feat: install SDKs at the docs' version and keep agents on today's majors context-mill#502, feat(cli): add --context-mill-version to pin skills to a release wizard#1541, feat(wizard): pin cloud runs to a context-mill release posthog#132411, all merged). Programs that aren't pinned move to 4.x with the next context-mill release after the docs merge, as intended.evaluation-contexts.mdxrow also says iOS removedevaluationEnvironmentsin 4.0.0. It also fixeslibraries/android/index.mdxfor 4.0 (projectToken, removed options, surveys default, a link to the guide), so it doesn't wait for #22334 and the other mobile majors.projectToken, replay) and thecaptureAitabs. posthog-ios 4.0 ships the same day as Android 4.0. Its Flutter tab pins posthog_flutter 6.0, so it also waits for Flutter 6 unless that tab is split out.After release
MIGRATION.md-based migration page, after the iOS, Android, Flutter and React Native majors publish their references. #22061 now covers only Python, JavaScript Web, Node.js, Go and Rust.android-v4.0.0tag.chore/v4-*/feat/v4-*filters from the compliance workflow.$app_language($localecollected different from iOS #822): chore(taxonomy): add $app_language for mobile SDKs posthog#128366 (taxonomy) is merged; add a "Most common app language" tile ($app_languagebreakdown) to the global Mobile Analytics dashboard template, then close$localecollected different from iOS #822 and reply to the reporter.Follow-ups found during the review
No blocking issues. Nothing needs a follow-up PR before release.
A Gradle constraint for
posthog-server, like fix: align posthog-android to core's major with a Gradle constraint #974's forposthog-android? An app withposthog-android4.0 andposthog-server2.25.x or older (directly or throughposthog-server-openfeature0.1.3) resolves core 7.0, and theirasCoreConfigthen fails at setup withNoSuchMethodError(it passesremoteConfigandonFeatureFlags). The guide documents it. A constraint would need the server version that ships with core 7.0.Session replay drops frames with a
SelectionContainer. When text masking is on and a screen hasText(…, Modifier.clearAndSetSemantics { … })inside aSelectionContainer, the text node (SelectableTextAnnotatedStringNode) can't be measured, so the frame is discarded instead of masked. It's deliberate (fail closed, covered byframe is discarded when cleared semantics hide text we cannot measure), but neither the changeset nor the guide mentions it.Low confidence:
textPaintedBoundsCacheis keyed by semantics node ID only. IDs are unique perSemanticsOwner, so two ComposeViews with the same node ID, text and size but a different shadow or stroke could share masked bounds.Nit: the compliance adapter maps the harness's
max_retriestopushNotificationSubscriptionMaxRetries, which doesn't affect capture retries.@turnipdabeets: decide who should fix remote config on Android 6 and 7.0. It isn't new in 4.0 and doesn't block the release.
us-assets.i.posthog.comandeu-assets.i.posthog.comserve a Let's Encrypt certificate chained to ISRG Root X1, which Android 7.0 and older don't trust, so/array/{token}/configfails withSSLHandshakeException: Trust anchor for certification path not found./flagsand capture work, becauseus.i.posthog.comuses Amazon's chain. Without remote config, those devices never start session replay, exception autocapture (Java/Kotlin and native) or surveys. Events, flags, logs and AI events still work, and nothing crashes. 3.x already always loaded remote config, so this already happens today. It's a fix for whoever owns the assets host's certificate (infra), not this SDK.:posthog-android:animalsnifferReleasefails locally on this branch (1,237 violations, Gson and Kotlin signature false positives) and onmaintoo (1,307), and CI doesn't run it. Fixing or removing that task is a separate cleanup.💚 How did you test it?
The device runs below were on this branch before the 3.77.1 merge (
9bbfa914, then the docs commits; Android 6–13 ran on34198711), against PostHog Cloud project 381971 and a local mock PostHog server.After merging 3.77.1 (
830f7891)::posthog:test,:posthog-server:test,:posthog-server-openfeature:test,:posthog-android:testDebugUnitTest,apiCheckandspotlessCheckpass, after adapting main's 8 new tests to capture v1 and the 4.0 flag API. The device runs weren't repeated.On the current head (
7bd8b195, after3cf406d4, #973, #979 and the regenerated migration page): CI Build & Test (compile, tests, survey interaction tests, release tasks and dependency locks) andtest-android-sdkpass. SDK compliance passed on9217eeca, which has the same code.After that, #980 (with its own failing-first tests) and the
mainmerge (0f9faf62, only #982's Gradle plugin change) landed. CI on0f9faf62is the check for those; the device runs weren't repeated.Then #984 (with its own tests) and a second
mainmerge (Gradle plugin 1.8.1 and dependency bumps: Gradle wrapper 9.9.0 and GitHub Actions versions) landed. CI on6248fc68is the check for those.Automated
spotlessCheckapiCheckmake test(every module, debug tests,testWithoutCompose, Gradle plugin unit and functional tests):posthog-android:lintRelease:posthog-android-surveys-compose:testDebugUnitTest(Compose survey UI):posthog:animalsnifferMain(API 23 signatures for core)capture_v1,capture_ai_v1,feature_flags)Harness 1.27 and 1.28 only add flags v4 and flag rules v2 tests, which need the
flags_response_v4capability the adapter doesn't declare, so 1.26.0 runs the same tests.Devices
Pixel 10a (Android 16), emulators for Android 6, 7.0, 8, 9, 10, 11, 12, 13 (API 23, 24, 26, 28, 29, 30, 31, 33; google_apis arm64), Android 14 (API 34) and Android 17 (API 37). Sample app built from this branch with a local driver activity (not committed), with
debug, session replay, surveys, error tracking, logs, deep links and lifecycle and screen autocapture on. Results were read from logcat, from PostHog with SQL and Replay Vision, and from the mock server's request log.Upgrade from 3.76.0 (Pixel offline, API 34 online)
$process_person_profileand$session_idset as properties){plan=premium, seats=5}), listener getserrorsLoading=truewith the cached flagsPostHog-Request-IdwithPostHog-Attempt: 2; all 5 ingested, person-less,$session_idkeptNew behavior (PostHog Cloud)
/i/v1/analytics/eventswithAuthorization: Bearer,PostHog-Sdk-Info,PostHog-Request-Id,PostHog-Attempt, gzip, noapi_keybody fieldoptionsand legacy option propertiesoptions = {process_person_profile: false}, a$process_person_profile: falseproperty, abeforeSendthat sets the option, and a registered$process_person_profileall made an identified user's event person-less; a plain event and the event afterunregisterstayedfull; an unknown option didn't become a property$os_namebeat the SDK value; event beat super;beforeSendbeat bothuserPropertiesvs$setuserPropertieswon key by key, the other$setkey was kept$lib/$lib_versionset by the app$window_id = 1231,true,null,Any()"1","true","null"; the object key was dropped with the rest of the event sentbeforeSendreturningnulldistinctIdargumentcaptureAi$ai_generationand$ai_spandelivered through/i/v1/ai/events; a 9 MiB event returnednulland logged the limit only; a non-$ai_name got PostHog'smisrouted_eventdrop, logged per batchidentify,group,alias,setPersonProperties,captureException,screenwith optionsgetFeatureFlagwithout a defaultpremium,true,nullfor a missing flag;isFeatureEnabled("missing", true)returnedtrueand its$feature_flag_calledleft out$feature_flag_responseonFeatureFlagsunsubscribe(), and stayed registered acrossclose()andsetup()reloadFeatureFlags(callback)PostHogRemoteConfigThreadwith aPostHogFeatureFlagsLoadedphx_project token$locale/$app_language$localeen-US;$app_languagenot sent by default,de-DEaftercmd locale set-app-locales,fr-CAaftersetAppLanguage("fr-CA"), gone after clearing. The first event after each change still carried the previous value, as the code documents; the guide now says so$process_person_profile=true&$set=xDeep Link Openedkeptutm_sourceandrefand skipped the$parametersPayload rules (mock
/flagsserving each payload kind)hello,{broken, empty,{'a': 1},nullnull, flag value stilltrue"hello",{"a": 1},false,[1, 2]on a variantString, map,Boolean, listPostHog Cloud now refuses to save a payload that isn't valid JSON, so this can only be tested with a mock or an old flag.
Transport errors (mock server, each scenario isolated)
Retry-After: 120{}requestHeaderswithAuthorizationandX-E2EAuthorizationwith the Bearer token and keptX-E2E;/configand/flagskept the app'sAuthorizationRegression
01a1ac64-d968…: 92 snapshot events, 17 taps over 80 s across the native, Compose, survey, logs and error tracking screens; Replay Vision confirmed every screen is a screenshot with masked text and images and no broken or black framessurvey shownandsurvey sent(rating 4) ingested$exception(with steps) and a fatal crash, sent before the process died/i/v1/logsflushed 3 recordsApplication Opened(including after the crash relaunch),$screen,$autocapturetaps,Deep Link OpenedAndroid 6–13 (fresh emulator per version, same 4.0 build, PostHog Cloud)
Each emulator ran the same script: the full capture set (core events, options, precedence,
identify/group/alias,captureException,captureAiwith a 2 MB and a 9 MiB event), a deep link, five screens (native, Compose, interaction, survey), logs, a fatal crash and relaunch, then Home. The API levels cover everyBuild.VERSION_CODESbranch inposthog-android(N, O, P, Q, R, S, TIRAMISU). Android 13 set a per-app language withcmd locale set-app-locales … fr-FR.$app_languagefr-FR$identify,$groupidentify,$create_alias,$setand$feature_flag_called.$localewasen-USeverywhere.beforeSend-filteredtest_event, and logged NaN and Infinity as unserializable instead of losing the event.captureAicall returnednullwithout crashing on every version. On Android 6 it hit anOutOfMemoryErrorwhile serializing, which the SDK caught and logged.Application Backgroundeddidn't arrive. The "app has stopped" dialog kept the crashed process alive until the script pressed Home, which killed it. That's a test artifact, not an SDK issue.The temporary survey is archived; the e2e test events stay in the test project only.
📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code (Claude Opus 5.5) wrote the stacked PRs and ran this release review: it merged
main(3.76.0) into the branch, rewrote the changesets and fixed the guide, checked which unreleased artifacts link against core 7.0, and ran the automated suite and the device tests above. The device driver activity, the 3.76.0 upgrade build and the mock server stayed local and aren't committed.🤖 Generated with Claude Code