Skip to content

fix: drop replay debug keys while session replay is off - #992

Open
ioannisj wants to merge 6 commits into
mainfrom
fix/drop-replay-debug-keys-when-off
Open

ioannisj wants to merge 6 commits into
mainfrom
fix/drop-replay-debug-keys-when-off

Conversation

@ioannisj

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Events keep carrying the $sdk_debug_replay_* keys and $sdk_debug_session_start even when session replay is off on purpose. Those keys exist to explain why a session isn't recording, so on an app that never wanted replay they're just noise on every event.

This drops them while replay is intentionally off:

  • No replay integration is installed.
  • sessionReplay is off in config and the app never called startSessionReplay(), or the app called stopSessionReplay().
  • The last /config turned replay off: sessionRecording: false, a response with no sessionRecording key, or quotaLimited containing mobile_recordings.

While off, an event still gets $recording_status: "disabled" and $sdk_debug_pending_queue_size, and it doesn't use up the 30s debug bundle window, so the first event after replay comes back gets the full bundle.

Sampled out, trigger pending, linked flag pending and awaiting the first /config are not "off". Those keys are what explain the missing recording, so they stay.

A few things worth calling out:

  • A /config with no sessionRecording key counts as remote off. PostHogRemoteConfigResponse.sessionRecording defaults to false, and posthog-js does the same (enabled: !!undefined).
  • Android removes the cached SESSION_REPLAY value on remote off, so there's nothing cached to read. The remote-off state lives in a @Volatile field on PostHogRemoteConfig, set from each /config response and read through an internal accessor. It isn't persisted, so after a relaunch the keys come back until the first /config lands. No public API change.
  • The React Native replay plugin may call PostHogReplayIntegration.debugProperties() directly. If it does, it still gets the ungated map. I didn't change that here.

💚 How did you test it?

New tests in posthog/src/test/java/com/posthog/PostHogTest.kt cover each off case (config off, explicit stop, remote false, missing key, quota limited) and each case that keeps the keys (no config yet, sampled out, linked flag pending, event trigger pending, awaiting the first /config). They also cover manual start with sessionReplay = false, restart after stop, opt in after opt out, remote off then on, a lifted quota limit, and the off state not using up the bundle window.

The batch-request.json event-shape snapshot drops only the replay debug keys and $sdk_debug_session_start.

  • ./gradlew :posthog:test: 1146 passed
  • ./gradlew :posthog-android:testReleaseUnitTest: 1036 run, 0 failures
  • apiCheck and make checkFormat pass

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

DRI: @ioannisj
Autonomy: Human-driven (agent-assisted)

@ioannisj ioannisj self-assigned this Nov 18, 2026
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

posthog-android Compliance Report

Date: 2026-11-20T20:44:50.927208+00:00
Duration: 473115ms

