Skip to content

[AI-FSSDK] [FSSDK-12418] Remove experiment type validation from config parsing#443

Open
FarhanAnjum-opti wants to merge 3 commits intomasterfrom
ai/farhananjum-opti/FSSDK-12418-remove-type-validation
Open

[AI-FSSDK] [FSSDK-12418] Remove experiment type validation from config parsing#443
FarhanAnjum-opti wants to merge 3 commits intomasterfrom
ai/farhananjum-opti/FSSDK-12418-remove-type-validation

Conversation

@FarhanAnjum-opti
Copy link
Copy Markdown
Contributor

@FarhanAnjum-opti FarhanAnjum-opti commented Apr 2, 2026

Summary

Removes experiment type validation from config parsing to ensure forward compatibility. Previously, unknown experiment type values caused a fatal error that rejected the entire datafile, which would break existing SDK versions when new experiment types are added in the future.

Changes

  • Removed type validation block that rejected config with unknown experiment type values
  • Unknown experiment types are now silently accepted and stored as-is
  • Added test verifying unknown experiment types are accepted during config parsing

Jira Ticket

FSSDK-12418

Mat001 added 2 commits April 2, 2026 10:04
The injectFeatureRolloutVariations function was modifying experiments in
experimentIDMap but not updating the copies in feature.FeatureExperiments.
This caused the decision service to use experiments without the injected
"everyone else" variation, leading to incorrect bucketing and fallthrough
to rollout rules instead of returning the FR experiment decision.

When MapFeatures runs, it creates feature.FeatureExperiments by copying
experiments from experimentIDMap. Since Go copies struct values, later
modifications to experimentIDMap experiments (like appending to
TrafficAllocation slice) don't affect the copies in FeatureExperiments.

The fix updates both experimentIDMap AND feature.FeatureExperiments to
ensure the decision service sees the complete injected variations.

This fixes FSC test failures where users were getting rule_key from
rollout rules (e.g., "ee_rule_1002") instead of from FR experiments
(e.g., "fr_zero_exp").
…Experiments

This test ensures that the Feature Rollout injection properly updates
both the experimentIDMap and the feature's FeatureExperiments slice,
preventing regression of the bug where only experimentIDMap was updated.
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