Skip to content

test(ffe): verify experimentation opt-out against Lean contracts - #8135

Closed
leoromanovsky wants to merge 17 commits into
mainfrom
leoromanovsky/go-future-opt-out-system-tests
Closed

leoromanovsky wants to merge 17 commits into
mainfrom
leoromanovsky/go-future-opt-out-system-tests

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Verify experimentation opt-out through running SDKs, Remote Config, and captured telemetry.

Changes

  • Generate 252 policy cases and nine lookup cases from the pinned Lean contract.
  • Check errors, reasons, variants, allocation keys, exact exposure delivery, and independent evaluation-telemetry suppression.
  • Check context recovery, configuration updates, holdout assignments, concurrent subjects, and repeated evaluations.
  • Return public OpenFeature evaluation details from the Go, Java, and Ruby weblogs.

Ruby uses the temporary libdatadog branch at ead1d3db2aa16e494f23e47b946ff12a7a1be53a. Stacked on #8080. Release manifests remain provisional. Java coverage uses the legacy provider; standalone transport remains untested.

Validation

Tested commit Validation Result
dd-trace-go@54b5ad7fe9818966d32eeceabb6c048005f077f6 System tests: three opt-out modes, policy and lookup cases, recovery, Remote Config, holdouts, and telemetry; Linux/amd64; system-tests@23b69bd59edaf9a6a3fdc71873d18d14616f550c. 21 passed; 0 failed; 0 skipped.
dd-trace-java@578ffa77cbc52e6d5d8950657a05863a449f59ab System tests: three opt-out modes, policy and lookup cases, recovery, Remote Config, holdouts, and telemetry; legacy provider, Linux/amd64; system-tests@23b69bd59edaf9a6a3fdc71873d18d14616f550c. 21 passed; 0 failed; 0 skipped.

| DataDog/dd-trace-rb@6c4e268d18e68523f0e5e6546a86d6754c350e3a | System tests: three opt-out modes, policy and lookup cases, recovery, Remote Config, holdouts, exposures, and independent telemetry; Ruby 4.0, Linux/amd64; system-tests@d4c4308b3600a48885564f687c37800b4eeb5c19; isolated net-imap 0.6.2 harness. | 21 passed; 0 failed; 0 skipped. |

Workflow

  • CI: pending for the current commit.
  • Required review: system-tests-reviewers; system-tests-core for scenario integration.

FFE reviewer selection

Reviewers: @greghuels, @sameerank

Why: Global fallback — The PR adds system tests for per-subject experimentation opt-out: an activation cutoff that suppresses exposures, plus a separate per-subject suppression of evaluation telemetry. Global reviewers were selected because no project or SME pod matched.

🤖 Automated selection.

Selection details

Initiative: global / global

Why this match: The PR adds system tests for per-subject experimentation opt-out: an activation cutoff that suppresses exposures, plus a separate per-subject suppression of evaluation telemetry. The expected results come from a pinned Lean contract and cover Remote Config updates, holdouts and EVP delivery. None of the supplied projects fits. flag-evaluation-evp explicitly excludes per-context suppression of evaluation and exposure egress and assigns it to ufc-compliance, which is not in the catalog. The work has no bandit purpose. The weblog changes that return OpenFeature evaluation details only support the opt-out assertions and are not onboarding diagnostics. No supported primary initiative fits, so this uses global ownership.

  • @greghuels — final owner (final-review-owners): Global pool filling a pod coverage gap. Existing review coverage preserved.
  • @sameerank — final owner (final-review-owners): Global pool filling a pod coverage gap. Existing review coverage preserved.

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: tests/ffe/test_experimentation_opt_out.py, tests/ffe/test_evaluation_telemetry_opt_out.py, tests/ffe/utils/experimentation_opt_out.py, tests/ffe/utils/lean_experimentation_opt_out.py, tests/ffe/README.md, utils/scripts/generate_ffe_opt_out_contract.py

Evaluated head: d4c4308b3600a48885564f687c37800b4eeb5c19

Registry revision: revision:1946aa2a-530e-487a-84a7-83aff44a1089

Pinned skill source: d214cfc65ae154b97d39af5cf32caf48aaec9bf0

Instructions: workflow-injected snapshot (no plugin loaded)

Instruction snapshot SHA-256: f23b2a88c13c0da90e2dd58246a14f257af91e2195c555039bd555b52e6f3516

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

docs/understand/scenarios/thread_context_sharing.md                     @DataDog/system-tests-core
tests/ffe/fixtures/experimentation-opt-out-lean/SOURCE.json             @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/corpus/browser-proposal.jsonl  @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/lean/Contract.lean      @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/lean/LookupOracle.lean  @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/lean/Oracle.lean        @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/lean/Proofs.lean        @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/lean/Review.lean        @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/lookup-cases.json       @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/lookup-oracle.jsonl     @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/policy-axioms.txt       @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/policy-oracle.jsonl     @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/fixtures/experimentation-opt-out-lean/runtime-cases.json      @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/test_experimentation_opt_out.py                               @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/utils/experimentation_opt_out.py                              @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/utils/lean_experimentation_opt_out.py                         @DataDog/feature-flagging-and-experimentation-sdk
tests/test_the_test/test_aws_provision_failure.py                       @DataDog/system-tests-reviewers
tests/test_the_test/test_container_cgroupns_and_mounts.py               @DataDog/system-tests-reviewers
tests/test_the_test/test_ffe_experimentation_opt_out_contract.py        @DataDog/system-tests-reviewers
tests/test_the_test/test_thread_context_sharing_config.py               @DataDog/system-tests-reviewers
utils/build/docker/python/aiohttp.Dockerfile                            @DataDog/system-tests-reviewers
utils/build/docker/python/aiohttp.base.Dockerfile                       @DataDog/system-tests-reviewers
utils/build/docker/python/aiohttp/app.sh                                @DataDog/system-tests-reviewers
utils/build/docker/python/aiohttp/main.py                               @DataDog/system-tests-reviewers
utils/build/docker/python/aiohttp/requirements-aiohttp.txt              @DataDog/system-tests-reviewers
utils/build/docker/python/aiohttp/ruff.toml                             @DataDog/system-tests-reviewers
utils/build/docker/python/parametric.base.Dockerfile                    @DataDog/system-tests-reviewers
utils/mocked_backend/_backend.py                                        @DataDog/system-tests-core
utils/mocked_backend/_backend_ffe.py                                    @DataDog/feature-flagging-and-experimentation-sdk @DataDog/system-tests-core
utils/mocked_backend/_request_handler.py                                @DataDog/system-tests-core
utils/mocked_backend/_utils.py                                          @DataDog/system-tests-core
utils/scripts/generate_ffe_opt_out_contract.py                          @DataDog/system-tests-core
.cursor/rules/end-to-end-testing.mdc                                    @DataDog/system-tests-core
.github/CODEOWNERS                                                      @DataDog/system-tests-core
.github/workflows/run-end-to-end.yml                                    @DataDog/system-tests-core
.github/workflows/run-parametric.yml                                    @DataDog/system-tests-core
.gitlab-ci.yml                                                          @DataDog/system-tests-core
.gitlab/ssi_gitlab-ci.yml                                               @DataDog/system-tests-core
.importlinter                                                           @DataDog/system-tests-core
docs/README.md                                                          @DataDog/system-tests-core
docs/edit/add-new-test.md                                               @DataDog/system-tests-core
docs/edit/backend-interface-validation-methods.md                       @DataDog/system-tests-core
docs/edit/update-docker-images.md                                       @DataDog/system-tests-core
docs/execute/build.md                                                   @DataDog/system-tests-core
docs/understand/architecture.md                                         @DataDog/system-tests-core
docs/understand/scenarios/README.md                                     @DataDog/system-tests-core
docs/understand/scenarios/onboarding.md                                 @DataDog/system-tests-core
docs/understand/weblogs/end-to-end_weblog.md                            @DataDog/system-tests-core
lib-injection/build/docker/nodejs/sample-app/health.js                  @DataDog/system-tests-core
manifests/agent.yml                                                     @DataDog/system-tests-reviewers
manifests/c.yml                                                         @DataDog/system-tests-reviewers
manifests/cpp.yml                                                       @DataDog/system-tests-reviewers
manifests/cpp_httpd.yml                                                 @DataDog/system-tests-reviewers
manifests/cpp_nginx.yml                                                 @DataDog/system-tests-reviewers
manifests/dotnet.yml                                                    @DataDog/system-tests-reviewers
manifests/golang.yml                                                    @DataDog/system-tests-reviewers
manifests/java.yml                                                      @DataDog/system-tests-reviewers
manifests/java_lambda.yml                                               @DataDog/system-tests-reviewers
manifests/java_otel.yml                                                 @DataDog/system-tests-reviewers
manifests/nodejs.yml                                                    @DataDog/system-tests-reviewers
manifests/nodejs_lambda.yml                                             @DataDog/system-tests-reviewers
manifests/nodejs_otel.yml                                               @DataDog/system-tests-reviewers
manifests/php.yml                                                       @DataDog/system-tests-reviewers
manifests/python.yml                                                    @DataDog/system-tests-reviewers
manifests/python_lambda.yml                                             @DataDog/system-tests-reviewers
manifests/python_otel.yml                                               @DataDog/system-tests-reviewers
manifests/ruby.yml                                                      @DataDog/system-tests-reviewers
manifests/ruby_lambda.yml                                               @DataDog/system-tests-reviewers
manifests/rust.yml                                                      @DataDog/system-tests-reviewers
mirror_images.lock.yaml                                                 @DataDog/system-tests-core
mirror_images.yaml                                                      @DataDog/system-tests-core
tests/appsec/api_security/test_apisecurity_telemetry.py                 @DataDog/asm-libraries
tests/ffe/README.md                                                     @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/test_exposures_datadog_agent.py                               @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/test_flag_eval_evp.py                                         @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/utils/evp.py                                                  @DataDog/feature-flagging-and-experimentation-sdk
tests/fuzzer/main.py                                                    @DataDog/system-tests-reviewers
tests/otel_tracing_e2e/test_e2e.py                                      @DataDog/opentelemetry
tests/parametric/conftest.py                                            @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_blrp_export_timeout.py         @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_blrp_max_export_batch_size.py  @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_blrp_max_queue_size.py         @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_blrp_schedule_delay.py         @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_exporter_otlp_logs_endpoint.py  @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_exporter_otlp_metrics_endpoint.py  @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_exporter_otlp_traces_endpoint.py  @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_exporter_otlp_traces_protocol.py  @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_log_level.py                   @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/utils.py                                 @DataDog/system-tests-reviewers
tests/parametric/test_ffe/test_configuration_sources.py                 @DataDog/feature-flagging-and-experimentation-sdk
tests/parametric/test_parametric_endpoints.py                           @DataDog/system-tests-reviewers
tests/test_semantic_conventions.py                                      @DataDog/system-tests-reviewers
tests/test_standard_tags.py                                             @DataDog/system-tests-reviewers
tests/test_the_test/test_aws_ami_cache.py                               @DataDog/system-tests-reviewers
tests/test_the_test/test_aws_ami_candidate_boot.py                      @DataDog/system-tests-reviewers
tests/test_the_test/test_aws_ami_cleanup.py                             @DataDog/system-tests-reviewers
tests/test_the_test/test_build_base_images.py                           @DataDog/system-tests-reviewers
tests/test_the_test/test_build_pipeline.py                              @DataDog/system-tests-reviewers
tests/test_the_test/test_compute_libraries_and_scenarios.py             @DataDog/system-tests-reviewers
tests/test_the_test/test_docker_scenario.py                             @DataDog/system-tests-reviewers
tests/test_the_test/test_github_nightly.py                              @DataDog/system-tests-reviewers
tests/test_the_test/test_group_rules.py                                 @DataDog/system-tests-reviewers
tests/test_the_test/test_mock_backend_v2.py                             @DataDog/system-tests-reviewers
tests/test_the_test/test_mock_ffe_agentless_backend.py                  @DataDog/feature-flagging-and-experimentation-sdk
tests/test_the_test/test_scrubber.py                                    @DataDog/system-tests-reviewers
tests/test_the_test/test_update_mirror_images.py                        @DataDog/system-tests-reviewers
tests/test_the_test/utils.py                                            @DataDog/system-tests-reviewers
utils/_context/_scenarios/__init__.py                                   @DataDog/system-tests-core
utils/_context/_scenarios/agentless_endtoend.py                         @DataDog/system-tests-core
utils/_context/_scenarios/auto_injection.py                             @DataDog/system-tests-core
utils/_context/_scenarios/aws_lambda.py                                 @DataDog/system-tests-core
utils/_context/_scenarios/endtoend.py                                   @DataDog/system-tests-core
utils/_context/_scenarios/open_telemetry.py                             @DataDog/system-tests-core
utils/_context/_scenarios/otel_collector.py                             @DataDog/system-tests-core
utils/_context/_scenarios/thread_context_sharing.py                     @DataDog/system-tests-core
utils/_context/containers.py                                            @DataDog/system-tests-core
utils/_features.py                                                      @DataDog/system-tests-core
utils/base_images/build_base_images.py                                  @DataDog/system-tests-core
utils/base_images/wait_for_base_image.py                                @DataDog/system-tests-core
utils/build/auto_inject.lock                                            @DataDog/system-tests-core
utils/build/build.sh                                                    @DataDog/system-tests-core
utils/build/docker/base-images.lock.json                                @DataDog/system-tests-reviewers
utils/build/docker/golang/app/_shared/common/ffe.go                     @DataDog/feature-flagging-and-experimentation-sdk @DataDog/system-tests-core
utils/build/docker/golang/app/go.mod                                    @DataDog/system-tests-reviewers
utils/build/docker/golang/app/go.sum                                    @DataDog/system-tests-reviewers
utils/build/docker/golang/app/gqlgen/graph/generated.go                 @DataDog/system-tests-reviewers
utils/build/docker/golang/app/gqlgen/graph/schema.resolvers.go          @DataDog/system-tests-reviewers
utils/build/docker/golang/parametric/datadog.go                         @DataDog/system-tests-reviewers
utils/build/docker/java/parametric/src/main/java/com/datadoghq/trace/controller/TraceController.java  @DataDog/system-tests-reviewers
utils/build/docker/java/spring-boot/src/main/java/com/datadoghq/system_tests/springboot/featureflag/FeatureFlagEvaluatorController.java  @DataDog/feature-flagging-and-experimentation-sdk @DataDog/system-tests-core
utils/build/docker/php/parametric/server.php                            @DataDog/system-tests-reviewers
utils/build/docker/python/django-poc.base.Dockerfile                    @DataDog/system-tests-reviewers
utils/build/docker/python/docker-bake.hcl                               @DataDog/system-tests-reviewers
utils/build/docker/python/fastapi.base.Dockerfile                       @DataDog/system-tests-reviewers
utils/build/docker/python/flask-poc.base.Dockerfile                     @DataDog/system-tests-reviewers
utils/build/docker/python/flask/requirements-flask-poc.txt              @DataDog/system-tests-reviewers
utils/build/docker/python/flask/requirements-uwsgi-poc.txt              @DataDog/system-tests-reviewers
utils/build/docker/python/openai-py.base.Dockerfile                     @DataDog/system-tests-reviewers
utils/build/docker/python/parametric/Dockerfile                         @DataDog/system-tests-reviewers
utils/build/docker/python/parametric/apm_test_client/server.py          @DataDog/system-tests-reviewers
utils/build/docker/python/uwsgi-poc.base.Dockerfile                     @DataDog/system-tests-reviewers
utils/build/docker/python/weblog_metadata.yml                           @DataDog/system-tests-reviewers
utils/build/docker/ruby/parametric/server.rb                            @DataDog/system-tests-reviewers
utils/build/virtual_machine/agent.lock                                  @DataDog/system-tests-core
utils/build/virtual_machine/provisions/auto-inject/auto-inject_init_vm_config.yml  @DataDog/system-tests-core
utils/build/virtual_machine/provisions/auto-inject/docker/auto-inject_prepare_docker.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/common/create_and_run_app_multicontainer.sh  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/dotnet/test-app-dotnet-multialpine/Dockerfile.dotnet_6-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/dotnet/test-app-dotnet-multialpine/Dockerfile.dotnet_8-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/dotnet/test-app-dotnet-multialpine/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/dotnet/test-app-dotnet-multicontainer/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/java/test-app-java-multialpine/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/java/test-app-java-multicontainer/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/php/test-app-php-multialpine/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/php/test-app-php-multicontainer/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multialpine/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multicontainer/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_2_6-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_4-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/docker-compose.yml  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/docker-compose.yml  @DataDog/system-tests-core
utils/ci/github/nightly.py                                              @DataDog/system-tests-core
utils/ci/gitlab/system-tests.yml.j2                                     @DataDog/system-tests-core
utils/docker_fixtures/_core.py                                          @DataDog/system-tests-core
utils/docker_fixtures/_test_clients/_core.py                            @DataDog/system-tests-core
utils/docker_fixtures/_test_clients/_test_client_parametric.py          @DataDog/system-tests-core
utils/interfaces/__init__.py                                            @DataDog/system-tests-core
utils/interfaces/_backend_v2.py                                         @DataDog/system-tests-core
utils/k8s/k8s_components.json                                           @DataDog/system-tests-core
utils/mocked_backend/__init__.py                                        @DataDog/system-tests-core
utils/mocked_backend/ffe.py                                             @DataDog/system-tests-core
utils/otel_metrics_validator.py                                         @DataDog/system-tests-core
utils/otel_validators/validator_metrics.py                              @DataDog/system-tests-core
utils/proxy/scrubber.py                                                 @DataDog/system-tests-core
utils/scripts/gitlab_print_logs.sh                                      @DataDog/system-tests-core
utils/scripts/libraries_and_scenarios_rules.yml                         @DataDog/system-tests-core
utils/scripts/pulumi_clean_up.py                                        @DataDog/system-tests-core
utils/scripts/update_mirror_images.py                                   @DataDog/system-tests-core
utils/virtual_machine/ami_candidate.py                                  @DataDog/system-tests-core
utils/virtual_machine/aws_candidate_boot.py                             @DataDog/system-tests-core
utils/virtual_machine/aws_infra_exceptions.json                         @DataDog/system-tests-core
utils/virtual_machine/aws_provider.py                                   @DataDog/system-tests-core
tests/test_the_test/test_ffe_evaluation_telemetry_opt_out_contract.py   @DataDog/system-tests-reviewers
tests/test_the_test/test_ffe_tests.py                                   @DataDog/feature-flagging-and-experimentation-sdk
utils/mocked_backend/backend_v2.py                                      @DataDog/system-tests-core

