Skip to content

fix: keep the personless option over a legacy property and drop a 2xx without results - #905

Open
turnipdabeets wants to merge 2 commits into
fix/v4-v1-rubric-followupsfrom
fix/v4-v1-followups-2
Open

turnipdabeets wants to merge 2 commits into
fix/v4-v1-rubric-followupsfrom
fix/v4-v1-followups-2

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Two more capture v1 follow-ups on top of #903, to match the capture spec (PostHog/sdk-specs#146):

  • A $process_person_profile property no longer turns off the personless default. When person processing is off, the SDK now always sets process_person_profile: false. A passed or registered $process_person_profile property only fills that option when it's unset, so it can't override the SDK's false. To change person processing for one event, pass the process_person_profile option. Before, any non-null legacy property stopped the SDK from setting the option, so a registered $process_person_profile: true sent anonymous events with person processing on.
  • A 2xx whose body isn't {"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?

  • New and updated unit tests for each change. They fail without the fix and pass with it.
  • ./gradlew apiCheck spotlessCheck :posthog:test :posthog-android:testDebugUnitTest 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 (updated the existing 4.0 major changeset)

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

🤖 Generated with Claude Code

turnipdabeets and others added 2 commits October 28, 2026 19:53
…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>
@turnipdabeets turnipdabeets self-assigned this Oct 29, 2026
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 29, 2026 00:08

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.

1 participant