Skip to content

feat: Add the overrideAffected indicator to EvaluationReason - #218

Draft
kinyoklion wants to merge 1 commit into
feat/overridesfrom
rlamb/overrides-java-common-reason-marker
Draft

kinyoklion wants to merge 1 commit into
feat/overridesfrom
rlamb/overrides-java-common-reason-marker

Conversation

@kinyoklion

Copy link
Copy Markdown
Member

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, alongside inExperiment, so callers of the variation detail methods can tell such evaluations apart.

EvaluationReason gains isOverrideAffected() and withOverrideAffected(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 writes overrideAffected only 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.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant