Skip to content

chore(openfeature): gate dependent flag RC capability on evaluator support - #21336

Open
hhan2024 wants to merge 2 commits into
helen/dependent-flags-python-agentlessfrom
helen/dependent-flags-python-rc
Open

hhan2024 wants to merge 2 commits into
helen/dependent-flags-python-agentlessfrom
helen/dependent-flags-python-rc

Conversation

@hhan2024

@hhan2024 hhan2024 commented Oct 28, 2026 •

Copy link
Copy Markdown

Description

This PR is needed to support the agent-based path for dependent flags UFC delivery.

Register the dependent-flag Remote Config capability only when both the native RC enum and the linked evaluator report support for dependent-flag-variant-key-v1. Existing libraries continue advertising only the rules capability; declaring the protocol enum alone does not enable dependent-flag delivery.

This draft stacks on #21335 for the shared evaluator capability reporter. The current evaluator reports no dependent-flag support, so this is preparatory wiring: activation requires the evaluator's complete evaluation/exposure semantics and a libdatadog release containing DataDog/libdatadog#2745.

Testing

  • Added a six-case registration matrix covering enum availability and absent, unknown, or supported evaluator capabilities, plus a check that the current evaluator still advertises only rules support.
  • Repository formatting and complete scripts/lint checks passed.
  • scripts/run-tests --venv 616dbb5f2c38 -- -q -k test_remoteconfig: all 26 OpenFeature Remote Config tests passed (Python 3.11), including the seven new cases.
  • Native capability wire encoding, including bits 46 and 50 together, is covered in the linked libdatadog PR.

Risks

The registration is deliberately inactive with the currently pinned native library. A future evaluator upgrade must establish dependent-flag evaluation and exposure behavior before returning the capability token.

Additional Notes

No release note: this is internal, inactive opt-in wiring with no change to the capabilities advertised by a released library.

…port

Register the dependent-flag capability only when the native Remote Config enum and evaluator support are both available. Keep existing libraries on the rules-only capability.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-6 <noreply@localhost>
@hhan2024 hhan2024 added the changelog/no-changelog A changelog entry is not required for this PR. label Oct 28, 2026 — with ddtool CLI
@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against helen/dependent-flags-python-agentless using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

ddtrace/internal/openfeature/_remoteconfiguration.py                    @DataDog/feature-flagging-and-experimentation-sdk
tests/openfeature/test_remoteconfig.py                                  @DataDog/feature-flagging-and-experimentation-sdk

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 104 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 104 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=122)
ddtrace.llmobs._telemetry -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)
ddtrace.llmobs._integrations.llama_index -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)
ddtrace.llmobs._integrations.anthropic -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)
ddtrace.llmobs._integrations.bedrock_agents -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@pr-commenter

pr-commenter Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-11-02 14:34:18

Comparing candidate commit 12e0e8c in PR branch helen/dependent-flags-python-rc with baseline commit 290b9fb in branch helen/dependent-flags-python-agentless.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 20 metrics, 0 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@hhan2024
hhan2024 marked this pull request as ready for review November 2, 2026 14:58
@hhan2024
hhan2024 requested a review from a team as a code owner November 2, 2026 14:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T15:01:11.419240Z 12e0e8c Draft marked ready
🔒 Security Review ✅ Completed 2026-11-02T15:01:31.953651Z 12e0e8c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-prod-us1-6 datadog-prod-us1-6 Bot 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.

Bits Code Review: PASS

More details

Dependent-flag capability registration requires both the native RC enum and explicit evaluator support, preserving rules-only registration with the current evaluator. Static review identified no actionable defects.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 12e0e8c

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

Your PR has warnings. Please review the issues below.

🚦 1 Pipeline job failed

Changelog | Validate changelog

View more details · View in GitHub Actions

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 12e0e8c | Docs | View more details | Give us feedback!

@leoromanovsky

leoromanovsky commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

FFE reviewer selection

Reviewers: @typotter, @sameerank

Why: Dependent Flags — The diff changes enable_featureflags_rc so it registers the FfeFlagDependentFlagVariantKeyV1 Remote Config capability only when two things are true: the native enum exists, and… Reviewers come from the matched pod.

🤖 Automated selection.

Selection details

Initiative: project / dependent-flags

Why this match: The diff changes enable_featureflags_rc so it registers the FfeFlagDependentFlagVariantKeyV1 Remote Config capability only when two things are true: the native enum exists, and the linked evaluator reports DEPENDENT_FLAG_VARIANT_KEY_V1 support. This prepares the Python SDK to receive dependent-flag (prerequisite) configuration through the Agent, which is the Dependent Flags SDK fanout. The tests cover the registration matrix.

  • @typotter — primary (dependent-flags): Matched pod member. Covers: openfeature-architecture. Existing review coverage preserved.
  • @sameerank — floating (dependent-flags): Coverage and knowledge sharing. Existing review coverage preserved.

Additional review: openfeature-architecture — The change adds a tracer/native capability handshake. The shared Remote Config capability registration now depends on get_evaluator_capabilities() from the native evaluator, not just on whether the protocol enum exists. This changes the contract for how the tracer advertises evaluator-dependent capabilities. Coverage: @typotter. Evidence: ddtrace/internal/openfeature/_remoteconfiguration.py

The PR author was excluded. Existing reviewers and teams were preserved.

Debug or fix a problem

Workflow run · Bits Code session

  • Wrong project or pod? Clarify this PR’s purpose, or correct the reviewer registry and publish the change. Sheet edits take effect after publication.
  • Need another reviewer now? Request them in GitHub. This workflow only adds requests and keeps existing reviewers.
  • Stuck beyond five minutes or failed? Inspect the run’s failed step and available Bits session. After fixing the cause, rerun the workflow with this PR URL and dry_run=false. Unchanged completed runs are skipped. If the receipt says needs_reconciliation or a write outcome is uncertain, ask the workflow owner to reconcile GitHub and the receipt before retrying; do not delete the lock blindly.
  • Report a problem: Comment on the reviewer-routing skill PR with this PR URL, the workflow run link, and the expected initiative or reviewer correction.
Evidence and run details

✅ Complete — reviewer coverage verified. The workflow checked pending requests or submitted reviews on the evaluated head.

Generated asynchronously by the FFE reviewer-routing workflow.

Changed paths: ddtrace/internal/openfeature/_remoteconfiguration.py, tests/openfeature/test_remoteconfig.py

Evaluated head: 12e0e8c058fadfca02e41d6d1d704630cbc49765

Registry revision: revision:fe6a8bb4-aeba-4b6e-af89-db919eb47638

Pinned skill source: 7e3283c602f6b18a7e3e623eecb52d3a9c091a2e

Instructions: workflow-injected snapshot (no plugin loaded)

Instruction snapshot SHA-256: 52ed8cb68675dde1a47addaefe4a9500891c24014abf7dade6dfe38cf836c1d2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants