fix(server): honor versioned local property matching - #763
Draft
marandaneto wants to merge 1 commit into
Draft
Conversation
Contributor
posthog-android Compliance ReportDate: 2026-09-05 11:55:50 UTC ✅ All Tests Passed!46/46 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
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
Server-side local feature flag evaluation needs to honor the
property_matching_versionreturned with flag definitions. This follows the backend change and the shared SDK contract.is_notcomplementsexactfor known properties.This changes
posthog-serverplus the shared local-evaluation DTO and API snapshot inposthog. Android mobile matching is unaffected. The existing three-argument Java constructor and Kotlin constructor defaults remain available. The@PostHogInternaldata class gains a fourth component and changes its generatedcopysignatures, so consumers calling that internal generated API must recompile. The existing changeset requests patch releases forposthogandposthog-server.Optional harness coverage is separate. This PR does not opt an SDK adapter into it.
💚 How did you test it?
On the final source tree, ran:
All 188 focused tests passed. Coverage includes exact/is_not rows across missing/1/2/3 versions, person/group/cohort/dependency evaluation, version-only refreshes, disk-cache serialization and async hydration, and latch-controlled stale remote responses. HTTP request counts verify local results do not silently fall back remotely. The new stale-response regression was also observed failing before its repair and passing afterward.
Prior validation on the same source passed all 548 server tests. The shared API test task was up-to-date in that repair run, with retained results for 38 passing tests. The local Java 21 runtime needs the documented Byte Buddy experimental option for existing Mockito tests. No dependencies were upgraded. No mobile/emulator build or full core suite was run, and local results are not a claim that CI passed.
The required isolated committed-branch autoreview against
origin/mainreported no actionable findings at66965b7d8ad594eb15b4366d705b9fc01c9206f9.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset fileThe existing
.changeset/quiet-booleans-match.mdis included without generating a duplicate. The internal generated API compatibility caveat is noted above.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Pi agents implemented and repaired the server-only matching behavior under human direction. This publication session used Git, GitHub CLI, Gradle, and the isolated Pi autoreview helper to validate and publish the existing implementation. Session reference:
sdk-pr-publication/0ee28abf-0f0d-4ec1-bb6e-2ec23145ea0b(local session, no public transcript).The chosen cache-instance boundary prevents stale remote writes without holding locks across HTTP requests. Existing constructor compatibility and the API snapshot were preserved. Human review is required before merging.