feat: Add the overrideAffected indicator to EvaluationReason - #218
Draft
kinyoklion wants to merge 1 commit into
Draft
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
The OVERRIDE specification marks an evaluation as override-affected when any definition it read came from the SDK's override store: the flag itself, a prerequisite at any depth, or a segment consulted during matching. The evaluation reason carries that marking as a boolean indicator named overrideAffected, alongside inExperiment, so that callers of the variation detail methods can tell such evaluations apart. EvaluationReason gains isOverrideAffected() and withOverrideAffected(), which returns the same instance when the value is unchanged so that the shared static instances stay shared. The indicator takes part in equality and hashing. The JSON representation writes overrideAffected only when it is true, and parsing accepts the property. Flag overrides are currently experimental and subject to change.
This branch has not been deployed
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.
Summary
The OVERRIDE specification marks an evaluation as override-affected when any definition it read came from the SDK's override store: the flag itself, a prerequisite at any depth, or a segment consulted during matching. The evaluation reason carries that marking as a boolean indicator named
overrideAffected, alongsideinExperiment, so callers of the variation detail methods can tell such evaluations apart.EvaluationReasongainsisOverrideAffected()andwithOverrideAffected(boolean). The latter returns the same instance when the value is unchanged, so the shared static instances stay shared. The indicator takes part in equality and hashing. The JSON representation writesoverrideAffectedonly when it is true, and parsing accepts the property. The string representation is unchanged.Flag overrides are currently experimental and subject to change. The server SDK change that sets the indicator depends on the release of this package.