Conversation
…rkin suite Adds evaluator counterparts for the four @fractional-nested scenarios that were added to the SDK-level gherkin in #345 and subsequent commits but never mirrored to the evaluator suite: - Nested if expression as variant name (fractional-nested-if-flag) - Nested var expression as variant name (fractional-nested-var-flag) - Nested if expression as weight (fractional-nested-weight-flag) - Fractional operator used as a boolean condition (fractional-as-condition-flag) All scenarios are tagged @fractional-nested so evaluator implementations can opt out during migration with -t 'not @fractional-nested'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for nested JSON Logic expressions within the fractional operator. It adds several test flags to testkit-flags.json and corresponding Gherkin scenarios in fractional.feature to verify behavior when using if or var expressions as variant names or weights, as well as using the fractional operator as a condition. I have no feedback to provide.
There was a problem hiding this comment.
Code Review
This pull request introduces new test cases for the fractional operator, specifically covering nested JSON Logic expressions within variant names and weights, and the use of the fractional operator as a condition. A review comment suggests using boolean literals instead of strings in the fractional condition to ensure semantically correct truthiness evaluation within JSON Logic.
…th scenario
Addresses Gemini review feedback: string 'false' is truthy in JSON Logic
so the existing test never exercised the else-branch. Switch to actual
boolean literals (false/true) and add a fractional-as-condition-false-flag
that routes 100% to false, verifying the if-condition takes the else-branch
('small'/'ones').
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Mirrors the fractional-as-condition-false-flag added to the evaluator test suite so both testing paths cover the else-branch of using fractional as a boolean condition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Summary
Adds evaluator counterparts for the four
@fractional-nestedscenarios that were added to the SDK-level gherkin in #345 and subsequent commits but were never mirrored to the evaluator suite.New Scenarios
All tagged
@fractional-nested— evaluator implementations can opt out during migration with-t 'not @fractional-nested'.ifexpression as variant namefractional-nested-if-flagvarexpression as variant namefractional-nested-var-flagifexpression as weightfractional-nested-weight-flagfractional-as-condition-flagFiles Changed
evaluator/flags/testkit-flags.json— 4 new flag definitionsevaluator/gherkin/fractional.feature— 4 new@fractional-nestedscenariosRelated