Skip to content

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

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#439
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 16, 2026

Summary

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

Changes

  • Experiment Entity: Added Type field to the Experiment struct
  • Datafile Entity: Added Type field with json:"type,omitempty" tag for datafile parsing
  • Experiment Mapper: Updated mapper to pass Type field from datafile to SDK entity
  • Supported Types: Defined SupportedExperimentTypes map with values: a/b, mab, cmab, feature_rollouts
  • Decision Logic: Updated FeatureExperimentService.GetDecision to skip experiments with unsupported types
  • Unit Tests: Added 3 test cases covering unsupported type skipping, empty type evaluation, and all supported types

Behavior

  • If Type is empty string (not set in datafile): Experiment is evaluated (backward compatible)
  • If Type is in supported types map: Experiment is evaluated
  • If Type is non-empty but NOT in supported types: Experiment is skipped with debug log

Test Plan

  • All existing tests pass (no regression)
  • New unit tests verify type filtering logic
  • go build ./... compiles without errors

Related


Generated with Claude Code

- Add Type field to Experiment entity and datafile entity
- Parse type field from datafile in experiment mapper
- Define supported experiment types (a/b, mab, cmab, feature_rollouts)
- Update FeatureExperimentService to skip experiments with unsupported types
- Experiments with empty type (not set in datafile) are still evaluated
- Add unit tests for type skipping, empty type evaluation, and all supported types

Co-Authored-By: Claude Opus 4.6 <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