Skip to content

[AI-FSSDK] (DO NOT REVIEW) [FSSDK-12262] Exclude CMAB from UserProfileService#17

Closed
jaeopt wants to merge 1 commit intomasterfrom
ai/jaeopt/FSSDK-12262-cmab-ups-3
Closed

[AI-FSSDK] (DO NOT REVIEW) [FSSDK-12262] Exclude CMAB from UserProfileService#17
jaeopt wants to merge 1 commit intomasterfrom
ai/jaeopt/FSSDK-12262-cmab-ups-3

Conversation

@jaeopt
Copy link
Owner

@jaeopt jaeopt commented Feb 6, 2026

Summary

This PR excludes CMAB (Contextual Multi-Armed Bandit) experiments from User Profile Service (UPS) sticky bucketing logic.

Related Jira Ticket: FSSDK-12262

Changes

  • Modified optimizely/decision_service.py:
    • Skip UPS lookup (get_stored_variation) for CMAB experiments
    • Skip UPS save (update_user_profile) for CMAB experiments
    • Add decision reasons when UPS is excluded for CMAB
  • Added comprehensive test in tests/test_decision_service.py:
    • test_get_variation_cmab_experiment_excludes_user_profile_service
    • Verifies UPS methods are not called for CMAB experiments
    • Verifies decision reasons include UPS exclusion messages

Rationale

CMAB experiments should not use UPS for sticky bucketing because UPS maintains decisions across the experiment lifetime without considering TTL or user attributes, which contradicts CMAB's dynamic nature.

Test Results

All tests pass (49/49 in test_decision_service.py)

Quality Metrics

  • Tests: PASS (1 new test added, all existing tests pass)
  • Code Review: APPROVED (changes are minimal and focused)

Generated with Claude Code AI Assistant

- Skip UPS lookup for CMAB experiments (line 462)
- Skip UPS save for CMAB experiments (line 538)
- Add decision reasons for UPS exclusion
- Add comprehensive test for CMAB+UPS exclusion

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jaeopt jaeopt closed this Feb 6, 2026
@jaeopt jaeopt deleted the ai/jaeopt/FSSDK-12262-cmab-ups-3 branch February 6, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant