Skip to content

Add precomputed dependent flag fixture - #62

Merged
typotter merged 6 commits into
mainfrom
dependent-flags-precomputed-fixtures
Nov 16, 2026
Merged

typotter merged 6 commits into
mainfrom
dependent-flags-precomputed-fixtures

Conversation

@typotter

@typotter typotter commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Client SDKs need shared precomputed-assignment fixtures for validating dependent flag evaluation, telemetry, RUM enrichment, and response-key obfuscation.

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.
  • Keep complete successful legacy assignments in attributes.flags; put failed roots in sibling attributes.flagEvaluationErrors.
  • Hash keys in both top-level maps and encrypt each nested dependency reference with the plaintext root flag key.
  • Assert exact ordered exposure and evaluation telemetry, including no exposure for failed or non-selected branches.
  • Generate the required obfuscated companion on top of the expanded precomputed corpus.

Contract

For obfuscated responses, capable clients decrypt each parent key using the caller root flag key, hash the recovered plaintext key for top-level lookup, and use the recovered plaintext key in dependency telemetry. Legacy clients ignore flagEvaluationErrors and continue to parse otherwise valid assignments.

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

Validation

  • python3 ci/precomputed_obfuscation.py --check: synchronized.
  • python3 ci/validate-precomputed-fixtures.py: 65 valid, 0 errors.
  • python3 -m unittest discover -s ci -p "test_*.py": 67 passed.
  • Prior RUM-FIT Chromium precomputed and RUM action-enrichment cases pass for the plaintext response.

Checklist

  • JSON files are valid.
  • Generated obfuscated companions are synchronized.
  • 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
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

@typotter
typotter force-pushed the dependent-flags-precomputed-fixtures branch from 6225ec3 to 572e59d Compare November 4, 2026 00:55
@aarsilv aarsilv added the crucible: reviewing A Crucible review has started; this PR has reviewer attention. label Nov 4, 2026
@typotter
typotter requested review from aarsilv and hhan2024 November 4, 2026 19:12
Model ordered dependency telemetry on the expanded corpus and generate plain and obfuscated Web fixtures with encoded dependency references.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-5 <noreply@localhost>
@typotter
typotter force-pushed the dependent-flags-precomputed-fixtures branch from 572e59d to 2930c3f Compare November 4, 2026 19:26
@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown

FFLSDK-289

typotter and others added 2 commits November 5, 2026 10:08
Co-authored-by: tyler.potter <tyler.potter@datadoghq.com>
Generate and validate root-scoped encrypted dependency references while retaining hashed top-level keys in the shared precomputed corpus.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-5 <noreply@localhost>
Comment thread ci/dependency_key_encryption.py Resolved
typotter and others added 3 commits November 6, 2026 21:32
Return GENERAL for requested roots and intermediate ancestors while preserving
the originating dependency's specific error. Enforce the contract in fixture
validation and regenerate the obfuscated companion.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-5 <noreply@localhost>
@typotter
typotter merged commit 6cbb1c4 into main Nov 16, 2026
5 checks passed
@typotter
typotter deleted the dependent-flags-precomputed-fixtures branch November 16, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crucible: reviewing A Crucible review has started; this PR has reviewer attention.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants