Skip to content

[AI-FSSDK] [FSSDK-12735] Add holdout exclusion logic for Targeted Delivery rules - #1171

Open
esrakartalOpt wants to merge 6 commits into
masterfrom
ai/esrakartalOpt/FSSDK-12735-exclude-targeted-delivery
Open

[AI-FSSDK] [FSSDK-12735] Add holdout exclusion logic for Targeted Delivery rules#1171
esrakartalOpt wants to merge 6 commits into
masterfrom
ai/esrakartalOpt/FSSDK-12735-exclude-targeted-delivery

Conversation

@esrakartalOpt

@esrakartalOpt esrakartalOpt commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements holdout exclusion logic for Targeted Delivery rules. When a holdout's excludeTargetedDeliveries flag is true, users bucketed into that holdout will still be served Targeted Delivery (rollout) rules normally, while A/B Test and Multi-Armed Bandit experiment rules continue to be blocked by the holdout.

Changes

  • Added excludeTargetedDeliveries field to the Holdout interface in shared types
  • Updated resolveVariationForFlag to evaluate delivery rules when holdout has exclusion enabled, falling back to holdout decision if no delivery rule matches
  • Added decision reason logging for when Targeted Delivery rules are excluded from holdout logic

Jira Ticket

FSSDK-12735

@coveralls

coveralls commented Jul 21, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 77.63% (-0.1%) from 77.725% — ai/esrakartalOpt/FSSDK-12735-exclude-targeted-delivery into master

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.

Pull request overview

Adds support for allowing Targeted Delivery (rollout) evaluation to continue even when a user is bucketed into a global holdout that opts into this behavior, while still enforcing holdout blocking for experiment rules. This is implemented by extending holdout types, updating flag-decision resolution to optionally bypass holdout blocking for rollouts, and emitting separate holdout impression events when a rollout decision is returned with holdout context.

Changes:

  • Added excludeTargetedDeliveries?: boolean to the Holdout shared type.
  • Updated DecisionService.resolveVariationForFlag to (optionally) evaluate rollout rules even when a holdout applies, attaching holdout context to the decision result.
  • Added Optimizely decide-path logic and tests to dispatch a separate holdout impression when decisionObj.holdout is present.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/shared_types.ts Extends the Holdout type with excludeTargetedDeliveries.
lib/core/decision_service/index.ts Implements holdout exclusion behavior and propagates holdout context alongside rollout decisions.
lib/core/decision_service/index.spec.ts Adds coverage for excludeTargetedDeliveries behavior and local holdout behavior.
lib/optimizely/index.ts Dispatches an additional holdout impression event when holdout context is present on a rollout decision.
lib/optimizely/index.spec.ts Adds a test validating separate holdout impression dispatch for rollout decisions with holdout context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/core/decision_service/index.ts Outdated
Comment thread lib/core/decision_service/index.ts
Comment thread lib/optimizely/index.ts Outdated
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.

4 participants