Repository navigation
docs(capture): specify the environment-sourced release identifier - #80
Merged
Merged
Conversation
Three server SDKs now read POSTHOG_RELEASE_ID and stamp $release_id on every event they produce, but the capture contract never described the property, its precedence, or the paths that carry it. Adds a capture requirement covering the read-once-at-construction timing, trimming with blank-as-unset, shared-path placement, explicit-value precedence, before_send visibility, and exclusion from person and group property payloads. Leaves the minimized $feature_flag_called divergence unspecified. Co-Authored-By: Claude Opus 5 <[email protected]> Generated-By: PostHog Desktop Task-Id: fb243d92-37c8-4181-8365-9985f279f6a8
Contributor
Pushed three fixes on top of the bot's draft:
Left out on purpose: an explicit null |
ioannisj
marked this pull request as ready for review
October 7, 2026 09:18
dustinbyrne
approved these changes
Oct 7, 2026
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.
Problem
Three server SDKs now read a deploy-time release id from
POSTHOG_RELEASE_IDand send it as$release_idon every event:The
capturespec does not mention$release_idat all. The only existing reference is inexception-event-metadata, which requires exception builders to preserve release context "where supplied" and forbids them from inventing release identifiers — it never says where a supplied value comes from. So the producer contract is missing: the variable name, when it is read, how blank values are handled, which event types carry it, and what wins when a caller sets the property explicitly.Changes
Adds one
capturerequirement, applied and archived on this branch:POSTHOG_RELEASE_IDis read once while the client is constructed, trimmed, and a blank value counts as unset (no empty$release_id).identify,alias, andgroup_identifyall carry it. Low-level passthrough APIs that bypass that path (PHP'sraw()) are out of scope.$release_idin call properties, super/registered properties, or an ambient request context wins.before_send, so a hook can remove it.$set,$set_once, or$group_set.$feature_flag_calledevent keeps$release_id, matching PHP and Ruby; Python needs a follow-up to add it to its allowlist.$identifyor$setfor the person-properties event, person and group exclusions split).Scoped to server SDKs that can read process environment — browser bundles get
$release_idinjected byposthog-cliinstead.Needs review
$feature_flag_calledevents keep$release_id. PHP and Ruby include it in their minimal allowlist with tests; Python excludes it. The property is static and low-cardinality per process, the category thefeature-flag-called-trackerallowlist already keeps, so the spec follows the two SDKs and posthog-python needs a one-line follow-up.Validation
openspec validate document-release-id-env-property --strict: valid.openspec validate --specs --strict: 63 passed, 0 failed.git diff --checkpass.Created with PostHog Desktop
🤖 Generated with Claude Code