Repository navigation
fix: keep the personless option over a legacy property and drop a 2xx without results - #905
Open
turnipdabeets wants to merge 2 commits into
Open
turnipdabeets wants to merge 2 commits into
turnipdabeets wants to merge 2 commits into
Conversation
…rty is set A passed or registered `$process_person_profile` property no longer stops the SDK from setting `process_person_profile: false` when person processing is off. The send hoists the property only into an unset option, so an option set by any layer wins, as the capture spec requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lure
A 2xx whose body can't be read as `{"results": {...}}` no longer counts
the batch as delivered. It throws a PostHogApiError with that status,
which the queue drops without retrying, and logs only the status and
event count, as the capture spec requires.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 6 tasks
This branch has not been deployed
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
Two more capture v1 follow-ups on top of #903, to match the capture spec (PostHog/sdk-specs#146):
$process_person_profileproperty no longer turns off the personless default. When person processing is off, the SDK now always setsprocess_person_profile: false. A passed or registered$process_person_profileproperty only fills that option when it's unset, so it can't override the SDK'sfalse. To change person processing for one event, pass theprocess_person_profileoption. Before, any non-null legacy property stopped the SDK from setting the option, so a registered$process_person_profile: truesent anonymous events with person processing on.{"results": {...}}drops the batch. Before, the SDK counted it as delivered. Now it's a terminal failure: not retried, logged (debug) with only the status and the event count. This includes a body that's cut off, over 1 MiB, or slower than the read deadline. A proxy that rewrites the response body now drops events, so the migration guide's proxy section says to pass the body through.Migration guide and the 4.0 changeset updated.
💚 How did you test it?
./gradlew apiCheck spotlessCheck :posthog:test :posthog-android:testDebugUnitTestpass.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file (updated the existing 4.0 major changeset)🤖 Agent context
Autonomy: Human-driven (agent-assisted)
PostHogApi.kt.personProcessingOptions(options, mergedProperties)call. This PR drops the second argument, so whichever lands second has a one-line conflict.captureExceptioninPostHogStatelessstill sets the legacy$process_person_profileproperty for a personless exception instead of the option. The result on the wire is the same, because the property is hoisted into the unset option.🤖 Generated with Claude Code