feat(analytics): Implement semver and date custom ops for flags runtime props - #193
feat(analytics): Implement semver and date custom ops for flags runtime props#193efahk wants to merge 5 commits into
Conversation
Confidence Score: 3/5The 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
|
| 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
Codecov Report❌ Patch coverage is
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
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:
|
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