[AI-FSSDK] (DO NOT REVIEW) [FSSDK-12262] Exclude CMAB from UserProfileService#7
Closed
[AI-FSSDK] (DO NOT REVIEW) [FSSDK-12262] Exclude CMAB from UserProfileService#7
Conversation
CMAB experiments should not use UPS for sticky bucketing because: - UPS maintains decisions across the experiment lifetime without considering TTL or user attributes - This contradicts CMAB's dynamic nature which requires fresh decisions based on current context Changes: - Modified get_variation() to skip UPS read for CMAB experiments - Modified get_variation() to skip UPS write for CMAB experiments - Added 4 comprehensive unit tests to verify CMAB exclusion and non-CMAB regression Test Results: - All 52 decision_service tests pass - New tests verify CMAB doesn't use UPS - Regression tests ensure non-CMAB experiments still use UPS Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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 FSSDK-12262: Exclude CMAB from UserProfileService (UPS) for sticky bucketing.
Rationale:
Changes
Modified Files:
optimizely/decision_service.py:and not experiment.cmabcondition to skip UPS read for CMAB experiments (line 462)and not experiment.cmabcondition to skip UPS write for CMAB experiments (line 535)tests/test_decision_service.py:Test Results
✅ All 52 decision_service tests pass
New Tests:
test_get_variation__cmab_experiment__does_not_retrieve_from_ups- Verifies CMAB doesn't read from UPStest_get_variation__cmab_experiment__does_not_save_to_ups- Verifies CMAB doesn't write to UPStest_get_variation__non_cmab_experiment__retrieves_from_ups- Regression test for UPS readtest_get_variation__non_cmab_experiment__saves_to_ups- Regression test for UPS writeQuality Assurance
Code Review: ✅ APPROVED
Test Coverage: ✅ COMPREHENSIVE
🤖 Generated with Claude Code (AI-FSSDK)