Skip to content

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

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#1137
raju-opti wants to merge 1 commit intomasterfrom
ai/raju-opti/FSSDK-12275-experiment-type

Conversation

@raju-opti
Copy link
Contributor

@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 Interface: Added optional type field to the Experiment interface in shared_types.ts
  • Supported Types: Defined SUPPORTED_EXPERIMENT_TYPES constant with values: a/b, mab, cmab, feature_rollouts
  • Decision Logic: Updated traverseFeatureExperimentList 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 undefined/null or is in supported list
  • Testing: Added comprehensive unit tests covering:
    • Skipping experiments with unsupported types
    • Evaluating experiments with all supported types
    • Handling undefined/null type fields
    • Logging behavior

Implementation Details

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

  • If type is undefined or null: 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
  • ✅ New unit tests verify type filtering logic
  • ✅ Build succeeds without TypeScript errors

Related


🤖 Generated with Claude Code

… during flag decision

- Add optional 'type' field to Experiment interface
- Define SUPPORTED_EXPERIMENT_TYPES constant (a/b, mab, cmab, feature_rollouts)
- Update traverseFeatureExperimentList to skip experiments with unsupported types
- Skip evaluation only if type is defined but not in supported list
- Evaluate normally if type is undefined/null or is supported
- Add comprehensive unit tests covering all scenarios

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coveralls
Copy link

Coverage Status

coverage: 77.684% (-0.05%) from 77.733%
when pulling a593b43 on ai/raju-opti/FSSDK-12275-experiment-type
into 5af7f3b on master.

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