Repository navigation
docs(application-lifecycle): keep build-invariant properties on install and update events - #115
Merged
turnipdabeets merged 2 commits intoOct 21, 2026
Conversation
…ll and update events posthog-ios, posthog-flutter and posthog-react-native all moved build-invariant context properties off every event and onto Application Installed / Application Updated in the same week. Record the rule behind that convergence, and carve out $lib, $lib_version, $app_version and $app_build, which stay on every event. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 49b45fca-31d9-4a87-ab66-658ab842c324
…ike $app_name and $app_namespace They change only on rebuild too, so the build-invariant rule as written would have made iOS/Android non-compliant for properties they already send on every event. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
turnipdabeets
marked this pull request as ready for review
October 20, 2026 19:47
marandaneto
approved these changes
Oct 21, 2026
marandaneto
left a comment
Member
There was a problem hiding this comment.
The code looks good; no qualifying findings. Verdict: correct.
turnipdabeets
deleted the
posthog/lifecycle-build-invariant-properties
branch
October 21, 2026 14:25
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.
Why
Three SDKs independently moved build-invariant context properties off every event and onto
Application Installed/Application Updatedin the same week, under the same rationale: the value can only change when the app binary is rebuilt, which is exactly when those events fire, so repeating it on every event costs storage for nothing. Theapplication-lifecyclespec had no rule for this class of property, so nothing stopped the next SDK adding one to its common event context — which is what these three just undid.Source SDK changes
$app_build_xcode,$app_build_sdk$flutter_version$react_native_versionWhat changed
One requirement added to
openspec/specs/application-lifecycle/spec.md, Build-invariant context properties:Application InstalledandApplication Updated, and is not added to the common event context.$flutter_versionentirely on web.$lib,$lib_version,$app_versionand$app_buildare exempt and stay on every event. They are build-invariant by the same test, but ingestion, person properties and existing insights read them on arbitrary events.The install/update step in the Behavior section gets a matching line. Proposed, applied, and archived on this branch under
openspec/changes/archive/2026-10-09-send-build-invariant-properties-on-lifecycle-events/.Uncertainty
$lib_versionand$app_versionare build-invariant too; they are carved out because moving them would be a much larger break than the one these SDKs made. That boundary is stated, not derived from any SDK change.Validation
openspec validate --specs --strictis unchanged frommain(33 passed / 31 pre-existing long-requirement warnings), and the change validated clean before archiving. These are specification checks, not executed SDK conformance tests.Created with PostHog Desktop
🤖 Generated with Claude Code