Skip to content

feat(fractional): mirror nested fractional scenarios to evaluator gherkin suite#357

Merged
toddbaert merged 3 commits intomainfrom
test/nested-fractional-evaluator-followup
Mar 30, 2026
Merged

feat(fractional): mirror nested fractional scenarios to evaluator gherkin suite#357
toddbaert merged 3 commits intomainfrom
test/nested-fractional-evaluator-followup

Conversation

@aepfli
Copy link
Copy Markdown
Member

@aepfli aepfli commented Mar 30, 2026

Summary

Adds evaluator counterparts for the four @fractional-nested scenarios 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'.

Scenario Flag
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

Files Changed

  • evaluator/flags/testkit-flags.json — 4 new flag definitions
  • evaluator/gherkin/fractional.feature — 4 new @fractional-nested scenarios

Related

…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>
@aepfli aepfli requested a review from a team as a code owner March 30, 2026 14:10
@aepfli
Copy link
Copy Markdown
Member Author

aepfli commented Mar 30, 2026

/gemini review

@aepfli aepfli changed the title test(fractional): mirror nested fractional scenarios to evaluator gherkin suite feat(fractional): mirror nested fractional scenarios to evaluator gherkin suite Mar 30, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

aepfli and others added 2 commits March 30, 2026 16:18
…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>
@toddbaert toddbaert merged commit eaec4d9 into main Mar 30, 2026
3 checks passed
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.

2 participants