@datadog-official

datadog-official Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

@leoromanovsky
leoromanovsky marked this pull request as ready for review October 21, 2026 16:02
@leoromanovsky
leoromanovsky requested review from a team as code owners October 21, 2026 16:02
@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-21T16:13:32.756301Z — 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.

leoromanovsky added a commit to DataDog/dd-trace-go that referenced this pull request Oct 22, 2026
### What does this PR do?

Adds `ExperimentationOptOutFutureExperimentsOnly` and the environment
value `future_experiments_only`.

For a subject with `dd_experimentation_opt_out_at`, compare the cutoff
with each exposure-logging allocation's `randomizationActivatedAt`:

| Allocation activation | Result |
| --- | --- |
| Before the cutoff | Continue normal evaluation and exposure logging. |
| At or after the cutoff, or unknown | Skip the allocation and continue
ordinary delivery. |

Ordinary allocations remain eligible. Missing subject input preserves
normal evaluation. Malformed subject input returns `INVALID_CONTEXT`, as
in immediate mode. No new telemetry or subject history is added.

```sh
DD_FEATURE_FLAGS_EXPERIMENTATION_OPT_OUT_MODE=future_experiments_only
```

```go
// ProviderConfig{} uses the environment setting.
provider, err := ddflags.NewDatadogProvider(ddflags.ProviderConfig{})
if err != nil {
    return err
}
if err := of.SetNamedProviderAndWait("flags", provider); err != nil {
    return err
}
client := of.NewClient("flags")
attributes := map[string]any{}
if subject.ExperimentationOptOutAt != nil {
    attributes["dd_experimentation_opt_out_at"] =
        subject.ExperimentationOptOutAt.UTC().Format(time.RFC3339Nano)
}
enabled, err := client.BooleanValue(ctx, "new-route-planner", false,
    of.NewEvaluationContext(subject.ID, attributes))
```

