feat(local-feature-flag-evaluator): document starts_with/ends_with local-eval operators - #31
Merged
Conversation
…cal-eval operators Six SDKs (posthog-js/node core, posthog-python, posthog-php, posthog-ruby, posthog-go, posthog-dotnet) independently shipped local-evaluation support for the server's `starts_with`/`not_starts_with`/`ends_with`/`not_ends_with` property-filter operators within the same week, all citing PostHog/posthog#72992. The spec never enumerated supported operators, so this converged behavior wasn't documented anywhere. Adds a new requirement capturing the shared semantics (stringify, ASCII-lowercase, prefix/suffix compare) plus two scenarios. Generated-By: PostHog Code Task-Id: 75abb508-074b-44b8-9ce8-ec0966ced703
dustinbyrne
marked this pull request as ready for review
August 7, 2026 20:52
dustinbyrne
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Six SDKs independently shipped local-evaluation support for the same new property-filter
operators within the same week, all citing the same server-side change:
@posthog/core, shared by posthog-node/posthog-js-lite)Before these PRs, flags using
starts_with/not_starts_with/ends_with/not_ends_withproperty filters could not be evaluated locally in any of these SDKs — every access fell back to
remote evaluation. All six implementations converge on the same semantics: stringify both sides,
ASCII-lowercase, then compare with a prefix/suffix check (negated for the
not_*variants) —mirroring the SDKs' existing
icontainshandling.openspec/specs/local-feature-flag-evaluator/spec.mddescribes property-filter matching only atthe behavioral level and never enumerated which operators a conformant local evaluator must
support (not even
icontains). This is genuinely missing coverage, not a contradiction ofexisting text.
What this PR does
String prefix/suffix property filter operators, with twoscenarios (a matching case and a missing-property inconclusive case), following this repo's
propose → apply → archive convention in one PR.
openspec validate --specs --strictpasses (59/59).Uncertain / flagged for reviewer attention
(posthog-server), and posthog-flutter were not audited for the same operator support in this
pass — noted as a follow-up in
tasks.md§4.1.flag to remote evaluation instead of disabling local evaluation project-wide). Only one SDK
was confirmed to implement this resilience behavior, so it's intentionally left out of this
change's scope (see
tasks.md§4.2) rather than generalized from a single data point.Created with PostHog Code