✅ 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 ✅ 416ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 27ms
Required Headers.Has Authorization Bearer Header ✅ 27ms
Required Headers.Has Content Type Json ✅ 26ms
Required Headers.Has Posthog Sdk Info Format ✅ 26ms
Required Headers.Has Posthog Attempt Header ✅ 29ms
Required Headers.Has Posthog Request Id ✅ 23ms
Required Headers.Has Posthog Request Timestamp ✅ 28ms
Required Headers.Has User Agent ✅ 22ms
Body Format.Body Has Created At And Batch ✅ 25ms
Body Format.No Api Key In Body ✅ 23ms
Body Format.No Sent At In Body ✅ 22ms
Event Format.Event Has Required Root Fields ✅ 21ms
Event Format.Event Uuid Is Valid ✅ 22ms
Event Format.Event Timestamp Is Rfc3339 ✅ 23ms
Event Format.Non Utc Event Timestamp Is Converted To Utc ✅ 25ms
Event Format.Distinct Id Is String ✅ 23ms
Event Format.Distinct Id At Root Not Properties ✅ 28ms
Event Format.Custom Properties Preserved ✅ 34ms
Event Format.Set Properties Preserved ✅ 28ms
Event Format.Set Once Properties Preserved ✅ 30ms
Event Format.Groups Properties Preserved ✅ 23ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 29ms
Event Format.Event Has Required Root Fields Batch ✅ 37ms
Event Format.Event Uuid Is Valid Batch ✅ 38ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 31ms
Event Format.Distinct Id Is String Batch ✅ 32ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 29ms
Event Format.Custom Properties Preserved Batch ✅ 36ms
Event Format.Set Properties Preserved Batch ✅ 39ms
Event Format.Set Once Properties Preserved Batch ✅ 59ms
Event Format.Groups Properties Preserved Batch ✅ 32ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 35ms
Batch Behavior.Multiple Events In Single Batch ✅ 39ms
Batch Behavior.Batch Envelope Smoke ✅ 33ms
Batch Behavior.Flush With No Events Sends Nothing ✅ 19ms
Batch Behavior.Flush At Triggers Batch ✅ 1031ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 19ms
Deduplication.Generates Unique Uuids ✅ 37ms
Deduplication.Different Events Same Content Different Uuids ✅ 26ms
Deduplication.Preserves Uuid On Retry ✅ 7011ms
Deduplication.Preserves Timestamp On Retry ✅ 7017ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 7023ms
Deduplication.No Duplicate Events In Batch ✅ 34ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 17ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 12029ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 7017ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2027ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 7016ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 16ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 22ms
Response Format Validation.Success No Retry After When All Ok ✅ 24ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 2010ms
Response Format Validation.Success No Retry After When Drop Only ✅ 19ms
Response Format Validation.Response Echoes Request Id ✅ 13ms
Retry Behavior.Retries On 408 ✅ 7016ms
Retry Behavior.Retries On 500 ✅ 7018ms
Retry Behavior.Retries On 503 ✅ 7020ms
Retry Behavior.Retries On 504 ✅ 7015ms
Retry Behavior.Retries On 404 ✅ 6014ms
Retry Behavior.Retries On 429 ✅ 6015ms
Retry Behavior.Retries On 502 ✅ 6017ms
Retry Behavior.Retryable Errors Have Retry After ✅ 4013ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 10025ms
Retry Behavior.Does Not Retry On 400 ✅ 4019ms
Retry Behavior.Does Not Retry On 401 ✅ 4019ms
Retry Behavior.Does Not Retry On 402 ✅ 4021ms
Retry Behavior.Does Not Retry On 413 ✅ 4020ms
Retry Behavior.Does Not Retry On 415 ✅ 4020ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 4019ms
Retry Behavior.Implements Backoff ✅ 14016ms
Partial Batch Handling.Handles 200 Full Success ✅ 2020ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3027ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3022ms
Partial Batch Handling.Does Not Retry Warning Events ✅ 3023ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 7015ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 7015ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 7016ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 7011ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 7015ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 7015ms
Partial Batch Handling.Respects Retry After On Partial ✅ 7024ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3023ms
Partial Batch Handling.Mixed Ok Drop Warning No Retry ✅ 3027ms
Compression.Sends Gzip Content Encoding ✅ 15ms
Compression.No Content Encoding When Disabled ✅ 14ms
Compression.Compressed Body Is Decompressible ✅ 15ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 4015ms
Event Options.Cookieless Mode Override ✅ 15ms
Event Options.Disable Skew Correction Override ✅ 13ms
Event Options.Process Person Profile Override ✅ 15ms
Event Options.Product Tour Id Override ✅ 14ms
Event Options.Unset Options Omitted ✅ 14ms
Event Options.Options Override In Batch ✅ 30ms
Event Options.Unknown Option Passes Through ✅ 18ms
Event Options.Option Value Is Not Converted ✅ 16ms
Event Options.Lenient Bool Option Values Are Not Converted ✅ 17ms
Event Options.Option Wins Over Legacy Property ✅ 18ms
Event Options.Legacy Property Fills Unset Option ✅ 16ms
Event Options.Null Option Falls Back To Legacy Property ✅ 18ms
Property Layers.Caller Property Beats Registered Property ✅ 17ms
Property Layers.Before Send Runs Last ✅ 22ms
Fail Open.Empty Api Key Sends Nothing ✅ 3017ms
Fail Open.Personal Api Key Sends Nothing ✅ 3011ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 15ms

