Skip to content

feat(analytics): Implement semver and date custom ops for flags runtime props - #193

Open
efahk wants to merge 5 commits into
masterfrom
efahk_custom_operators
Open

feat(analytics): Implement semver and date custom ops for flags runtime props#193
efahk wants to merge 5 commits into
masterfrom
efahk_custom_operators

Conversation

@efahk

@efahk efahk commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Adds Semantic Versioning and RFC3339 date comparison support for feature flags runtime event matching. This implements them as extensions to the JSONLogic library that is being used for targeting.

See here for more information about the comparators and golden vector list

@efahk
efahk requested review from a team and rahul-mixpanel August 24, 2026 17:41
@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown

Confidence Score: 3/5

The PR is not yet safe to merge because the two previously reported comparison defects remain reachable and can select incorrect flag variants.

Datetime operands still lose sub-second precision, and runtime-rule preprocessing still case-folds SemVer prerelease identifiers before their case-sensitive comparison.

Files Needing Attention: mixpanel/flags/custom_operators.py, mixpanel/flags/local_feature_flags.py

Important Files Changed

Filename Overview
mixpanel/flags/custom_operators.py Implements both comparators, but datetime conversion still truncates millisecond precision.
mixpanel/flags/local_feature_flags.py Registers the operators, while existing case folding still corrupts case-sensitive SemVer prerelease comparisons.
mixpanel/flags/test_custom_operators.py Exercises operator registration, golden vectors, malformed operands, and invalid datetime targets.
pyproject.toml Adds python-dateutil and packages the golden-vector fixtures.

Reviews (5): Last reviewed commit: "date updates" | Re-trigger Greptile

Comment thread mixpanel/flags/custom_operators.py
Comment thread mixpanel/flags/custom_operators.py Outdated
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.13953% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.39%. Comparing base (176d855) to head (4b5af32).

Files with missing lines Patch % Lines
mixpanel/flags/custom_operators.py 97.05% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #193      +/-   ##
==========================================
+ Coverage   96.25%   96.39%   +0.14%     
==========================================
  Files          13       15       +2     
  Lines        2616     2831     +215     
  Branches      139      174      +35     
==========================================
+ Hits         2518     2729     +211     
- Misses         64       67       +3     
- Partials       34       35       +1     
Flag Coverage Δ
openfeature-provider 50.89% <21.89%> (-3.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@efahk efahk changed the title Implement semver and date custom ops for flags runtime props feat(analytics): Implement semver and date custom ops for flags runtime props Aug 24, 2026
@efahk
efahk requested review from tylerjroach and removed request for rahul-mixpanel August 25, 2026 00:08
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