Skip to content

Add precomputed dependent flag fixture - #62

Open
typotter wants to merge 3 commits into
mainfrom
dependent-flags-precomputed-fixtures
Open

typotter wants to merge 3 commits into
mainfrom
dependent-flags-precomputed-fixtures

Conversation

@typotter

@typotter typotter commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Motivation

Client SDKs need a shared precomputed-assignment fixture for validating dependent flag evaluation, telemetry, and RUM enrichment through a real browser.

Changes

  • Add a web-scoped successful dependency graph with selected prerequisite assignments referenced from dependencyEvaluations.
  • Add a failed graph that propagates FLAG_NOT_FOUND, returns the caller default, and marks an evaluated but non-selected leaf with isPresentInAssignment: false.
  • Assert exact exposure and evaluation telemetry, including no exposure for failed or non-selected branches.

Decisions

Dependency assignments live in the top-level flags map. Each root dependency evaluation references its flag by flagKey and records whether it was present in the assignment, matching the precomputed response consumed by the browser SDK.

The fixture is currently scoped to web, where the dependent-assignment client implementation and RUM-FIT coverage are available.

Validation

  • python3 ci/validate-precomputed-fixtures.py: 13 valid, 0 errors.
  • RUM-FIT Chromium precomputed case: 1 passed, 39 deselected.
  • RUM-FIT RUM action enrichment case: 1 passed, 40 deselected. The action contained the successful root and only prerequisites with isPresentInAssignment: true.

Checklist

  • JSON files are valid (no syntax errors)
  • UFC flag-reference checklist is not applicable; this is a precomputed-assignment response fixture
  • UFC flag/case checklist is not applicable; this does not change ufc-config.json
  • Expected results match the dependent assignment contract and were exercised through the browser SDK

typotter and others added 2 commits October 21, 2026 17:40
Cover successful dependency telemetry, fail-closed propagation, and atomic exposure rollback using the existing fixture contract.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-5 <noreply@localhost>
Move selected dependency assignments into the top-level flag map and record assignment membership on dependency evaluations.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-5 <noreply@localhost>
@typotter
typotter requested a review from a team as a code owner November 2, 2026 17:12
@typotter
typotter requested a balanced review from Copilot November 2, 2026 17:15

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 were identified for the web-only dependent-flag evaluation and telemetry fixture.

No open issues 🎉

What changed in this PR

Adds a web-only precomputed-assignment fixture for client SDK testing of dependent flag evaluation and telemetry, supporting browser-based RUM enrichment checks.

Changes:

  • Defines successful and failed dependency graphs with explicit prerequisite references.
  • Checks successful resolution and caller-default fallback with propagated FLAG_NOT_FOUND errors.
  • Asserts exact exposure and evaluation event counts, excluding exposures for failed or non-selected branches.
File Description
precomputed-assignments/​cases/​emissions/​dependent-flags.json Adds dependent flag assignments, expected evaluation results, and telemetry matchers scoped to web.

Review effort: Balanced

Require dependent precomputed fixtures to preserve dependency-before-root telemetry order.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-5 <noreply@localhost>

Co-authored-by: tyler.potter <tyler.potter@datadoghq.com>
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