Capture_Ai_V1 Tests

✅ 110/110 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint ✅ 16ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 15ms
Endpoint And Method.Capture Does Not Reroute Ai Named Events ✅ 14ms
Endpoint And Method.Capture Ai Does Not Reroute Non Ai Events ✅ 14ms
Lane Isolation.Failing Ai Lane Does Not Delay Analytics ✅ 7025ms
Required Headers.Has Authorization Bearer Header ✅ 16ms
Required Headers.Has Content Type Json ✅ 18ms
Required Headers.Has Posthog Sdk Info Format ✅ 16ms
Required Headers.Has Posthog Attempt Header ✅ 15ms
Required Headers.Has Posthog Request Id ✅ 16ms
Required Headers.Has Posthog Request Timestamp ✅ 16ms
Required Headers.Has User Agent ✅ 15ms
Body Format.Body Has Created At And Batch ✅ 17ms
Body Format.No Api Key In Body ✅ 15ms
Body Format.No Sent At In Body ✅ 18ms
Event Format.Event Has Required Root Fields ✅ 20ms
Event Format.Event Uuid Is Valid ✅ 15ms
Event Format.Event Timestamp Is Rfc3339 ✅ 17ms
Event Format.Non Utc Event Timestamp Is Converted To Utc ✅ 16ms
Event Format.Distinct Id Is String ✅ 17ms
Event Format.Distinct Id At Root Not Properties ✅ 19ms
Event Format.Custom Properties Preserved ✅ 16ms
Event Format.Set Properties Preserved ✅ 17ms
Event Format.Set Once Properties Preserved ✅ 16ms
Event Format.Groups Properties Preserved ✅ 18ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 15ms
Event Format.Event Has Required Root Fields Batch ✅ 18ms
Event Format.Event Uuid Is Valid Batch ✅ 20ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 19ms
Event Format.Distinct Id Is String Batch ✅ 22ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 27ms
Event Format.Custom Properties Preserved Batch ✅ 28ms
Event Format.Set Properties Preserved Batch ✅ 29ms
Event Format.Set Once Properties Preserved Batch ✅ 26ms
Event Format.Groups Properties Preserved Batch ✅ 34ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 22ms
Batch Behavior.Multiple Events In Single Batch ✅ 24ms
Batch Behavior.Batch Envelope Smoke ✅ 24ms
Batch Behavior.Flush At Triggers Batch ✅ 1014ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 16ms
Deduplication.Generates Unique Uuids ✅ 28ms
Deduplication.Different Events Same Content Different Uuids ✅ 16ms
Deduplication.Preserves Uuid On Retry ✅ 7014ms
Deduplication.Preserves Timestamp On Retry ✅ 7016ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 7016ms
Deduplication.No Duplicate Events In Batch ✅ 33ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 14ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 12023ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 7015ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2024ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 7015ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 14ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 18ms
Response Format Validation.Success No Retry After When All Ok ✅ 16ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 2009ms
Response Format Validation.Success No Retry After When Drop Only ✅ 16ms
Response Format Validation.Response Echoes Request Id ✅ 12ms
Retry Behavior.Retries On 408 ✅ 7013ms
Retry Behavior.Retries On 500 ✅ 7014ms
Retry Behavior.Retries On 503 ✅ 7026ms
Retry Behavior.Retries On 504 ✅ 7014ms
Retry Behavior.Retries On 404 ✅ 6012ms
Retry Behavior.Retries On 429 ✅ 7013ms
Retry Behavior.Retries On 502 ✅ 6015ms
Retry Behavior.Retryable Errors Have Retry After ✅ 4011ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 10017ms
Retry Behavior.Does Not Retry On 400 ✅ 4017ms
Retry Behavior.Does Not Retry On 401 ✅ 4014ms
Retry Behavior.Does Not Retry On 402 ✅ 4016ms
Retry Behavior.Does Not Retry On 413 ✅ 4018ms
Retry Behavior.Does Not Retry On 415 ✅ 4016ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 4016ms
Retry Behavior.Implements Backoff ✅ 14014ms
Partial Batch Handling.Handles 200 Full Success ✅ 2018ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3022ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3021ms
Partial Batch Handling.Does Not Retry Warning Events ✅ 3023ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 7015ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 7015ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 7016ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 7015ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 7011ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 7015ms
Partial Batch Handling.Respects Retry After On Partial ✅ 7018ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3021ms
Partial Batch Handling.Mixed Ok Drop Warning No Retry ✅ 3027ms
Compression.Sends Gzip Content Encoding ✅ 15ms
Compression.No Content Encoding When Disabled ✅ 15ms
Compression.Compressed Body Is Decompressible ✅ 16ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 4017ms
Event Options.Cookieless Mode Override ✅ 15ms
Event Options.Disable Skew Correction Override ✅ 12ms
Event Options.Process Person Profile Override ✅ 14ms
Event Options.Product Tour Id Override ✅ 17ms
Event Options.Unset Options Omitted ✅ 14ms
Event Options.Options Override In Batch ✅ 20ms
Event Options.Unknown Option Passes Through ✅ 13ms
Event Options.Option Value Is Not Converted ✅ 16ms
Event Options.Lenient Bool Option Values Are Not Converted ✅ 15ms
Event Options.Option Wins Over Legacy Property ✅ 15ms
Event Options.Legacy Property Fills Unset Option ✅ 15ms
Event Options.Null Option Falls Back To Legacy Property ✅ 17ms
Event Size.Event Over Ceiling Is Not Sent ✅ 3399ms
Event Size.Over Ceiling Drop Is Reported Or Logged Without Content ✅ 2048ms
Event Size.Batches Close Before Byte Target ✅ 5402ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 15ms
Property Layers.Caller Property Beats Registered Property ✅ 20ms
Property Layers.Before Send Runs Last ✅ 16ms
Fail Open.Empty Api Key Sends Nothing ✅ 1009ms
Fail Open.Personal Api Key Sends Nothing ✅ 1010ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 31ms
Request Payload.Flags Request Uses V2 Query Param ✅ 19ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 19ms
Request Payload.Flags Request Omits Authorization Header ✅ 18ms
Request Payload.Token In Flags Body Matches Init ✅ 20ms
Request Payload.Groups Round Trip ✅ 21ms
Request Payload.Groups Default To Empty Object ✅ 26ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 25ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 19ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 19ms
Request Lifecycle.No Flags Request On Init Alone ✅ 11ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 19ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 31ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 22ms
Retry Behavior.Retries Flags On 502 ✅ 321ms
Retry Behavior.Retries Flags On 504 ✅ 318ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 15ms

