You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[AI-FSSDK] [FSSDK-12337] Add Feature Rollout support (#499)
* [AI-FSSDK] [FSSDK-12337] Add Feature Rollout support to project config parsing
* [AI-FSSDK] [FSSDK-12337] Fix test structure, mypy and ruff compliance
- Move feature rollout tests from standalone test_feature_rollout.py into
test_config.py following module-level testing convention
- Use base.BaseTest instead of unittest.TestCase for consistency
- Fix mypy strict type errors in Variation construction using cast
- All checks pass: ruff, mypy --strict, pytest (941/941)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* [AI-FSSDK] [FSSDK-12337] Simplify feature rollout config parsing
- Inline _get_everyone_else_variation logic, remove unnecessary static method
- Use get_rollout_from_id() to match TDD pseudocode
- Remove isinstance check (rollout experiments are always dicts)
- Remove 3 unit tests for deleted helper method (edge cases already
covered by integration-level tests)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* [AI-FSSDK] [FSSDK-12337] Restore _get_everyone_else_variation as method
- Restore as instance method matching TDD pseudocode structure
- Takes flag (FeatureFlag) param, calls get_rollout_from_id internally
- Caller simplified to: everyone_else_variation = self._get_everyone_else_variation(flag)
* [AI-FSSDK] [FSSDK-12337] Add ExperimentTypes constants for type field
- Add ExperimentTypes enum in helpers/enums.py with AB, MAB, CMAB, FEATURE_ROLLOUT
- Use ExperimentTypes.FEATURE_ROLLOUT constant in config parsing instead of raw string
* [AI-FSSDK] [FSSDK-12337] Type-restrict Experiment.type to ExperimentType
- Add ExperimentType Literal type in helpers/types.py: 'a/b', 'mab', 'cmab', 'feature_rollout'
- Change Experiment.type from Optional[str] to Optional[ExperimentType]
* [AI-FSSDK] [FSSDK-12337] Remove ExperimentTypes class, simplify type check
- Remove redundant ExperimentTypes class from enums.py (ExperimentType Literal suffices)
- Simplify getattr(experiment, 'type', None) to experiment.type
* [AI-FSSDK] [FSSDK-12337] Return Variation entity from _get_everyone_else_variation
- Build Variation entity once in helper, derive dict from it in caller
- Addresses PR review comment from jaeopt
* [AI-FSSDK] [FSSDK-12337] Remove redundant tests, keep 6 essential ones
Removed 7 tests that were covered by other tests:
- test_experiment_type_field_parsed (covered by injection test)
- test_feature_rollout_with_empty_rollout_experiments (similar to no_rollout)
- test_feature_rollout_multiple_experiments_mixed_types (covered by injection + unchanged)
- test_feature_rollout_flag_variations_map_includes_injected (subset of maps test)
- test_experiment_type_ab (just string assignment)
- test_feature_rollout_with_variables_on_everyone_else (edge case)
- test_existing_datafile_not_broken (covered by none_when_missing + unchanged)
* [AI-FSSDK] [FSSDK-12337] Add ExperimentTypes constant and targeted_delivery type
- Add ExperimentTypes class in enums.py with ab, mab, cmab, td, fr
- Add 'targeted_delivery' to ExperimentType Literal in types.py
- Use enums.ExperimentTypes.fr constant in injection check
- Add test for type field parsing from datafile
* [AI-FSSDK] [FSSDK-12337] Remove test not in ticket spec
Remove test_feature_rollout_everyone_else_is_last_rollout_rule
to match updated Jira ticket test requirements.
* [FSSDK-12337] Fix experiment type values to match backend
Update ExperimentTypes and ExperimentType Literal to use actual
backend values: 'multi_armed_bandit' and 'contextual_multi_armed_bandit'
instead of shorthand 'mab' and 'cmab'.
* Format ExperimentType definition for ruff check
* [AI-FSSDK] [FSSDK-12337] Update experiment type values to short-form abbreviations
* [AI-FSSDK] [FSSDK-12337] Add validation for experiment type field
* trigger CI
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments