Skip to content

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

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

fix(flags): align presence operator semantics#305
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 .NET local evaluator treated a present null value as not set and could not resolve is_not_set when the key was present. This could disagree with remote flag evaluation.

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.

💚 How did you test it?

  • dotnet test tests/UnitTests/UnitTests.csproj --filter FullyQualifiedName~LocalEvaluatorTests
  • dotnet build tests/UnitTests/UnitTests.csproj --configuration Release --no-restore --nologo
  • bin/fmt --check
  • pnpm changeset status (patches PostHog and PostHog.AspNetCore)
  • Autoreview completed on commit 2f93275 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 change. The bundled autoreview tool reviewed the final committed diff against origin/main.

@marandaneto marandaneto self-assigned this Aug 26, 2026
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

posthog-dotnet Compliance Report

Date: 2026-08-26 09:52:24 UTC
Duration: 4426ms

✅ All Tests Passed!

17/17 tests passed


Feature_Flags Tests

17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 246ms
Request Payload.Flags Request Uses V2 Query Param 130ms
Request Payload.Flags Request Hits Flags Path Not Decide 113ms
Request Payload.Flags Request Omits Authorization Header 112ms
Request Payload.Token In Flags Body Matches Init 112ms
Request Payload.Groups Round Trip 115ms
Request Payload.Groups Default To Empty Object 112ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 113ms
Request Payload.Disable Geoip Omitted Defaults To False 112ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 112ms
Request Lifecycle.No Flags Request On Init Alone 5ms
Request Lifecycle.No Flags Request On Normal Capture 116ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 217ms
Request Lifecycle.Mock Response Value Is Returned To Caller 116ms
Retry Behavior.Retries Flags On 502 1117ms
Retry Behavior.Retries Flags On 504 1115ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 214ms

Comment thread .changeset/calm-flags-align.md
@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: "chore: include ASP.NET Core in changeset" | Re-trigger Greptile

@marandaneto
marandaneto merged commit 22c61e1 into main Aug 26, 2026
20 checks passed
@marandaneto
marandaneto deleted the fix/sdk-spec-49-presence-operators branch August 26, 2026 14:47
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