[AI-FSSDK] [FSSDK-12735] Add holdout exclusion logic for Targeted Delivery rules - #1171
Open
esrakartalOpt wants to merge 10 commits into
Open
[AI-FSSDK] [FSSDK-12735] Add holdout exclusion logic for Targeted Delivery rules#1171esrakartalOpt wants to merge 10 commits into
esrakartalOpt wants to merge 10 commits into
Conversation
…ard, and null TD fallback
…ession and add missing decision reason
There was a problem hiding this comment.
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?: booleanto theHoldoutshared type. - Updated
DecisionService.resolveVariationForFlagto (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.holdoutis 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.
raju-opti
approved these changes
Jul 28, 2026
…into ai/esrakartalOpt/FSSDK-12735-exclude-targeted-delivery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements holdout exclusion logic for Targeted Delivery rules. When a holdout's
excludeTargetedDeliveriesflag 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
excludeTargetedDeliveriesfield to the Holdout interface in shared typesresolveVariationForFlagto evaluate delivery rules when holdout has exclusion enabled, falling back to holdout decision if no delivery rule matchesJira Ticket
FSSDK-12735