@@ -78,8 +78,6 @@ import { Maybe, OpType } from '../../utils/type';
7878import { Value } from '../../utils/promise/operation_value' ;
7979import { Platform } from '../../platform_support' ;
8080
81- import { localHoldout } from '../../feature_toggle' ;
82-
8381export const EXPERIMENT_NOT_RUNNING = 'Experiment %s is not running.' ;
8482export const RETURNING_STORED_VARIATION =
8583 'Returning previously activated variation "%s" of experiment "%s" for user "%s" from user profile.' ;
@@ -1609,21 +1607,19 @@ export class DecisionService {
16091607 } ) ;
16101608 }
16111609
1612- if ( localHoldout ( ) ) {
1613- // Check local holdouts targeting this specific experiment rule.
1614- // Inserted immediately after the forced-decision block, before regular rule evaluation.
1615- const localHoldoutsForExperiment = getHoldoutsForRule ( configObj , rule . id ) ;
1616- for ( const holdout of localHoldoutsForExperiment ) {
1617- const holdoutDecision = this . getVariationForHoldout ( configObj , holdout , user ) ;
1618- decideReasons . push ( ...holdoutDecision . reasons ) ;
1619- if ( holdoutDecision . result . variation ) {
1620- // Signal the caller to use the holdout decision directly, preserving the holdout as experiment.
1621- return Value . of < OP , LocalHoldoutResult > ( op , {
1622- result : holdoutDecision . result ,
1623- reasons : decideReasons ,
1624- holdoutDecision : true ,
1625- } ) ;
1626- }
1610+ // Check local holdouts targeting this specific experiment rule.
1611+ // Inserted immediately after the forced-decision block, before regular rule evaluation.
1612+ const localHoldoutsForExperiment = getHoldoutsForRule ( configObj , rule . id ) ;
1613+ for ( const holdout of localHoldoutsForExperiment ) {
1614+ const holdoutDecision = this . getVariationForHoldout ( configObj , holdout , user ) ;
1615+ decideReasons . push ( ...holdoutDecision . reasons ) ;
1616+ if ( holdoutDecision . result . variation ) {
1617+ // Signal the caller to use the holdout decision directly, preserving the holdout as experiment.
1618+ return Value . of < OP , LocalHoldoutResult > ( op , {
1619+ result : holdoutDecision . result ,
1620+ reasons : decideReasons ,
1621+ holdoutDecision : true ,
1622+ } ) ;
16271623 }
16281624 }
16291625
@@ -1663,20 +1659,18 @@ export class DecisionService {
16631659 } ;
16641660 }
16651661
1666- if ( localHoldout ( ) ) {
1667- // Check local holdouts targeting this specific delivery rule (FSSDK-12369).
1668- // Inserted immediately after the forced-decision block, before audience and traffic allocation checks.
1669- const localHoldoutsForDelivery = getHoldoutsForRule ( configObj , rule . id ) ;
1670- for ( const holdout of localHoldoutsForDelivery ) {
1671- const holdoutDecision = this . getVariationForHoldout ( configObj , holdout , user ) ;
1672- decideReasons . push ( ...holdoutDecision . reasons ) ;
1673- if ( holdoutDecision . result . variation ) {
1674- return {
1675- result : holdoutDecision . result ,
1676- reasons : decideReasons ,
1677- holdoutDecision : true ,
1678- } ;
1679- }
1662+ // Check local holdouts targeting this specific delivery rule (FSSDK-12369).
1663+ // Inserted immediately after the forced-decision block, before audience and traffic allocation checks.
1664+ const localHoldoutsForDelivery = getHoldoutsForRule ( configObj , rule . id ) ;
1665+ for ( const holdout of localHoldoutsForDelivery ) {
1666+ const holdoutDecision = this . getVariationForHoldout ( configObj , holdout , user ) ;
1667+ decideReasons . push ( ...holdoutDecision . reasons ) ;
1668+ if ( holdoutDecision . result . variation ) {
1669+ return {
1670+ result : holdoutDecision . result ,
1671+ reasons : decideReasons ,
1672+ holdoutDecision : true ,
1673+ } ;
16801674 }
16811675 }
16821676
0 commit comments