Skip to content

docs(capture-ai): specify the AI lane's configuration surface - #118

Closed
posthog[bot] wants to merge 1 commit into
mainfrom
posthog/spec-capture-ai-lane-config
Closed

posthog[bot] wants to merge 1 commit into
mainfrom
posthog/spec-capture-ai-lane-config

Conversation

@posthog

@posthog posthog Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Why

The capture-ai spec's Configuration section said the capability has one public flag (enable_full_ai_capture) and treated everything about the AI delivery lane — compression, queue capacity, upload timeout, per-event size cap — as non-normative transport. Two server SDKs have since converged on a public, AI-lane-scoped configuration surface with identical defaults, so the spec is out of date and the next SDK to add AI capture has no contract to copy.

Source changes

  • feat: AI lane config and size-aware batching posthog-python#1022 — AI lane config and size-aware batching (merged to the v1 branch). Adds capture_ai_compression, capture_ai_max_queue_size, capture_ai_timeout, capture_ai_max_event_bytes; isolates the AI lane from POSTHOG_CAPTURE_COMPRESSION; rejects invalid values at construction. Its description explicitly flags the cross-SDK/sdk-specs angle.
  • posthog-go v1 branch config.go — CaptureAICompression, CaptureAIMaxQueueSize (default 1000), CaptureAIBatchUploadTimeout (default 30s), with the per-event cap kept as an internal constant.

What changed in the spec

  • Configuration splits into Content capture (unchanged flag) and AI lane delivery, documenting the three knobs, their defaults (no compression, 1000 events, 30s) and the platform naming in Python and Go.
  • New requirement AI lane configuration is scoped to the AI lane, with scenarios for analytics compression not reaching the AI lane, the lower-only per-event cap, and invalid config rejected at construction.
  • The Transport (non-normative) paragraph now scopes non-normativity to the cap's value and the batch target, not to whether the cap is exposed.
  • The per-event cap stays a MAY (Go keeps it constant) and the batch-size target stays non-configurable, matching both SDKs.

Proposed, applied and archived on this branch per AGENTS.md; openspec validate capture-ai --type spec --strict passes.

Uncertain / worth a look

  • Both source implementations live on unreleased v1 branches, not on their default branches. If you'd rather the spec wait for a release, this can sit until then.
  • The "a cap above the default is rejected at construction" scenario is inferred from Python's "it can only be lowered"; worth confirming it raises rather than clamps.
  • posthog-node has captureAi but no AI-lane knobs, so this gives it a gap to close.

Created with PostHog Desktop

🤖 Generated with Claude Code

posthog-python and posthog-go now expose the AI delivery lane's compression,
queue capacity and upload timeout as public, lane-scoped options with matching
defaults. The spec still said capture-ai had "one public flag" and treated the
whole AI transport as non-normative.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 08d25f4a-271b-47cb-b118-cf3527017f0a
@eli-r-ph

Copy link
Copy Markdown
Contributor

Closing as superseded by #147, which specifies the full capture v1 AI lane including this configuration surface.

@eli-r-ph eli-r-ph closed this Oct 27, 2026
eli-r-ph added a commit that referenced this pull request Oct 27, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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