Repository navigation
feat!: send events through capture v1 and add captureAi - #881
Conversation
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 71d07c1: 2 Must fix, 2 Should fix.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
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.
posthog-android Compliance ReportDate: 2026-11-04T23:11:43.006889+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
|
e4e5fc5 to
8a765aa
Compare
2f486a0 to
a41d9b9
Compare
8a765aa to
483626f
Compare
a41d9b9 to
caf64bd
Compare
483626f to
c7fec3a
Compare
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 1426e51: 1 Should fix. This pull request is large, so the review ran in 4 parts with less depth than usual.
This is review round 3 on this pull request. When findings keep coming back in the same code, the approach is usually the problem. Before the next fix, check whether a different design would remove the whole class of findings.
010be59 to
4c56faa
Compare
A `phx_` token is a personal API key; capture rejects every request made with it. Setup now logs once and stays disabled, as for an empty token. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Analytics events now go to `POST /i/v1/analytics/events` with the project
token in an `Authorization: Bearer` header, `PostHog-Sdk-Info`,
`PostHog-Attempt`, `PostHog-Request-Id` and `PostHog-Request-Timestamp`.
The body is `{created_at, batch}`; each event drops `$lib`/`$lib_version`,
lifts string `$session_id`/`$window_id` to the root, and hoists the legacy
`$process_person_profile`, `$cookieless_mode`, `$ignore_sent_at` and
`$product_tour_id` properties into the new `PostHogEvent.options`.
The queue reads the per-event results: `ok`, `warning` and `drop` leave the
queue, only `retry` is kept and resent under the same request id and
`created_at` with the next attempt number. A 2xx without readable results
counts as delivered. 408 and 500/502/503/504 are retried; 429, 404 and
other 4xx are terminal, as are redirects other than a same-origin 307/308
(followed at most 5 times with the same body and headers). Backoff doubles
from 1 to 30 seconds with 25% jitter, and `Retry-After` is a floor capped
at 30 seconds for every queue. Replay and logs keep their retry sets.
Legacy cached events (`PostHogSendCachedEventsIntegration`) are sent
through capture v1 too; the ones capture asks to retry are re-queued at
the tail of the legacy file for the next launch.
`PostHogConfig.maxRetries` is renamed `pushNotificationSubscriptionMaxRetries`
since it only limits push-subscription retries. `PostHogApi.batch()` stays
for posthog-server.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… HEAD # Conflicts: # .changeset/android-v4-major.md # docs/migration-3.x-to-4.0.md
…y and typed values (#903) * fix: match the capture v1 rules for empty names, drop logs, retry identity and typed values * fix: merge a $groups map in properties into the groups set with group() * fix: log an empty-name drop once, without the generic dropped-event line * fix: clamp each duplicates_dropped count to the batch size * fix: keep the pending retry map off Java 8 Map methods missing on API 23 * fix: keep the personless option over a legacy property and drop a 2xx 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> * fix: warn about empty and personal API keys without debug and log rejected batches (#909) * fix: let a caller's $process_person_profile override the personless option 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> * fix: log drop reasons per batch and batch migrated legacy events by bytes - 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> * docs: say the token warnings print without debug Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: name the records in the flush drop log Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: cover the capture rules on the captureStateless path Also adds the posthog-server changeset for them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: fold the server capture changes into the server changeset --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…rent user's person state (#928)
* docs: ask users to review beforeSend hooks for the 4.0 event shape * docs: cover replacing event.options in beforeSend Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
) * feat!: report the device language as $locale and add $app_language * fix: address the pre-PR review of $locale and $app_language * docs: correct the $locale migration notes * fix: read a registered $app_language without relying on merge order * fix: read locales and the locale config only on the worker thread Setup and capture no longer make Binder calls or parse the locale config, and supported locales changed at runtime with setOverrideLocaleConfig are picked up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: leave out $app_language when several declared regions could match Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: stop reading a registered $app_language on every event Registered properties are merged later and win anyway. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: guard LocaleList calls for the API 23 lint check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: read the override locale config only when the locales change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: say when $app_language is left out with no match --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…929) * fix: align capture v1 logs, request IDs and beforeSend handling * fix: copy arrays and cycles for beforeSend, and keep the hook failure log debug-only * fix: keep array types in the copy beforeSend hooks get * fix: keep sorted map lookups and copy primitive arrays for beforeSend * fix: read an HTTP-date Retry-After * fix: log the key type when a map key can't be serialized
… feat/v4-capture-v1 # Conflicts: # docs/migration-3.x-to-4.0.md
…the backend guides (#934) * docs: link the capture v1 SDK upgrade guide Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: add timestamps, UUID v7 and the person-only drop to the 4.0 guide * docs: align the 4.0 capture v1 guide with the backend SDK guides Claude-Session: https://claude.ai/code/session_019xLynws83apuXa9LfRy9Aq --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
posthog-server is a minor release and its beforeSend gets PostHogEvent, so a new trailing constructor parameter broke Java callers and copy calls compiled against 3.x. options is now a property. When beforeSend returns a different event with null options, such as a copy, it keeps the options of the event the hook was given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Remove the two internal TODO comments. - Say surveys-compose works with core 6.x and 7.0. - List RRStyle and the trimmed RRWireframe under internal APIs. - captureAi also returns null for an empty event name. - Note per-event product quota drops, the per-batch drop reasons and the removed per-event "queued" log line. - Self-hosting needs /i/v1/ai/events for captureAi. - A whitespace-only token disables the SDK too. - Describe the 3.x $set/$set_once/$groups replacement rule and the registered $set rule. - KDoc: the AI size drop logs the limit, not the event's size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… feat/v4-capture-v1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… feat/v4-capture-v1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) * docs: generate the SDK reference for 3.x Generated by bin/docs_scripts/generate_markdown.py. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs: generate the experimental SDK reference for 4.x Generated by bin/docs_scripts/generate_markdown.py --major 4 --experimental from feat/v4-capture-v1 (PRs #871 and #881), with the capability tags applied on top. Adds the 3.x to 4.0 migration guide page. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs: regenerate the Android references from Dokka's HTML The 4.x page and migration guide come from chore/v4-remove-deprecated (the 4.0 branch) with the capability tags and getting-started applied. Both still need to land there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: regenerate the Android references with braces kept in code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: regenerate the Android references from docs/capabilities.json The 3.x pages lose only the blank line the stripped capability tags left behind. The 4.x page also moves captureAi to Capture AI and onFeatureFlags to On feature flags, which the map's "next" entries add. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: regenerate the Android references after review fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: regenerate the Android migration page from the current 4.0 guide Rebuilt from docs/migration-3.x-to-4.0.md on chore/v4-remove-deprecated, which dropped the SDK identity section (#942) and added the custom httpClient paragraph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: regenerate the Android migration page from the current 4.0 guide Rebuilt from docs/migration-3.x-to-4.0.md on chore/v4-remove-deprecated, which now covers the missing-flag response, posthog-server 2.25 and retry scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: regenerate the Android 4.x page from chore/v4-remove-deprecated Picks up the branch's feature flag doc comment fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: regenerate the references with the getting-started intro Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Stacked on #871 (
chore/v4-remove-deprecated).💡 Motivation and Context
Moves capture to capture v1 for posthog-android 4.0: analytics events go to
POST /i/v1/analytics/eventsand the newcaptureAi(...)sends AI events toPOST /i/v1/ai/events. This matches posthog-ios 4.0 (PostHog/posthog-ios#938) and the posthog-python 8.0, posthog-go 2.0 and posthog-rs 1.0 v1 releases and their AI lanes, and Ingestion's goal of moving the mobile SDKs to the v1 endpoints withcaptureAiin every v1 release. Flutter and React Native needcaptureAion both natives before they can expose it.This PR now contains the whole capture v1 stack. Merged into it:
captureAi) and fix: retry capture v1 requests that get 404 or 429 #897 (retry 404 and 429) merged into itbeforeSendon the fully built eventbeforeSendhooks for the 4.0 event shape$localeis the device language, and new$app_language$screenwrapper events move the current screenFrom the release review, directly on this branch:
PostHogEvent.optionsis a property, not a constructor parameter, so thePostHogEventconstructor andcopykeep their 3.x signatures.posthog-serveris a minor release and itsbeforeSendgetsPostHogEvent, so the old trailing parameter broke Java callers andcopycalls compiled against 3.x. WhenbeforeSendreturns a different event whose options are null, such as a copy, it keeps the options of the event the hook was given.RRStylelisted,captureAireturns null for an empty name, per-event quota drops, self-hosting the AI path, whitespace-only tokens, the 3.x$setreplacement rule.Transport
Authorization: Bearer <projectToken>plusPostHog-Sdk-Info(<sdkName>/<sdkVersion>, which Flutter, React Native and KMP already set),PostHog-Attempt,PostHog-Request-IdandPostHog-Request-Timestamp. The body is{created_at, batch}, with noapi_keyorsent_at.$session_id/$window_idmove to the event root, and$lib/$lib_versionare no longer sent as properties (the server reads them fromPostHog-Sdk-Info). A string session/window ID, including"", is sent unchanged; a non-string is dropped with a debug log naming the key and JSON type; null drops silently.ok/warning/dropevents leave the queue, onlyretryevents are resent, and the responseRetry-Afteris honored for that resend. The queue resends exactly the events of a request that failed or came back with events to retry, before newer ones, so the retry keeps its request ID andcreated_atand increments the attempt. Retry identity is kept per endpoint, so the analytics and AI lanes don't reset each other's attempt numbers. A 413 halving is a new request. Events missing from the results count as delivered: a resend would duplicate stored events. A 2xx whose results can't be read (malformed body, missing or non-objectresults, a transfer that failed after the status, or a response over 1 MiB) fails the whole batch without a retry, as the spec'sFC-6arequires./batchfallback: a host that doesn't serve the v1 route keeps the events queued (404 is retried) until it does.PostHogApi.batch()stays only forposthog-server, which keeps/batchuntil its own major. Events cached by pre-3.0 versions (PostHogSendCachedEventsIntegration) and 3.x events still queued on disk are sent through v1 too.Retry-After(delay-seconds or an HTTP-date) is honored as a floor, capped at 30 seconds, and the backoff doubles from 1 s to 30 s with ±25% jitter kept in milliseconds. Both apply to every queue (events, replay, logs).host, at most 5 hops, re-sending body and headers. Other redirects are terminal. OkHttp would otherwise follow any 3xx, dropAuthorizationcross-host and turn a 302 into a GET, so automatic redirects are off for the capture client. So isretryOnConnectionFailure: an OkHttp resend would repeat the attempt number and timestamp.maxBatchSizeevents and about 5 MiB (checked before appending; an event larger than that is sent on its own), and the queue sends as soon as that much is queued, for analytics and AI.debugon, drop/retry logging is one line per batch: dropped events counted by the server'sdetailstag (cleaned and clipped, most common first, e.g.misrouted_event,ai_event_too_big), duplicate copies dropped and events to retry. Never per event, and no uuids, names or payloads. Debug logs name the event count and response status, never request or response bodies.Per-event options (new public API)
options: Map<String, Any?>? = nullas the last parameter ofcapture,screen,identify,setPersonProperties,alias,groupandcaptureExceptiononPostHogInterface,PostHogand thePostHogcompanion, and aPostHogEvent.optionsproperty (persisted in the queue, editable inbeforeSend; not a constructor parameter, so the constructor andcopyare unchanged). Foridentifythe options apply to the$identifyor$setevent it sends; forgroupto$groupidentify; foraliasto$create_alias.process_person_profile,cookieless_mode,disable_skew_correctionandproduct_tour_id. Any other key is sent as-is; values are never coerced (the server parses them leniently).$process_person_profile,$cookieless_mode,$ignore_sent_atand$product_tour_idproperties are converted when the request is built, afterbeforeSend. Each is always removed from properties and only fills an option that is unset or null.beforeSend. An option set to null counts as unset.process_person_profile: falseonly when person processing is off (personProfiles = NEVER, orIDENTIFIED_ONLYbefore identify), and no longer writes a$process_person_profileproperty on every event. A null legacy value keeps the personless default.identifymoved fromPostHogCoreInterfacetoPostHogStatelessInterface;PostHogInterfacehas the 4-arg one.Property precedence (PostHog/sdk-specs#143)
$screen_name, session id,$is_identified, replay debug values) → registered super properties → the properties passed to the call (userProperties,userPropertiesSetOnceandgroupsare per-call values) →beforeSend. In 3.x the SDK's values beat super properties, and$is_identified,$process_person_profileand the replay debug values also beat caller properties.$screen_name,$session_idordistinct_idstill replaces the SDK's value, as in 3.x.captureAi(new public API)captureAitakes the same arguments ascapture(includingoptions) and goes through the same enrichment, precedence, personless default andbeforeSend. Only the queue differs.capturenever reroutes$ai_*events; acaptureAiname that doesn't start with$ai_logs a debug line and is sent unchanged (the server reportsmisrouted_event).posthog-disk-ai-queue,PostHogConfig.aiStoragePrefix) with its own executor and retry state, created at setup so events left on disk by a previous launch still send, and flushed byflush()andclose(). A failing or slow AI lane never delays or drops analytics events.captureAireturns the queued event's uuid, or null when the event isn't queued: disabled, opted out, an empty name, dropped bybeforeSend, or over the size limit.captureAiMaxEventBytes, measured beforeencryption, is dropped incaptureAi, which logs (debug) only the event name and the limit. The AI queue keeps at mostcaptureAiMaxQueueSizeevents and 50 MiB on disk, dropping the oldest first.PostHogConfigsettings, named after the server SDKs':captureAiCompression(gzip),captureAiMaxQueueSize(100),captureAiTimeout(60 s read/write idle timeouts on a derived OkHttp client),captureAiMaxEventBytes(8 MiB + 64 KiB for the whole serialized event: PostHog's 8 MiB properties limit plus room for the rest; it can only lower, and a larger value logs a debug line). Non-positive values fall back to the defaults.Other changes in the stack
maxRetriesis renamedpushNotificationSubscriptionMaxRetries(no alias): it only limits push-subscription retries. Event, replay and log retries have no limit, as before.projectTokenstarting withphx_(a personal API key) disables the SDK at setup, like an empty token.posthog-serverinherits this throughPostHogStateless.setup, so it gets its own minor changeset.distinctIdargument tocaptureuses the current distinct ID instead of dropping the event.beforeSendreturns keeps the uuid of the capture it came from, so a hook that returns a cached earlier event can't repeat a uuid.$set/$identifysent withprocess_person_profile: falseneither stores nor matches the person-properties dedup hash.$feature_flag_calledevent also keeps$cookieless_mode,$ignore_sent_atand$product_tour_id, so they survive until they are converted to options.Deep Link Openedskips query parameters whose name starts with$, so a link can't set a PostHog property such as$process_person_profile.beforeSendgets its own copy of nested maps, lists and arrays, so a hook can't change the caller's values; no copy is made without a hook. A hook that throws drops only its event and logs (debug) the event name and exception type, never the message.capture_v1,capture_ai_v1,encoding_gzip,event_options,generated_payloads,log_capture,property_layersandfail_open; tracks both v1 routes; forwardsoptionsandtimestamp; runs withpersonProfiles = ALWAYSlike a server SDK. The workflow pins harness1.26.0and also runs for PRs intochore/v4-*/feat/v4-*.docs/migration-3.x-to-4.0.mdand the 4.0 changeset bullets.Breaking changes
/i/v1/analytics/eventswith Bearer auth; no/batchfallbackAuthorization: Bearer, replacing a customAuthorizationfromrequestHeadersAuthorizationneed another headerRetry-Aftercapped at 30 s; jittered backoffhostpointing at something that redirects elsewhereoptions; the server drops events with unreadable valuesoptionsparameter on sevenPostHogInterfacemethods, newcaptureAinull), anything implementingPostHogInterfacePostHogCoreInterface.identifymoved toPostHogStatelessInterface/PostHogInterfacePostHogCoreInterfacereference and callsidentify$is_identified,$process_person_profileand replay debug values$process_person_profileis sent only when person processing is off, as an option$process_person_profile = truebeforeSendcan't change an event's uuid;$-prefixed deep link parameters are skippedmaxRetries→pushNotificationSubscriptionMaxRetries;phx_tokens disable the SDKAll of these are in
.changeset/android-v4-major.md(plus.changeset/server-keep-on-feature-flags.md) and indocs/migration-3.x-to-4.0.md.Differences from the spec and the other v1 SDKs (same as posthog-ios 4.0 unless noted)
maxQueueSize. Server SDKs give up after 4 attempts.compression) and AI (captureAiCompression).$key becomes its option at send time.$process_person_profilesuppresses the SDK's personless option instead of losing to it.process_person_profile: falsegoes inoptions, not properties.capture/spec.md"Caller can't override person-processing state" expects the property; the compliance adapter runs withpersonProfiles = ALWAYS.beforeSendcan't change the uuid. The sdk-specsbefore-send-hookspec lets a hook change it. Android replaces it with the capture's own uuid, so a hook that returns an event kept from an earlier call can't repeat a uuid in a batch.beforeSendis sent, and PostHog drops the event. The blank-ID fallback runs before the hooks; docs(capture): specify capture v1 delivery for every v1 SDK sdk-specs#146 says the SDK should treat an empty ID as missing.captureAi(thecapture-aispec covers server SDKs): nouuidargument, like Androidcapture, but it returns the uuid; oversize events are dropped at the call; the queue is created at setup, not lazily; the queue limit is 100 events and 50 MiB, not 1000 events.💚 How did you test it?
PostHogCaptureV1Test: the wire format and headers,$libstrip, session/window lift, legacy-property hoisting and precedence, per-event results and the kept retry set, retry identity, status classification (404 and 429 retried), redirects, 2xx with unreadable results or a failed transfer,Retry-Afteron a 2xx, the AI path and the per-event drop log.PostHogQueueTest,PostHogQueueDurabilityTest: partial retention, jitter bounds, the 30 sRetry-Aftercap, the partial-retryRetry-Afterfloor, and a fatal event sent while a request waits to be retried.PostHogCaptureOptionsTest: options reachingPostHogEvent.optionsfor every method,beforeSendedits, the personless option under eachpersonProfilesmode, precedence, the blank-distinctId fallback, the dedup hash with a personless$set(including lenient false values such as"false"and0), the allowlist and uuid stability.PostHogCaptureAiTest: routing,beforeSendand options, 404 retried, oversize events dropped when queued, splitting at the byte limit, flushing once a batch's worth of bytes is queued, the return value, per-lane timeout and compression, separate retry identity,flush()/close()draining the AI queue, an event with exactly 8 MiB of properties.PostHogQueueByteLimitsTest: byte accounting on add/load/remove (including a file deleted from disk), eviction of the oldest, check-before-append windows, an oversize record alone.PostHogSendCachedLegacyEventsIntegrationTest: the legacy queue on v1.options, no$libor$process_person_profile).chore/v4-remove-deprecated(chore!: pass the load result to the feature flags callback #877 conflicted only in the changeset):./gradlew apiCheck spotlessCheck :posthog:test :posthog-android:testReleaseUnitTest :posthog-server:testpass locally. The compliance adapter compiles.1.26.0in CI on d6a416a: 232/232 (capture_v1105/105,capture_ai_v1110/110,feature_flags17/17).Build Job, compliance) before it was merged.mainmerged together:/i/v1/analytics/events(HTTP 200) after the upgrade, along with 3.x-queued replay snapshots.NaN/infinite values (dropped, event kept), non-string map keys, a 300 KB property and the precedence order (super < event <beforeSend, a caller$osover the SDK's) arrived as expected. An empty name was dropped locally.captureAisent to/i/v1/ai/events(HTTP 200) and the trace shows up with a 2 MB input stored as a blob; a 9 MiB event returnednull.captureAidocs on posthog.com / LLM analytics.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file (bullets added to.changeset/android-v4-major.md, plus.changeset/server-keep-on-feature-flags.md)🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Built with Claude Code. Subagents implemented the transport, options and AI lane against the capture v1 server contract, the harness
capture_v1/capture_ai_v1contracts, sdk-specs#143, the sdk-specscapture-aispec and the posthog-ios 4.0 branch; review cycles on each PR of the stack fed fixes back. #884 and #882 were squash-merged into this branch after approval.Maintainer decisions: no
/batchfallback from the start (iOS added and then removed one); keepPostHogApi.batch()forposthog-server; keep unlimited retries and 413 halving as mobile divergences; retry 404 and 429 (posthog-go#395); add a public options API in 4.0 and moveidentifyoffPostHogCoreInterfacerather than carry two overloads; keep the uuid pin client-only; a separate AI lane with a small disk queue, config named after the server SDKs.TODO before release
/docs/libraries/capture-v1, which goes live when docs(api): add capture v1 API reference posthog.com#21385 merges.🤖 Generated with Claude Code