@posthog

posthog Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PostHog Review · Deep · reviewed 66c9562

Posted 1 finding: 1 Should fix.

Step Status Result
Prepare the diff done 3 files, 1 chunk
Pick perspectives done 2 perspectives
Run review passes done 2 issues (+1 blind-spot)
Merge overlapping findings done 3 → 2
Validate findings done 1 kept, 1 dismissed
Publish done 1 posted (view review)

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See this review and its findings in PostHog Review.

@ioannisj
ioannisj marked this pull request as ready for review November 18, 2026 17:41
@ioannisj
ioannisj requested a review from a team as a code owner November 18, 2026 17:41
@veria-ai

veria-ai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

@dustinbyrne dustinbyrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The off-state payload reduction works in the base/head comparison. Before approval, please keep the capture status consistent with the running recorder during the config callback, and coordinate the new wire shape with sdk-specs#232, including the mobile missing-field rule and wrapper scope.

AI-assisted review.

return props
}
val claimed = claimReplayDebugBundle()
val replayOff = isSessionReplayIntentionallyOff()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1/design] Agree on the reduced wire shape before releasing it

IMPORTANT · REQUIRED acceptance decision · intentional wire change, not a second recorder defect

Initialize the client without a replay integration and capture the first eligible event, such as sdk.screen("Home"). On base the event carries $sdk_debug_session_start; on head it does not. The current replay-debug spec expects the fallback session-start key when available and capture mode where provided. It separately requires config-derived diagnostics after stop or uninstall. The equivalent base/head probe verified the session-start removal, and the batch fixture records the intended wire change. Running more tests cannot resolve which contract should govern the release.

