[FSSDK-11528] Holdout support in decision service#1075
Merged
junaed-optimizely merged 12 commits intomasterfrom Jul 29, 2025
Merged
[FSSDK-11528] Holdout support in decision service#1075junaed-optimizely merged 12 commits intomasterfrom
junaed-optimizely merged 12 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds holdout support to the decision service, allowing users to be bucketed into holdout variations as part of the feature flag decision process. The implementation includes holdout evaluation logic, proper fallback mechanisms, and comprehensive test coverage.
- Added holdout evaluation logic in the decision service with proper audience and traffic allocation checking
- Enhanced project configuration to properly handle holdout variations in the variation ID map
- Updated type definitions to use more generic experiment core types for better holdout compatibility
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/utils/enums/index.ts | Added HOLDOUT decision source constant |
| lib/shared_types.ts | Updated ActivateListenerPayload to use ExperimentCore type |
| lib/project_config/project_config.ts | Enhanced holdout parsing to include variations in variationIdMap |
| lib/notification_center/type.ts | Updated type definitions to use ExperimentCore |
| lib/core/decision_service/index.ts | Implemented holdout evaluation logic with proper fallback handling |
| lib/core/decision_service/index.spec.ts | Added comprehensive test coverage for holdout functionality |
| lib/core/bucketer/index.ts | Added null safety check for experiment lookup |
Comments suppressed due to low confidence (2)
lib/core/decision_service/index.ts:81
- The import name 'holdout' is ambiguous as it conflicts with the Holdout type. Consider renaming to 'isHoldoutEnabled' or 'holdoutFeatureToggle' for clarity.
import { holdout } from '../../feature_toggle';
lib/core/decision_service/index.ts:944
- The function call 'holdout()' is ambiguous due to the naming conflict with the Holdout type. This should be renamed to match the import suggestion above.
if (holdout()) {
This reverts commit de3baaa.
raju-opti
approved these changes
Jul 29, 2025
Contributor
raju-opti
left a comment
There was a problem hiding this comment.
Looks good. few small suggestions
raju-opti
pushed a commit
that referenced
this pull request
Sep 2, 2025
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
Added holdout support in decision service and minor project config adjustments
Test plan
Tests have been added to support the new implementation
Issues