Skip to content

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

Open
marandaneto wants to merge 1 commit into
mainfrom
fix/sdk-spec-49-presence-operators
Open

fix(flags): align presence operator semantics#234
marandaneto wants to merge 1 commit into
mainfrom
fix/sdk-spec-49-presence-operators

Conversation

@marandaneto

Copy link
Copy Markdown
Member

💡 Motivation and Context

sdk-specs PR #49 defines is_not_set using partial property context. The PHP local evaluator returned an inconclusive exception even when the caller supplied the property key.

This change returns false for is_not_set whenever the key is present, including null and other falsey values. An omitted key remains inconclusive.

💚 How did you test it?

  • php -l lib/FeatureFlag.php
  • php -l test/FeatureFlagLocalEvaluationTest.php
  • Direct smoke checks for present and omitted property behavior
  • Autoreview completed with no actionable findings.

PHPUnit was not run locally because vendor dependencies were unavailable. CI will run the complete test suite.

📝 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 change to generate a change intent file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Pi coding agent worker subagents implemented the focused matcher change and regression tests. The bundled autoreview tool reviewed the final committed diff against origin/main.

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

Copy link
Copy Markdown
Contributor

posthog-php Compliance Report

Date: 2026-08-26 07:49:34 UTC
Duration: 95313ms

✅ All Tests Passed!

46/46 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 12ms
Format Validation.Event Has Uuid 6ms
Format Validation.Event Has Lib Properties 6ms
Format Validation.Distinct Id Is String 5ms
Format Validation.Token Is Present 6ms
Format Validation.Custom Properties Preserved 6ms
Format Validation.Event Has Timestamp 5ms
Retry Behavior.Retries On 503 5316ms
Retry Behavior.Does Not Retry On 400 2009ms
Retry Behavior.Does Not Retry On 401 2010ms
Retry Behavior.Respects Retry After Header 8014ms
Retry Behavior.Implements Backoff 15729ms
Retry Behavior.Retries On 500 5115ms
Retry Behavior.Retries On 502 5115ms
Retry Behavior.Retries On 504 5114ms
Retry Behavior.Max Retries Respected 16530ms
Deduplication.Generates Unique Uuids 12ms
Deduplication.Preserves Uuid On Retry 5113ms
Deduplication.Preserves Uuid And Timestamp On Retry 10312ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5117ms
Deduplication.No Duplicate Events In Batch 12ms
Deduplication.Different Events Have Different Uuids 6ms
Compression.Sends Gzip When Enabled 6ms
Batch Format.Uses Proper Batch Structure 6ms
Batch Format.Flush With No Events Sends Nothing 3ms
Batch Format.Multiple Events Batched Together 10ms
Error Handling.Does Not Retry On 403 2008ms
Error Handling.Does Not Retry On 413 2009ms
Error Handling.Retries On 408 5115ms

Feature_Flags Tests

17/17 tests passed

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

@marandaneto
marandaneto requested a review from a team August 26, 2026 10:00
@posthog-project-board-bot posthog-project-board-bot Bot moved this to In Progress in Feature Flags Aug 26, 2026
@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
@posthog-project-board-bot posthog-project-board-bot Bot moved this from In Progress to In Review in Feature Flags Aug 26, 2026
@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown

Reviews (1): Last reviewed commit: "fix(flags): align presence operator sema..." | Re-trigger Greptile

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

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

1 participant