sdk-specs#232 proposes the reduced shape but is still open. It also says a successful mobile response missing sessionRecording is not remote-off. Android’s decoder already treated omission as false for recording; this PR newly makes omission suppress event diagnostics too. The executed probe verified suppression for both omitted and explicit false, while an enabled-object response retained diagnostics on both revisions. The current backend producer always writes the field, so this is a compatibility decision for omitted-field responses, not evidence of a current Cloud failure. The proposed spec also calls for gating the raw wrapper map; the React Native Android bridge reads PostHogReplayIntegration.debugProperties() directly and is not gated by this change.

Consider landing the spec change first or explicitly sequencing the two releases. Record whether omission should preserve diagnostics, including after a previously known remote-off result, and whether the native bridge is in scope or owned by a separate change. If omission should preserve diagnostics, distinguish field presence for this diagnostic gate without changing existing recording eligibility. Once agreed, pin the distinction with separate omitted, explicit-false, quota, and valid-object response assertions; verify the native bridge separately if the agreed contract covers it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed on the order, I'll hold this until sdk-specs#232 lands so the release doesn't go out ahead of the spec.

On the two open bits:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correction on the RN bridge bit: #232 keeps the wrapper-map requirement and marks Android partial, rather than amending the scenario. A follow-up adds a gated internal accessor and moves the RN bridge to it.

The status already follows the running recorder here (!handler.isActive() in PostHog.kt), and #232 now makes that the rule for every SDK. The missing-key allowance is in the spec text too. #232 is approved at 9b0ba3a, so this one goes in right after it merges.

@dustinbyrne
dustinbyrne requested a review from a team November 18, 2026 21:22

@turnipdabeets turnipdabeets left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[question] The RN plugin bridge (PosthogReactNativePluginModule.kt:300 in posthog-js) calls PostHogReplayIntegration.debugProperties() directly, so it gets the ungated map, while iOS gates its SPI. RN events aren't affected because #5797 gates in JS. Should we amend #232's wrapper scenario, or file a follow-up for a gated @PostHogInternal accessor?

@turnipdabeets
turnipdabeets requested a review from a team November 19, 2026 02:49
@ioannisj

Copy link
Copy Markdown
Contributor Author

@turnipdabeets on the RN bridge question: I'd amend #232's wrapper scenario. RN events already get the off shape because PostHog/posthog-js#5797 gates in JS, so a gated @PostHogInternal accessor would add surface without changing anything on the wire. If another wrapper starts putting the raw map on events we can revisit.

@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.

Verified the claimed fixes against the base: the PR's new PostHogTest cases fail on 1101d79b (recorder bundle still attached while off, off events using up the 30 s window) and pass on e8809d38. Behavior matches PostHog/posthog-js#5797 apart from the two divergences below.

Before merging, please resolve the two open threads once PostHog/sdk-specs#232 has the agreed amendments:

  • #992 (comment): hold until #232 lands, including amending its wrapper scenario ("A debug map handed to a wrapper SDK is gated") since PostHogReplayIntegration.debugProperties() stays ungated for the RN bridge.
  • #992 (comment): record in the #232 spec text (not only the compliance note) that Android treats a missing sessionRecording key as remote off.

@turnipdabeets

turnipdabeets commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

@ioannisj mind holding until we release 4.0?

# Conflicts:
#	posthog-android/src/test/resources/json/snapshots/batch-request.json
#	posthog/src/main/java/com/posthog/PostHog.kt

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.

4 participants