Skip to content

Commit 97d6538

Browse files
CopilotMat001
andcommitted
Fix missing CMAB bucketing reasons in decision process
Added merge of bucketing reasons for CMAB experiments to ensure traffic allocation information is included in decision responses. Co-authored-by: Mat001 <1386553+Mat001@users.noreply.github.com>
1 parent 5c41b97 commit 97d6538

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core-api/src/main/java/com/optimizely/ab/bucketing/DecisionService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ public DecisionResponse<Variation> getVariation(@Nonnull Experiment experiment,
173173
decisionVariation = bucketer.bucket(experiment, bucketingId, projectConfig, decisionPath);
174174
if (decisionPath == DecisionPath.WITH_CMAB && isCmabExperiment(experiment) && decisionVariation.getResult() != null) {
175175
// group-allocation and traffic-allocation checking passed for cmab
176-
// we need server decision overruling local bucketing for cmab
176+
// we need server decision overruling local bucketing for cmab
177+
reasons.merge(decisionVariation.getReasons());
177178
DecisionResponse<CmabDecision> cmabDecision = getDecisionForCmabExperiment(projectConfig, experiment, user, bucketingId, options);
178179
reasons.merge(cmabDecision.getReasons());
179180

0 commit comments

Comments
 (0)