Repository navigation
Conversation
marandaneto
approved these changes
Oct 29, 2026
marandaneto
left a comment
Member
There was a problem hiding this comment.
The code looks good; no qualifying findings. Verdict: correct.
eli-r-ph
force-pushed
the
eli/v1-request-context-nested-fill
branch
from
October 29, 2026 18:17
9d529a4 to
ce9eb8c
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eli-r-ph
force-pushed
the
eli/v1-request-context-nested-fill
branch
from
October 29, 2026 22:25
ce9eb8c to
b72dec6
Compare
5 of 6 tasks
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.
Stacked on #315.
💡 Motivation and Context
A request context
$setis a default for every event in the request. Today it is used only when the event has no$setat all, so an event that sets one person property loses every context person property. The other v1 server SDKs fill these properties key by key (posthog-python, posthog-go and posthog-node).Changes
$set,$set_once,$groupsor$group_setfrom the request context fills in only the keys the event's own value lacks. The event wins for each key it sets, and a non-object value on either side keeps the event's value whole.exception_optionsand the scoped context.$feature_flag_calledevents fill the request context before the client's$is_serverand$geoip_disabledefaults, so the context wins there as on other events. A per-calldisable_geoipstill wins over the context.💚 How did you test it?
$is_server: falsein the context and checks the flag event keeps it; it fails with the old order.test_request_contextand a newexception_optionsunit test check a context$setof{plan: free, source: web}under an event$setof{plan: pro}sends{plan: pro, source: web}. Both fail with the old fill.cargo test --all-features(619 passed) and--no-default-features --features error-tracking,tls(480 passed),cargo clippy --tests -- -D warnings(with and withoutmcp),cargo fmt -- --check,scripts/check-public-api.sh(no API change).📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Generated with Claude Code