[AI-FSSDK] [FSSDK-12369] Add local holdouts support with includedRules field#398
[AI-FSSDK] [FSSDK-12369] Add local holdouts support with includedRules field#398Mat001 wants to merge 4 commits into
Conversation
- Fix Layout/SpaceInsideHashLiteralBraces in datafile_project_config_spec.rb - Fix Lint/UselessAssignment by removing unused feature_flag variable in decision_service_holdout_spec.rb Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…outs, use next pattern
…00% local holdout
|
@esrakartalOpt WHen you are reviewing this PR, please note this and see maybe with Muzahid if this needs to be fixed or not. It was there before local holdouts (came in with global hodlouts): Bug: User Profile Service bypassed when holdouts are present in the datafileFile: lib/optimizely/decision_service.rb What's happeningget_variation_for_feature routes to one of two paths based on whether any Running holdouts exist in the datafile: def get_variation_for_feature(project_config, feature_flag, user_context, decide_options = []) if running_holdouts && !running_holdouts.empty? def get_variations_for_feature_list(...) feature_flags.each do |feature_flag| user_profile_tracker.save_user_profile # ← sticky bucketing saved ImpactOnly affects projects using a custom user_profile_service for sticky bucketing def get_variation_for_feature(project_config, feature_flag, user_context, decide_options = []) |
Summary
Adds Local Holdouts support to the Ruby SDK. Local holdouts allow targeting specific experiment and delivery rules within a flag via a new
includedRulesfield, while global holdouts (whereincludedRulesis absent or nil) continue to apply to all rules across all flags.Changes
includedRulesoptional field support to holdout data model inDatafileProjectConfigholdout_global?predicate,get_global_holdouts, andget_holdouts_for_rulemethods to configget_variation_from_experiment_ruleandget_variation_from_delivery_ruleinDecisionServiceto check local holdouts per rule after forced decisionsconstants.rbto allowincludedRulesfield in holdout objectsJira Ticket
FSSDK-12369