Skip to content

test(ffe): cover unknown fields in flagEvaluation references - #71

Open
hhan2024 wants to merge 2 commits into
mainfrom
helen/flag-evaluation-unknown-fields
Open

hhan2024 wants to merge 2 commits into
mainfrom
helen/flag-evaluation-unknown-fields

Conversation

@hhan2024

@hhan2024 hhan2024 commented Nov 5, 2026

Copy link
Copy Markdown

Motivation

Adding an unknown field inside flagEvaluation must not invalidate a dependent flag. Existing shared dependency cases contain key-only references, so they do not catch parsers that reject future reference fields.

Changes

  • Add a dependent root with {"key": "dependent-leaf-on", "property": "variant"} and unknown condition/evaluator fields.
  • Require the same direct-match assignment as the existing direct dependency case, with exactly one parent/root exposure and evaluation event each.
  • Keep the case in the separately activated dependent-flags suite. Missing and empty key validation remains the responsibility of the parser.

Decisions

This extends the existing unknown-UFC-field tolerance contract and is separate from DataDog/libdatadog#2748. The branch starts from the fixture revision used for the Rust review so the downstream snapshot update stays scoped. SDK activation remains managed by the existing system-tests activation PRs.

Validation

  • Fixture validator: 382 cases across 48 files, two suites.
  • Fixture-validator unit tests: 19 passed.
  • Patched Rust evaluator: new shared case passes, along with 141 evaluator tests and the remaining shared fixtures.
  • Cross-SDK execution is pending; current implementations that reject unknown reference fields should fail this new case.

Checklist

  • JSON files are valid.
  • New case references a flag in the suite UFC.
  • New flag has a corresponding case.
  • Expected result follows the unknown-field tolerance contract.

Require dependent UFC references to ignore new fields while preserving assignments and telemetry.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-6 <noreply@localhost>
State explicitly that flagEvaluation.property is deliberately unknown and must be ignored.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-6 <noreply@localhost>
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.

1 participant