Background
flagd#1875 documents inconsistencies in $evaluators/$ref resolution across SDK implementations, including missing Rust support. The flagd-evaluator has a complete implementation (recursive resolution, circular reference detection, parse-time validation for missing refs), but these scenarios are not covered by the shared gherkin test suite.
Missing Test Coverage
1. Basic $ref resolution
A flag using a shared targeting rule from $evaluators should evaluate correctly.
2. Unresolved $ref (missing evaluator)
A $ref pointing to a non-existent evaluator name.
Expected: flag reports an error at state-update time (parse-time validation), not silently at evaluation time.
3. Nested $ref (evaluator referencing another evaluator)
An evaluator that itself contains a $ref.
Expected: resolved recursively.
4. Circular $ref detection
An evaluator that references itself (directly or transitively).
Expected: error reported cleanly, not an infinite loop.
What Needs to Be Done
- Add flag definitions to the testbed covering these scenarios
- Add
@evaluators gherkin scenarios to targeting.feature
- Add those scenarios to the evaluator's
tests/gherkin_tests.rs
Related
Background
flagd#1875 documents inconsistencies in
$evaluators/$refresolution across SDK implementations, including missing Rust support. The flagd-evaluator has a complete implementation (recursive resolution, circular reference detection, parse-time validation for missing refs), but these scenarios are not covered by the shared gherkin test suite.Missing Test Coverage
1. Basic
$refresolutionA flag using a shared targeting rule from
$evaluatorsshould evaluate correctly.2. Unresolved
$ref(missing evaluator)A
$refpointing to a non-existent evaluator name.Expected: flag reports an error at state-update time (parse-time validation), not silently at evaluation time.
3. Nested
$ref(evaluator referencing another evaluator)An evaluator that itself contains a
$ref.Expected: resolved recursively.
4. Circular
$refdetectionAn evaluator that references itself (directly or transitively).
Expected: error reported cleanly, not an infinite loop.
What Needs to Be Done
@evaluatorsgherkin scenarios totargeting.featuretests/gherkin_tests.rsRelated