Skip to content

test: cover unassigned prerequisite failure - #60

Open
typotter wants to merge 1 commit into
mainfrom
test/dependent-no-assignment-fail-closed
Open

typotter wants to merge 1 commit into
mainfrom
test/dependent-no-assignment-fail-closed

Conversation

@typotter

Copy link
Copy Markdown
Contributor

Motivation

A reached prerequisite flag that produces no assignment is an invalid dependency-graph state. The root evaluation must fail closed instead of treating the missing assignment as a normal condition miss and continuing its allocation waterfall.

Changes

  • Add an allocation-free dependent-no-assignment-parent and a dependent-no-assignment-root whose first allocation depends on the parent's assigned variant.
  • Add a later unconditional, logged fallback with a distinctive must-not-return value. This proves a misconfigured prerequisite cannot allow the protected root waterfall to continue: the temporary no-match evaluator returns this canary value, while the fail-closed evaluator returns the caller default.
  • Add exact GENERAL evaluation-event expectations for the parent and root, require no exposures, and reject unmatched telemetry.
  • Validate with python3 ci/validate-fixtures.py, the validator unit tests, focused dependent-suite consistency assertions, git diff --check, and both evaluator behaviors.

Decisions

The fixture intentionally has no NOT_ONE_OF allocation because evaluation fails before the dependency operator can logically run. The change is limited to the dependent-flags UFC and case data; it does not alter schemas, validators, evaluator code, system tests, or documentation.

Checklist

  • JSON files are valid (no syntax errors)
  • New test cases reference existing flags in config/ufc-config.json
  • New flags have corresponding test cases in evaluation-cases/
  • Expected results match the flag configuration logic

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 <noreply@localhost>
@typotter
typotter marked this pull request as ready for review October 30, 2026 19:30
@typotter
typotter requested a review from a team as a code owner October 30, 2026 19:30
@typotter
typotter requested a review from hhan2024 October 30, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants