Skip to content

fix(flags): align presence operator semantics - #733

Merged
marandaneto merged 2 commits into
mainfrom
fix/sdk-spec-49-presence-operators
Aug 26, 2026
Merged

fix(flags): align presence operator semantics#733
marandaneto merged 2 commits into
mainfrom
fix/sdk-spec-49-presence-operators

Conversation

@marandaneto

@marandaneto marandaneto commented Aug 26, 2026

Copy link
Copy Markdown
Member

💡 Motivation and Context

sdk-specs PR #49 defines presence operators using property-key presence and partial property context. The posthog-server evaluator treated a present null value as not set and could not resolve is_not_set when the key was present.

This change makes every present key match is_set and not match is_not_set, including null and other falsey values. An omitted key remains inconclusive so remote evaluation stays eligible. Group flags now select the property map for their matching group type before applying the same rules.

💚 How did you test it?

  • ./gradlew :posthog-server:test --tests "com.posthog.server.internal.FlagEvaluatorTest"
  • ./gradlew :posthog-server:test --tests "com.posthog.server.internal.PostHogFeatureFlagsTest"
  • ./gradlew spotlessCheck
  • Autoreview completed on commit 6811c125 with no actionable findings.

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Pi coding agent worker subagents implemented and validated the focused posthog-server change. The bundled autoreview tool reviewed the final committed diff against origin/main.

@marandaneto marandaneto self-assigned this Aug 26, 2026
@marandaneto
marandaneto requested a review from a team August 26, 2026 10:00
@marandaneto
marandaneto marked this pull request as ready for review August 26, 2026 10:00
@marandaneto
marandaneto requested a review from a team as a code owner August 26, 2026 10:00
@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(flags): use group type properties fo..." | Re-trigger Greptile

@marandaneto
marandaneto merged commit 8ef048b into main Aug 26, 2026
16 checks passed
@marandaneto
marandaneto deleted the fix/sdk-spec-49-presence-operators branch August 26, 2026 14:46
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.

2 participants