[FSSDK-11526] parse holdout from datafile into project config#1074
Merged
[FSSDK-11526] parse holdout from datafile into project config#1074
Conversation
also add getHoldoutsForFlag() function
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for parsing holdout configurations from the datafile into ProjectConfig and provides a helper to retrieve holdouts per flag.
- Introduces
ExperimentCoreandHoldouttypes and extendsExperiment - Extends
ProjectConfigwith holdout-related fields and implementsparseHoldoutsConfig - Adds
getHoldoutsForFlaghelper and corresponding tests; a feature toggle is added infeature_toggle.ts
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/shared_types.ts | Extracted ExperimentCore, added Holdout type |
| lib/project_config/project_config.ts | Added holdout fields, parseHoldoutsConfig, and helper |
| lib/project_config/project_config.spec.ts | Added tests for holdout parsing and retrieval |
| lib/index.browser.ts | Imported new featureToggle module |
| lib/feature_toggle.ts | Defined holdout feature flag stub |
Comments suppressed due to low confidence (3)
lib/shared_types.ts:121
- This interface property is missing a trailing semicolon, which will cause a TypeScript syntax error. Add a semicolon after the closing brace.
}
lib/index.browser.ts:22
- [nitpick] The imported
featureTogglemodule isn't used in this file. If holdout logic isn't needed here, consider removing this import to clean up unused code.
import * as featureToggle from './feature_toggle';
lib/project_config/project_config.spec.ts:35
- [nitpick] The
mockimport fromnode:testisn't used in these tests. Removing unused imports can improve readability.
import { mock } from 'node:test';
jaeopt
requested changes
Jul 1, 2025
Contributor
jaeopt
left a comment
There was a problem hiding this comment.
Looks great. One missing part is to cover "optional" includeFlags and excludeFlags.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
Issues