feat(ldreason): add isOverride indicator to EvaluationReason#56
Draft
kinyoklion wants to merge 1 commit into
Draft
feat(ldreason): add isOverride indicator to EvaluationReason#56kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
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.
Adds an optional boolean
isOverrideindicator toldreason.EvaluationReason, identifying evaluations whose flag definition was supplied by an SDK override source rather than by LaunchDarkly. This is the go-sdk-common piece of the SDK flag-overrides feature (OVERRIDE spec).isOverridefield with anIsOverride()accessor, following theinExperimentpattern.NewEvalReasonFromReasonWithIsOverridecopy-style helper, mirroringNewEvalReasonFromReasonWithBigSegmentsStatus, since the indicator can apply to a reason of any kind.SDK-2651
Note
Low Risk
Additive API and backward-compatible JSON; no evaluation or auth logic changed in this package.
Overview
Adds an optional
isOverrideflag onEvaluationReasonso evaluation details can record when the evaluated flag came from an SDK override source instead of LaunchDarkly (OVERRIDE spec / SDK-2651).IsOverride()andNewEvalReasonFromReasonWithIsOverridemirrorinExperiment/NewEvalReasonFromReasonWithBigSegmentsStatus, so any reason kind can carry the indicator without changing itskind. JSON only emitsisOverridewhen true, keeping the wire shape unchanged for existing payloads; shared jsonstream read/write coversencoding/jsonand easyjson.Tests factor serialization cases into
makeSerializationTestParams, cover override on every reason kind, and add an easyjson round-trip test behindlaunchdarkly_easyjson.Reviewed by Cursor Bugbot for commit 381c033. Bugbot is set up for automated code reviews on this repo. Configure here.