Skip to content

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

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

fix(flags): align presence operator semantics#259
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 is_not_set using partial property context. The Ruby local evaluator raised an inconclusive error even when the caller supplied the property key.

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

💚 How did you test it?

  • Ruby syntax checks for the implementation and spec
  • Direct smoke checks for present and omitted property behavior
  • pnpm changeset status (patches posthog-ruby and posthog-rails)
  • Autoreview completed on commit 39e05e1 with no actionable findings.

RSpec was not run locally because bundled 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 changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Pi coding agent worker subagents implemented the focused matcher change and regression specs. 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

posthog-ruby Compliance Report

Date: 2026-08-26 09:53:11 UTC
Duration: 98007ms

✅ All Tests Passed!

46/46 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 108ms
Format Validation.Event Has Uuid 105ms
Format Validation.Event Has Lib Properties 107ms
Format Validation.Distinct Id Is String 106ms
Format Validation.Token Is Present 105ms
Format Validation.Custom Properties Preserved 106ms
Format Validation.Event Has Timestamp 106ms
Retry Behavior.Retries On 503 5313ms
Retry Behavior.Does Not Retry On 400 2107ms
Retry Behavior.Does Not Retry On 401 2108ms
Retry Behavior.Respects Retry After Header 8014ms
Retry Behavior.Implements Backoff 15509ms
Retry Behavior.Retries On 500 5212ms
Retry Behavior.Retries On 502 5209ms
Retry Behavior.Retries On 504 5211ms
Retry Behavior.Max Retries Respected 15521ms
Deduplication.Generates Unique Uuids 109ms
Deduplication.Preserves Uuid On Retry 5210ms
Deduplication.Preserves Uuid And Timestamp On Retry 10409ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5214ms
Deduplication.No Duplicate Events In Batch 110ms
Deduplication.Different Events Have Different Uuids 106ms
Compression.Sends Gzip When Enabled 105ms
Batch Format.Uses Proper Batch Structure 105ms
Batch Format.Flush With No Events Sends Nothing 3ms
Batch Format.Multiple Events Batched Together 109ms
Error Handling.Does Not Retry On 403 2107ms
Error Handling.Does Not Retry On 413 2107ms
Error Handling.Retries On 408 5211ms

Feature_Flags Tests

17/17 tests passed

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

Comment thread .changeset/local-properties-align.md
@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:01
@marandaneto
marandaneto requested a review from a team as a code owner August 26, 2026 10:01
@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
Contributor

Reviews (1): Last reviewed commit: "chore: include Rails in changeset" | Re-trigger Greptile

@github-project-automation github-project-automation Bot moved this from In Review to Approved in Feature Flags Aug 26, 2026
@marandaneto
marandaneto merged commit 603bcbd into main Aug 26, 2026
23 checks passed
@marandaneto
marandaneto deleted the fix/sdk-spec-49-presence-operators branch August 26, 2026 14:47
@github-project-automation github-project-automation Bot moved this from Approved to Done in Feature Flags Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants