Commit 3d68a24
committed
Fix holdout initialization for missing includedFlags/excludedFlags
CRITICAL FIX: Make includedFlags and excludedFlags optional parameters
in Holdout entity to match Swift SDK behavior and fix fullstack
compatibility suite failures.
Root Cause:
- Global holdouts in datafiles may omit includedFlags/excludedFlags fields
- Python SDK required these as mandatory parameters
- Missing fields caused TypeError during ProjectConfig initialization
- This caused config to return None, resulting in "SDK not configured" error
- Swift SDK handles missing fields by defaulting to empty arrays
Changes:
- Changed includedFlags and excludedFlags from required to Optional[list[str]]
- Set default value to None, which gets converted to [] in __init__
- Matches Swift SDK behavior for handling missing fields in datafile
Impact:
- Fixes fullstack compatibility suite decide_holdouts.feature tests
- Global holdouts can now be parsed from datafiles without these fields
- All 47 holdout unit tests passing
- Backward compatible with existing datafiles that include these fields
Aligned with Swift SDK implementation.1 parent 9d18379 commit 3d68a24
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
0 commit comments