feat(analytics): Implement semver and date custom ops for flags runtime props - #193
Conversation
Confidence Score: 3/5The 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
|
| 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
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@greptileai re-review |
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