Skip to content

fix(flags): specify versioned property matching - #59

Open
marandaneto wants to merge 1 commit into
mainfrom
fix/versioned-property-matching
Open

fix(flags): specify versioned property matching#59
marandaneto wants to merge 1 commit into
mainfrom
fix/versioned-property-matching

Conversation

@marandaneto

@marandaneto marandaneto commented Sep 5, 2026

Copy link
Copy Markdown
Member

Problem

Local feature flag evaluators need to follow the versioned boolean matching introduced in PostHog/posthog#90694. The shared spec currently requires legacy truthiness matching for every project and does not describe the new response metadata.

Changes

  • Define property_matching_version on the definitions response. Missing or version 1 uses released server behavior. Exactly version 2 uses explicit scalar equality and membership in nonempty filter arrays.
  • Preserve the special empty-filter behavior and keep is_not as the complement of exact for known properties.
  • Require the matching version to stay with the definitions snapshot through caches, refreshes, group conditions, recursive cohorts and flag dependencies.
  • Cover version-only changes, older cache entries, failed refreshes and in-flight evaluations in acceptance fixtures.
  • Apply and archive the OpenSpec change. This PR contains specs and acceptance fixtures only, not SDK implementations or updated compliance claims.

Related opt-in harness coverage: PostHog/posthog-sdk-test-harness#53.

Validation

  • openspec validate --specs --strict: 62 specs passed.
  • Parsed and compiled all 60 Gherkin files, covering 718 scenarios.
  • Verified the six cases from the backend PR for missing, 1 and 2, with both exact and is_not.
  • Final branch autoreview against origin/main: no actionable findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant