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
This is the FDv1 counterpart of #489, which fixes the same bug in
TestDataV2.TestData::FlagBuilder#value_for_allreplaced the variations with the single value and calledvariation_for_all(0), but left the off variation unchanged. A new test flag is a boolean flag with off variation 1, so the built flag hadvariations: [value]andoffVariation: 1. With targeting off, the index was out of range and the flag failed to evaluate. The method is documented to return the value regardless of whether targeting is on or off.value_for_allnow also sets the off variation to 0.variation_for_allis unchanged. A new spec builds the flag and checks thatoffVariationis 0 with targeting on and off.Opened from termag
Note
Overview
Fixes TestData
FlagBuilder#value_for_allso the configured value is returned when targeting is off, matching its documented behavior (FDv1 parity with the TestDataV2 fix in #489).Previously the method collapsed variations to a single entry and set fallthrough to index 0, but left the default boolean offVariation at 1. With targeting off, evaluation pointed at an invalid variation index and could fail. The implementation now also calls
off_variation(0)aftervariation_for_all(0).A new spec asserts
offVariationis 0 for flags built withvalue_for_all, including whenon(false).Reviewed by Cursor Bugbot for commit 77411c6. Bugbot is set up for automated code reviews on this repo. Configure here.