From d3a1ea23a10428895e0c0e39abdf5dc91273392f Mon Sep 17 00:00:00 2001 From: "tyler.potter" Date: Fri, 30 Oct 2026 19:12:25 +0000 Subject: [PATCH] test: cover unassigned prerequisite failure Require a reached prerequisite with no assignment to fail the full dependency graph. The later logged fallback acts as a canary for evaluators that incorrectly continue the root waterfall. Environment: Datadog workspace Co-Authored-By: Codex GPT-5 --- .../cases/dependent-flags.json | 27 ++++++++ .../dependent-flags/ufc-config.json | 64 +++++++++++++++++++ 2 files changed, 91 insertions(+) diff --git a/evaluation-suites/dependent-flags/cases/dependent-flags.json b/evaluation-suites/dependent-flags/cases/dependent-flags.json index 76cde16..44e92da 100644 --- a/evaluation-suites/dependent-flags/cases/dependent-flags.json +++ b/evaluation-suites/dependent-flags/cases/dependent-flags.json @@ -277,6 +277,33 @@ "targetingKey": "dependent-memoized", "variationType": "STRING" }, + { + "description": "A reached prerequisite that produces no assignment aborts the graph before a later unconditional root allocation can return or publish an exposure.", + "attributes": {}, + "defaultValue": "caller-default", + "flag": "dependent-no-assignment-root", + "result": { + "reason": "ERROR", + "errorCode": "GENERAL", + "value": "caller-default" + }, + "targetingKey": "dependent-no-assignment", + "variationType": "STRING", + "expectations": { + "exposures": [], + "evaluationEvents": [ + { + "flag": "dependent-no-assignment-parent", + "errorCode": "GENERAL" + }, + { + "flag": "dependent-no-assignment-root", + "errorCode": "GENERAL" + } + ], + "noUnmatchedEvents": true + } + }, { "description": "A successful prerequisite followed by a missing prerequisite aborts the graph and returns the caller default.", "attributes": {}, diff --git a/evaluation-suites/dependent-flags/ufc-config.json b/evaluation-suites/dependent-flags/ufc-config.json index e4fea47..dd15f93 100644 --- a/evaluation-suites/dependent-flags/ufc-config.json +++ b/evaluation-suites/dependent-flags/ufc-config.json @@ -676,6 +676,70 @@ } ] }, + "dependent-no-assignment-parent": { + "key": "dependent-no-assignment-parent", + "enabled": true, + "variationType": "STRING", + "variations": { + "assigned": { + "key": "assigned", + "value": "must-never-be-returned-no-assignment-parent" + } + }, + "allocations": [] + }, + "dependent-no-assignment-root": { + "key": "dependent-no-assignment-root", + "enabled": true, + "variationType": "STRING", + "variations": { + "matched": { + "key": "matched", + "value": "must-not-be-returned-no-assignment-match" + }, + "fallback": { + "key": "fallback", + "value": "must-not-be-returned-no-assignment-fallback" + } + }, + "allocations": [ + { + "key": "parent-assigned", + "rules": [ + { + "conditions": [ + { + "flagEvaluation": { + "key": "dependent-no-assignment-parent" + }, + "operator": "ONE_OF", + "value": [ + "assigned" + ] + } + ] + } + ], + "splits": [ + { + "variationKey": "matched", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "must-not-be-reached-fallback", + "splits": [ + { + "variationKey": "fallback", + "shards": [] + } + ], + "doLog": true + } + ] + }, "dependent-atomic-error-root": { "key": "dependent-atomic-error-root", "enabled": true,