Skip to content

[AI-FSSDK] (DO NOT REVIEW) [FSSDK-12265] Add experiments field to Holdout data model#625

Open
muzahidul-opti wants to merge 2 commits intomasterfrom
ai/muzahidul-opti/FSSDK-12265
Open

[AI-FSSDK] (DO NOT REVIEW) [FSSDK-12265] Add experiments field to Holdout data model#625
muzahidul-opti wants to merge 2 commits intomasterfrom
ai/muzahidul-opti/FSSDK-12265

Conversation

@muzahidul-opti
Copy link
Contributor

@muzahidul-opti muzahidul-opti commented Feb 3, 2026

Summary

Adds experiments field to Holdout data model to support local holdouts (MVP 3), allowing holdouts to target specific experiments instead of entire flags.

Changes

  • Added experiments field to Holdout struct with backward-compatible decoding
  • Added isLocal property to identify local vs global holdouts
  • Implemented experiment-to-holdout mapping in HoldoutConfig
  • Added getHoldoutsForExperiment() method for O(1) experiment lookups

Jira Ticket

FSSDK-12265

Notes

  • Data model layer only - no decision service logic in this ticket
  • Fully backward compatible with existing datafiles

🤖 Generated with Claude Code

- Add experiments field to Holdout struct with default empty array
- Add isLocal computed property to identify local holdouts
- Add experimentHoldoutsMap to HoldoutConfig for O(1) lookups
- Add getHoldoutsForExperiment() method for experiment-based queries
- Add comprehensive unit tests for new functionality
- Maintain backward compatibility with existing datafiles

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Combined experiment and flag mapping into single loop:
- Check experiments first - if present, build experiment map and skip flag logic
- If no experiments, proceed with flag-level logic
- More efficient (single pass) and clearer separation between local and global holdouts

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