Skip to content

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

Merged
efahk merged 9 commits into
masterfrom
efahk_custom_operators
Aug 27, 2026
Merged

feat(analytics): Implement semver and date custom ops for flags runtime props#193
efahk merged 9 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 datetime precision and SemVer prerelease case handling can still select incorrect flag variants.

Datetime operands are still reduced to whole seconds, and runtime rule preprocessing still case-folds SemVer strings before case-sensitive prerelease 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 validation, normalization, and comparison logic for the two new JSONLogic operators.
mixpanel/flags/local_feature_flags.py Registers the operators in the local feature-flag evaluation path.
mixpanel/flags/test_custom_operators.py Exercises operator registration, golden vectors, malformed operands, and invalid dates.
pyproject.toml Includes custom-operator golden-vector JSON files in package data.

Reviews (10): Last reviewed commit: "simplify date check" | Re-trigger Greptile

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

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.29730% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.33%. Comparing base (176d855) to head (b66a8ac).

Files with missing lines Patch % Lines
mixpanel/flags/custom_operators.py 95.80% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #193      +/-   ##
==========================================
+ Coverage   96.25%   96.33%   +0.08%     
==========================================
  Files          13       15       +2     
  Lines        2616     2838     +222     
  Branches      139      176      +37     
==========================================
+ Hits         2518     2734     +216     
- Misses         64       67       +3     
- Partials       34       37       +3     
Flag Coverage Δ
openfeature-provider 50.71% <21.52%> (-3.35%) ⬇️

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
Comment thread pyproject.toml Outdated
@tylerjroach

Copy link
Copy Markdown
Contributor

@greptileai re-review

@efahk
efahk merged commit 08d7350 into master Aug 27, 2026
37 checks passed
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.

2 participants