feat: Add targeting match split#256
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new reason, "TARGETING_MATCH_SPLIT", to the OpenFeature SDK. This enhancement provides more granular detail regarding the outcome of feature flag evaluations, specifically when a targeting rule matches and a split is applied. This allows for more precise understanding and handling of feature flag resolution logic. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new reason, TARGETING_MATCH_SPLIT, to the OpenFeature SDK, adding it to both the Ruby constant definition and its RBS type signature. The review suggests a minor consistency improvement for the RBS type definition, recommending String (with a capital 'S') instead of string.
| SPLIT: String | ||
| CACHED: String | ||
| DISABLED: String | ||
| TARGETING_MATCH_SPLIT: string |
Signed-off-by: Gabrielė Stravinskaitė <gabriele.stravinskaite@vinted.com>
Signed-off-by: Gabrielė Stravinskaitė <gabriele.stravinskaite@vinted.com>
There was a problem hiding this comment.
Pull request overview
Adds a new provider resolution reason constant (TARGETING_MATCH_SPLIT) to the OpenFeature SDK, expanding the set of standardized “reason” values providers can return.
Changes:
- Add
TARGETING_MATCH_SPLITconstant toOpenFeature::SDK::Provider::Reasonimplementation. - Add corresponding
TARGETING_MATCH_SPLITconstant to the RBS signature forReason.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| sig/open_feature/sdk/provider/reason.rbs | Adds the new reason constant to the type signature. |
| lib/open_feature/sdk/provider/reason.rb | Adds the new reason constant to the runtime module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| SPLIT: String | ||
| CACHED: String | ||
| DISABLED: String | ||
| TARGETING_MATCH_SPLIT: String |
There was a problem hiding this comment.
In the RBS signature, TARGETING_MATCH_SPLIT is inserted after DISABLED, but in the Ruby implementation it’s placed right after TARGETING_MATCH. Keeping the constant order consistent between reason.rb and reason.rbs makes it easier to diff/scan and reduces the chance of missing future updates—please move the RBS constant to match the Ruby ordering.
| SPLIT: String | |
| CACHED: String | |
| DISABLED: String | |
| TARGETING_MATCH_SPLIT: String | |
| TARGETING_MATCH_SPLIT: String | |
| SPLIT: String | |
| CACHED: String | |
| DISABLED: String |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #256 +/- ##
=======================================
Coverage 99.50% 99.50%
=======================================
Files 31 31
Lines 808 809 +1
=======================================
+ Hits 804 805 +1
Misses 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR
Related Issues
Fixes #1234523
Notes
Follow-up Tasks
How to test