Repository navigation
Conversation
Generated-by: termag
keelerm84
marked this pull request as ready for review
November 5, 2026 19:14
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
valueForAllreplaced the variations with the single value and calledvariationForAll 0, but left the off variation unchanged. A new test flag is a boolean flag with off variation 1, so the built flag had one variation and an off variation of 1. When targeting was off, the off variation was out of range and the flag returned the default value instead of the value. The function is documented to return the value whether targeting is on or off.valueForAllnow also sets the off variation to 0.variationForAllis unchanged. A new test turns targeting off aftervalueForAlland checks that the flag evaluates to the value.valueForAllUsersis an alias, so it gets the fix too.This matches the fix in launchdarkly/ruby-server-sdk#489.
Opened from termag
Note
Overview
valueForAllin the TestData flag builder now sets off variation to index 0 in addition to a single variation and fallthrough, so evaluation matches its documented behavior when targeting is off.Previously, shrinking the flag to one variation left the default boolean off variation at index 1, which was invalid and caused the SDK to return the client default instead of the configured value.
A new integration test applies
valueForAllthenon Falseand asserts the flag still returns the configured string value.Reviewed by Cursor Bugbot for commit 9f987d4. Bugbot is set up for automated code reviews on this repo. Configure here.