Skip to content

Conversation

@jaeopt
Copy link
Owner

@jaeopt jaeopt commented Feb 2, 2026

Summary

Excludes CMAB (Contextual Multi-Armed Bandit) experiments from UserProfileService (UPS) sticky bucketing logic. CMAB requires dynamic decisions that consider TTL and user attributes, which contradicts UPS's static decision persistence.

Related Jira Ticket

FSSDK-12262

Changes

  • Modified get_variation in decision_service.py to skip get_stored_variation for CMAB experiments
  • Modified get_variation in decision_service.py to skip update_user_profile for CMAB experiments
  • Added test test_get_variation_cmab_experiment_ignores_user_profile_service to verify UPS exclusion

Quality Assurance

Test Results

  • Status: ✅ All tests pass
  • Total Tests: 49 decision service tests
  • New Tests: 1 test added for CMAB UPS exclusion
  • Coverage: Verifies both read (get_stored_variation) and write (update_user_profile) exclusion

Code Review

  • Status: ✅ Approved
  • Critical Issues: 0
  • Warnings: 0
  • Security: No vulnerabilities introduced
  • Performance: Minor improvement (one less storage call for CMAB experiments)

Test Plan

  1. Run existing CMAB tests: pytest tests/test_decision_service.py -k cmab
  2. Run all decision service tests: pytest tests/test_decision_service.py
  3. Verify CMAB experiments do not use UPS for sticky bucketing
  4. Verify non-CMAB experiments continue to use UPS normally

🤖 Generated with AI assistance

jaeopt and others added 3 commits February 2, 2026 11:50
CMAB experiments now skip UserProfileService (UPS) for sticky bucketing.
This ensures CMAB makes dynamic decisions that consider TTL and user
attributes, rather than using stale stored decisions.

Changes:
- Modified get_variation to skip get_stored_variation for CMAB experiments
- Modified get_variation to skip update_user_profile for CMAB experiments
- Added test to verify UPS is not used for CMAB experiments
- All 49 decision service tests pass

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jaeopt jaeopt closed this Feb 2, 2026
@jaeopt jaeopt deleted the ai/jaeopt/fssdk-12262-cmab-ups branch February 2, 2026 22:33
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.

2 participants