Skip to content

[AI-FSSDK] (DO NOT REVIEW) [FSSDK-12275] Skip unsupported experiment type during flag decision#490

Open
raju-opti wants to merge 1 commit intomasterfrom
ai/raju-opti/FSSDK-12275-experiment-type
Open

[AI-FSSDK] (DO NOT REVIEW) [FSSDK-12275] Skip unsupported experiment type during flag decision#490
raju-opti wants to merge 1 commit intomasterfrom
ai/raju-opti/FSSDK-12275-experiment-type

Conversation

@raju-opti
Copy link

@raju-opti raju-opti commented Feb 6, 2026

Summary

Implements experiment type filtering in the decision service to skip unsupported experiment types during flag decision evaluation.

Changes

  • Experiment Class: Added optional type parameter to the Experiment class in entities.py
  • Supported Types: Defined SUPPORTED_EXPERIMENT_TYPES constant with values: a/b, mab, cmab, feature_rollouts
  • Decision Logic: Updated get_decision_for_flag in decision service to:
    • Check experiment type before evaluation
    • Skip to next experiment if type is defined but not in supported list
    • Evaluate normally if type is None or is in supported list
  • Testing: Added unit tests covering:
    • Skipping experiments with unsupported types
    • Evaluating experiments with all supported types
    • Handling None type fields

Implementation Details

The decision service now checks the experiment type field during flag decision:

  • If type is None: Experiment is evaluated (backward compatible)
  • If type is in supported list: Experiment is evaluated
  • If type is defined but NOT in supported list: Experiment is skipped with debug log

This ensures the SDK can gracefully handle new experiment types introduced in the datafile without breaking existing functionality.

Test Plan

  • ✅ All existing tests pass (no regression)
  • ✅ New unit tests verify type filtering logic
  • ✅ Implementation matches JavaScript SDK behavior

Related


🤖 Generated with Claude Code

… during flag decision

- Add optional 'type' parameter to Experiment class in entities.py
- Define SUPPORTED_EXPERIMENT_TYPES constant (a/b, mab, cmab, feature_rollouts)
- Update get_decision_for_flag to skip experiments with unsupported types
- Skip evaluation only if type is defined but not in supported list
- Evaluate normally if type is None or is supported
- Add unit tests for experiment type filtering scenarios

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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