Skip to content

Support per-subject experimentation opt-out - #12950

Open
leoromanovsky wants to merge 12 commits into
masterfrom
leoromanovsky/experimentation-opt-out-immediate
Open

leoromanovsky wants to merge 12 commits into
masterfrom
leoromanovsky/experimentation-opt-out-immediate

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Adds per-subject experimentation opt-out to the standalone and legacy OpenFeature providers.
Set DD_FEATURE_FLAGS_EXPERIMENTATION_OPT_OUT_MODE before constructing the provider:

Mode Behavior
disabled (default) Ignore the subject's opt-out attribute.
immediate Skip exposure-logging allocations, then continue ordinary delivery.
future_experiments_only Retain allocations activated before the cutoff; exclude equal, later, or unknown activation.

Set dd_experimentation_opt_out_at to a timestamp in the subject's evaluation context. Omit it for eligible subjects.
Explicit Provider.Options.experimentationOptOutMode(...) overrides configuration. The provider resolves the mode at construction.

Enabled modes reject malformed subject timestamps with INVALID_CONTEXT.
Malformed activation returns PARSE_ERROR only for effective future mode with a valid subject cutoff, including unreachable allocations.
Disabled mode, immediate mode, and absent-cutoff evaluation preserve ordinary behavior.
Activation timestamps are parsed once. Inactive evaluation skips the exclusion helper.

Motivation

Subjects must be able to leave experimentation while retaining ordinary feature delivery.
Both providers now follow the shared decisions from the merged browser and Go implementations.

Validation

Tested commit Validation Result
DataDog/dd-trace-java@578ffa77cbc52e6d5d8950657a05863a449f59ab System tests: legacy provider, Lean opt-out policy, context recovery, lookup precedence, exposures, and evaluation telemetry; Linux/amd64; harness 23b69bd59edaf9a6a3fdc71873d18d14616f550c 21 passed, 0 failed, 0 skipped; 252 materializations of 90 Lean policy cases across three modes
DataDog/dd-trace-java@a4d3dfb21cec0658417d4f3842dc8c8465a27371 System tests: standalone policy, public HTTP configuration, retained exposures, deduplication, and local TLS intake; Linux/amd64 5 passed, 0 failed, 0 skipped; 90 policy cases; deduplication and telemetry suppression verified
DataDog/dd-trace-java@a4d3dfb21cec0658417d4f3842dc8c8465a27371 System tests: standalone Remote Configuration with the current agent 5 failed: inherited missing bridge; supported HTTP path passed above

Contributor Checklist

Jira ticket: FFLSDK-258

@leoromanovsky leoromanovsky added tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature type: feature Enhancements and improvements labels Oct 20, 2026
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 25.00%
• Overall Coverage: 59.83% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 578ffa7 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.78 s 14.57 s [+0.6%; +2.2%] (maybe worse)
startup:insecure-bank:tracing:Agent 13.61 s 13.67 s [-1.5%; +0.5%] (no difference)
startup:petclinic:appsec:Agent 16.60 s 16.99 s [-6.9%; +2.2%] (no difference)
startup:petclinic:iast:Agent 16.92 s 17.06 s [-1.8%; +0.1%] (no difference)
startup:petclinic:profiling:Agent 16.74 s 16.72 s [-0.8%; +1.0%] (no difference)
startup:petclinic:sca:Agent 17.11 s 16.80 s [+0.9%; +2.8%] (maybe worse)
startup:petclinic:tracing:Agent 15.76 s 16.21 s [-6.9%; +1.3%] (no difference)

Commit: 578ffa77 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@leoromanovsky leoromanovsky changed the title Support immediate per-subject experimentation opt-out Support per-subject experimentation opt-out Oct 21, 2026
@leoromanovsky
leoromanovsky marked this pull request as ready for review October 21, 2026 22:47
@leoromanovsky
leoromanovsky requested review from a team as code owners October 21, 2026 22:47
@leoromanovsky
leoromanovsky requested review from bric3 and removed request for a team October 21, 2026 22:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-10-21T22:53:27.977082Z 660b5b9 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-21T22:52:54.144234Z 660b5b9 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-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown
Contributor

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

Both providers preserve ordinary fallback delivery when experiment allocations are excluded, and malformed activation metadata is isolated to the affected flag. Validation was limited to static review.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 660b5b9

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 660b5b9611

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

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

Labels

comp: openfeature OpenFeature tag: ai generated Largely based on code generated by an AI or LLM type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant