Repository navigation
fix: match capture v1 rules for empty names, drop logs, retry identity and typed values - #903
Open
turnipdabeets wants to merge 11 commits into
Open
turnipdabeets wants to merge 11 commits into
turnipdabeets wants to merge 11 commits into
Conversation
…ntity and typed values
Contributor
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 0f90073: 1 Should fix.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
Contributor
posthog-android Compliance ReportDate: 2026-10-29T21:57:31.761683+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
|
6 tasks done
6 tasks done
… without results (#905) * fix: keep the personless option when a legacy person processing property 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> * fix: treat a 2xx without readable per-event results as a terminal failure 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> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ption Reverts the person-processing half of #905. A passed or registered `$process_person_profile` property again stops the SDK from adding `process_person_profile: false` when person processing is off, so the caller wins, as the client property precedence in sdk-specs `capture` (#143) requires. The send still hoists the property into the option. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 tasks done
…ytes - The capture v1 per-batch debug line names the endpoint and counts the dropped events by their `details` tag (opaque strings, never uuids or content), e.g. `ai_event_too_big: 1, misrouted_event: 1`. - Sending events cached by 2.x/3.x closes a batch before it would pass the 5 MiB capture v1 byte target, as the queue does, so a large migrated batch isn't lost to a 413. Order is kept and an event over the target ships alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…v1-rubric-followups Moves this branch's queue changes into enqueueEvent(), where #904 put capture's queueing step.
…v1-rubric-followups
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
Follow-ups on the capture v1 branch (#881) to match the fleet rules the other v1 SDKs follow:
capture(""), or abeforeSendthat renames an event to"", is dropped before sending and logged once (debug). Capture drops these anyway; now they never leave the device. Only an exactly-empty name, same as iOS #989 and Flutter desktop fix(server): keep locally evaluated flags when one flag is inconclusive #681.duplicates_dropped), matching iOS.userProperties,userPropertiesSetOnceandgroupsare merged over a$set,$set_onceor$groupsmap passed in the same call's properties, instead of being replaced by it.$groupsmap in properties adds to the groups set withgroup()instead of replacing them; typedgroupsstill win per key. Matches iOS.NaNand infinite numbers are dropped from the properties.Not changed here: if capture asks to retry a uuid that was duplicated in the batch, the queue still keeps every copy of that uuid. The SDK never sends duplicate uuids itself, so this only happens after a
beforeSendbug.💚 How did you test it?
./gradlew :posthog:test :posthog-android:testDebugUnitTest :posthog:apiCheck spotlessCheckpass.📝 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)
$groupsmerge rules, so both SDKs build these maps the same way.🤖 Generated with Claude Code