An explicit `ProviderConfig{ExperimentationOptOutMode:
ddflags.ExperimentationOptOutFutureExperimentsOnly}` overrides the
environment setting.

### Motivation

**Review scope:** [Downscoped in
e282fff](e282fff)
to OpenFeature implementation, tests, and documentation. The benchmark
CI configuration is identical to #5666.
`BenchmarkExperimentationExclusion` and
`BenchmarkBooleanEvaluationExclusion` remain available locally;
registering them in CI and assessing performance belong to #5666 after
this child is folded in. That follow-up remains open; existing approvals
are not approval of the future CI changes.

Customers can stop new experiment participation while continuing older
experiments. The cutoff describes allocation activation, not previous
subject enrollment. An older experiment can still assign a subject for
the first time.

**Stack:** #5666 supplies immediate mode and the configuration API. This
PR adds the activation comparison. [Shared fixtures
#52](DataDog/ffe-system-test-data#52) defines 42
capability checks; update the pin after that PR merges.

Enablement depends on the backend emitting stable activation metadata
and retaining ordinary fallbacks. This PR does not deploy those changes.
Allocations without metadata are skipped for opted-out subjects.

### Test coverage

Shared fixtures cover cutoff boundaries, timezone offsets, fractional
seconds, invalid input, missing metadata, and fallback delivery. Local
tests cover malformed activation metadata and valid-neighbor isolation
in all modes, refresh, exposure deduplication, telemetry independence,
and concurrent randomized subjects. Baseline and immediate-mode behavior
remain covered. A benchmark covers all three modes.

[System tests #8135](DataDog/system-tests#8135),
stacked on system-tests #8080, add Remote Config, holdout assignment,
exposure, and telemetry checks across all three modes. Release gating
remains provisional until supported SDK releases are known.

### Validation

| Tested commit | Validation | Result |
| --- | --- | --- |
|
[e282fff](e282fff)
| Local OpenFeature package and CI-selection tests after syncing the
base and removing the child CI delta. | Both passed. Remote CI is
tracked separately. |
|
[febcc18](febcc18)
| System tests: disabled, immediate, and future-only modes; cutoff
boundaries, Remote Config refresh, holdout assignments, exposure
deduplication, and independent evaluation telemetry. Linux/amd64;
[system-tests
6418472](DataDog/system-tests@6418472).
| 12 passed; 0 failed; 0 skipped. |

### Reviewer's Checklist

- [ ] Changed code has unit tests for its functionality at or near 100%
coverage.
- [ ] [System-Tests](https://github.com/DataDog/system-tests/) covering
this feature have been added and enabled with the va.b.c-dev version
tag.
- [ ] There is a benchmark for any new code, or changes to existing
code.
- [ ] If this interacts with the agent in a new way, a system test has
been added.
- [ ] New code is free of linting errors. You can check this by running
`make lint` locally.
- [ ] New code doesn't break existing tests. You can check this by
running `make test` locally.
- [ ] Add an appropriate team label so this PR gets put in the right
place for the release notes.
- [ ] All generated files are up to date. You can check this by running
`make generate` locally.
- [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed
by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to
date by running `make fix-modules` locally.

Unsure? Have a question? Request a review!
@leoromanovsky leoromanovsky changed the title test(ffe): cover future experimentation opt-out delivery test(ffe): verify experimentation opt-out against Lean contracts Oct 23, 2026
@leoromanovsky
leoromanovsky requested review from a team as code owners October 23, 2026 05:47
Base automatically changed from leoromanovsky/evaluation-telemetry-opt-out to main October 23, 2026 18:02
@greghuels
greghuels removed their request for review October 27, 2026 10:33
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.

1 participant