You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ffe): honor shared fixture result metadata (#2109)
## Motivation
The shared FFE fixtures now assert result metadata beyond returned values, including `reason` and `errorCode`. libdatadog was only checking fixture values, so it could accept shared fixture bumps while still drifting on public assignment metadata.
The latest `ffe-system-test-data` main also corrects temporal allocation fixtures to expect `DEFAULT` for active date-window-only allocations. Those allocations return a configured platform/default value, but no targeting rule matched and no non-vacuous split selected the subject.
## Changes
This updates the `ffe-system-test-data` submodule through `d9d8020`, including the merged temporal reason correction from DataDog/ffe-system-test-data#15.
The canonical fixture harness now asserts fixture-provided `reason` and `errorCode` fields in addition to values. Invalid or unsupported per-flag config is represented as a distinct evaluation error that maps to caller-default behavior while preserving isolation for valid flags in the same payload.
The evaluator now has an explicit `AssignmentReason::Default` for successful default/platform assignments. Active temporal allocations with no rules and no effective split now report `DEFAULT`, and the FFI mapping exposes that as `ddog_ffe_Reason::Default`.
## Decisions
Top-level configuration parse behavior is unchanged: a malformed full payload still fails configuration creation, while malformed individual flags are isolated and evaluate to caller defaults. Missing flags continue to report `FLAG_NOT_FOUND`. Optional `errorCode` fixture assertions remain optional because some existing shared cases omit that field even when the reason is `ERROR`.
Validation:
- `cargo +nightly-2026-02-08 fmt --all -- --check`
- `cargo check -p datadog-ffe -p datadog-ffe-ffi -p datadog-ffe-test-suite`
- `cargo nextest run -p datadog-ffe -p datadog-ffe-ffi -p datadog-ffe-test-suite --no-fail-fast`
- `cargo test --doc -p datadog-ffe -p datadog-ffe-ffi -p datadog-ffe-test-suite`
- `cargo +stable clippy -p datadog-ffe -p datadog-ffe-ffi -p datadog-ffe-test-suite --all-targets --all-features -- -D warnings`
- Earlier on this branch: `cargo +stable clippy --workspace --all-targets --all-features -- -D warnings`
- Earlier on this branch: `cargo ffi-test` built the FFI artifacts and the `ffe` example passed; the overall command failed in the unrelated `crashtracking` example with signal 5.
Co-authored-by: leo.romanovsky <leo.romanovsky@datadoghq.com>
0 commit comments