Skip to content

feat(local-feature-flag-evaluator): document starts_with/ends_with local-eval operators - #31

Merged
dustinbyrne merged 1 commit into
mainfrom
posthog-code/add-local-eval-string-operators
Aug 7, 2026
Merged

feat(local-feature-flag-evaluator): document starts_with/ends_with local-eval operators#31
dustinbyrne merged 1 commit into
mainfrom
posthog-code/add-local-eval-string-operators

Conversation

@posthog

@posthog posthog Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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:

Before these PRs, flags using starts_with / not_starts_with / ends_with / not_ends_with
property 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 icontains handling.

openspec/specs/local-feature-flag-evaluator/spec.md describes property-filter matching only at
the behavioral level and never enumerated which operators a conformant local evaluator must
support (not even icontains). This is genuinely missing coverage, not a contradiction of
existing text.

What this PR does

  • Adds one new requirement, String prefix/suffix property filter operators, with two
    scenarios (a matching case and a missing-property inconclusive case), following this repo's
    propose → apply → archive convention in one PR.
  • Adds a one-line pointer from Behavior item 6 to the new requirement.
  • openspec validate --specs --strict passes (59/59).

Uncertain / flagged for reviewer attention

  • Only the 6 SDKs above were checked. posthog-android, posthog-ios, posthog-java
    (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.
  • posthog-dotnet's PR also changes how an unrecognized operator is handled (degrades that one
    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

…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
dustinbyrne marked this pull request as ready for review August 7, 2026 20:52
@dustinbyrne
dustinbyrne requested a review from a team as a code owner August 7, 2026 20:52
@dustinbyrne
dustinbyrne merged commit 2036abd into main Aug 7, 2026
10 checks passed
@dustinbyrne
dustinbyrne deleted the posthog-code/add-local-eval-string-operators branch August 7, 2026 20:53
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.

1 participant