feat: include selected variant key in flag results#314
Merged
Conversation
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 871d63c |
a293154 to
1f12564
Compare
4 tasks
1f12564 to
8694ce4
Compare
a34303f to
8bd1ce1
Compare
8bd1ce1 to
9f61777
Compare
Every flag result now carries a `variant` field, mirroring OpenFeature's `ResolutionDetails.variant` (always present, nullable): - the variant's key when a named multivariate variant is selected, - `"control"` when an identity falls in the control bucket (the leftover allocation that resolves to the feature's default value); the control is not a multivariate option, so the engine synthesises this key, - `null` otherwise (standard features, unkeyed variants, or evaluation without an identity, where nothing is bucketed). Selection logic, hashing and ordering are unchanged. The behaviour is covered by the shared engine-test-data corpus, bumped to v3.9.0.
9f61777 to
871d63c
Compare
Member
Author
|
/gemini review |
Zaimwa9
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every flag result now carries a
variant, mirroring OpenFeature'sResolutionDetails.variant(always present, nullable):"control"for the control bucket (the leftover allocation resolving to the default value; synthesised, as control is not a multivariate option),nullotherwise — standard feature, unkeyed variant, or no identity.Selection logic, hashing and ordering are unchanged. Behaviour is covered by the engine-test-data corpus (submodule bumped to v3.9.0), so the variant-specific unit test was dropped as redundant.