Repository navigation
docs: describe feature flag properties as values the SDK adds - #392
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
turnipdabeets
approved these changes
Oct 23, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The v2 migration guide and the
capture-v1-defaultchangeset say feature flag properties ($feature/<key>,$active_feature_flags) win over the request context andDefaultEventProperties. The code does the opposite, and that is the intended order: flag properties are values the SDK adds, so the request context andDefaultEventPropertieswin over them, and the event's ownPropertieswin over everything (posthog.gofills context and defaults before both flag paths;TestEventPropertyLayerspins it).This order matches posthog-go 1.x, posthog-python and posthog-node, which all let context and default properties win over flag properties, and the client SDK order in PostHog/sdk-specs#143. posthog-python's v1 branch gets the same fix in PostHog/posthog-python#1121.
docs/migration-v2.mdlists flag properties from aFlagssnapshot orSendFeatureFlagswith the other SDK-added values, which fill under the event, the request context andDefaultEventProperties.capture-v1-defaultchangeset says the same.💚 How did you test it?
Docs only.
go test -run TestEventPropertyLayerspasses and pins the described order.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file (edited the existingcapture-v1-defaultchangeset instead)🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Authored with Claude Code (Claude Opus 5.5), directed by @eli-r-ph.
🤖 Generated with Claude Code