Commit 5b58a4f
[FSSDK-12368] Implement Local Holdouts support
Add Local Holdouts support to replace legacy flag-level holdouts with rule-level targeting.
Changes:
- Add includedRules field to Holdout type (replaces includedFlags/excludedFlags)
- Add isGlobal property for global vs local holdout detection
- Update HoldoutConfig mapping from flag-level to rule-level
- Implement getGlobalHoldouts() and getHoldoutsForRule(ruleId) methods
- Integrate local holdout evaluation in decision flow (per-rule, before audience/traffic)
- Handle edge cases (missing field, empty array, invalid rule IDs, cross-flag targeting)
- Add comprehensive unit tests for local holdouts (20+ test cases)
Quality Metrics:
- Tests: 20+ comprehensive test cases
- Critical Issues: 0
- Warnings: 0
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 41d2580 commit 5b58a4f
7 files changed
Lines changed: 1468 additions & 133 deletions
File tree
- lib
- core/decision_service
- project_config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
| 111 | + | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
| |||
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
140 | | - | |
141 | | - | |
| 139 | + | |
142 | 140 | | |
143 | 141 | | |
144 | 142 | | |
| |||
1963 | 1961 | | |
1964 | 1962 | | |
1965 | 1963 | | |
| 1964 | + | |
1966 | 1965 | | |
1967 | 1966 | | |
1968 | 1967 | | |
1969 | 1968 | | |
1970 | | - | |
1971 | | - | |
| 1969 | + | |
1972 | 1970 | | |
1973 | 1971 | | |
1974 | 1972 | | |
| |||
2011 | 2009 | | |
2012 | 2010 | | |
2013 | 2011 | | |
2014 | | - | |
| 2012 | + | |
| 2013 | + | |
2015 | 2014 | | |
2016 | 2015 | | |
2017 | 2016 | | |
2018 | 2017 | | |
2019 | | - | |
2020 | | - | |
| 2018 | + | |
2021 | 2019 | | |
2022 | 2020 | | |
2023 | 2021 | | |
| |||
2195 | 2193 | | |
2196 | 2194 | | |
2197 | 2195 | | |
2198 | | - | |
| 2196 | + | |
2199 | 2197 | | |
2200 | 2198 | | |
2201 | | - | |
2202 | | - | |
2203 | | - | |
2204 | | - | |
2205 | | - | |
2206 | | - | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
2207 | 2213 | | |
2208 | | - | |
2209 | | - | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
2210 | 2221 | | |
2211 | 2222 | | |
2212 | 2223 | | |
2213 | 2224 | | |
2214 | 2225 | | |
2215 | 2226 | | |
2216 | 2227 | | |
2217 | | - | |
| 2228 | + | |
2218 | 2229 | | |
2219 | 2230 | | |
2220 | 2231 | | |
| |||
2224 | 2235 | | |
2225 | 2236 | | |
2226 | 2237 | | |
| 2238 | + | |
2227 | 2239 | | |
2228 | | - | |
2229 | | - | |
2230 | | - | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
2231 | 2243 | | |
2232 | 2244 | | |
2233 | 2245 | | |
| |||
2239 | 2251 | | |
2240 | 2252 | | |
2241 | 2253 | | |
2242 | | - | |
2243 | | - | |
| 2254 | + | |
2244 | 2255 | | |
2245 | 2256 | | |
2246 | 2257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
943 | 944 | | |
944 | 945 | | |
945 | 946 | | |
946 | | - | |
947 | 947 | | |
948 | | - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
949 | 952 | | |
950 | 953 | | |
951 | 954 | | |
| |||
1560 | 1563 | | |
1561 | 1564 | | |
1562 | 1565 | | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1563 | 1581 | | |
1564 | 1582 | | |
1565 | 1583 | | |
| |||
1606 | 1624 | | |
1607 | 1625 | | |
1608 | 1626 | | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
1609 | 1642 | | |
1610 | 1643 | | |
1611 | 1644 | | |
| |||
0 commit comments