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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the added regression coverage of unknown fields in dependent-flag references.

No open issues 🎉

What changed in this PR

Adds regression coverage to the separately activated dependent-flags suite to verify that unknown fields in flagEvaluation references do not invalidate dependent flags.

Changes:

  • Adds a dependent root with an unknown reference field, plus unknown condition and evaluator fields.
  • Expects the existing direct-match result and exactly one exposure and evaluation event for both the prerequisite and root flags.
File Description
evaluation-suites/​dependent-flags/​ufc-config.json Adds unknown fields and a dependent root flag to exercise parser tolerance.
evaluation-suites/​dependent-flags/​cases/​dependent-flags.json Adds assignment and exact telemetry expectations for the new root.

Review effort: Balanced

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