FA-74101 / Feature flag rollout bucketing / Open access
Global holdout exclusion: Holdout percentage admits one extra bucket · case 01
A 5 percent holdout actually withholds 6 percent of users, and 0 percent still withholds bucket 0.
ROOT CAUSE
Holdout membership uses h <= holdout_pct.
THE FAILURE
Holdout membership uses h <= holdout_pct.
Unsuccessful approach: Subtracting one from the limit removes the last legitimate holdout bucket.
Case contract
h = crc32("holdout:" + user) % 100 and b = crc32(flag + ":" + user) % 100. Users listed exactly in force get treatment (forced). Otherwise h < holdout_pct puts the user in the global holdout (control, holdout). Otherwise b < rollout gives treatment, else control (reason rollout). Return [variant, reason, h, b].
Why this case matters
A global holdout measures the cumulative effect of all launches and must stay uncontaminated.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import zlib
N = 1
observations = []
def solve(user, flag, holdout_pct, rollout, force):
h = zlib.crc32(('holdout:' + user).encode()) % 100
b = zlib.crc32((flag + ':' + user).encode()) % 100
if user in force:
return ['treatment', 'forced', h, b]
if h <= holdout_pct:
return ['control', 'holdout', h, b]
if b < rollout:
return ['treatment', 'rollout', h, b]
return ['control', 'rollout', h, b]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('forced QA user inside the holdout', ['u6', 'checkout', 10, 0, ['u6']], ['treatment', 'forced', 6, 94]),
('forcing matches whole user ids only', ['u14', 'search', 10, 100, ['u1']], ['control', 'holdout', 9, 44]),
('holdout boundary is exclusive', ['u6', 'checkout', 6, 100, []], ['treatment', 'rollout', 6, 94]),
('holdout user with full rollout stays control',
['u14', 'checkout', 10, 100, []],
['control', 'holdout', 9, 58]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('holdout sample 1', ['u1665', 'search', 93, 0, ['qa']], ['control', 'holdout', 92, 6]),
('holdout sample 2', ['u2377', 'search', 10, 20, ['u2']], ['control', 'rollout', 24, 94]),
('holdout sample 3', ['u1179', 'checkout', 75, 20, []], ['control', 'rollout', 75, 54])],
[('forcing matches whole user ids only', ['u14', 'search', 10, 100, ['u1']], ['control', 'holdout', 9, 44]),
('holdout boundary is exclusive', ['u6', 'checkout', 6, 100, []], ['treatment', 'rollout', 6, 94]),
('holdout user with full rollout stays control',
['u14', 'checkout', 10, 100, []],
['control', 'holdout', 9, 58]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('zero rollout control', ['u778', 'search', 0, 0, []], ['control', 'rollout', 35, 5]),
('holdout sample 6', ['u1739', 'checkout', 74, 100, ['u1739']], ['treatment', 'forced', 73, 48]),
('holdout sample 26', ['u2754', 'checkout', 20, 100, []], ['treatment', 'rollout', 20, 17]),
('holdout sample 52', ['u2085', 'search', 55, 20, []], ['control', 'holdout', 54, 96])],
[('forced QA user inside the holdout', ['u6', 'checkout', 10, 0, ['u6']], ['treatment', 'forced', 6, 94]),
('holdout boundary is exclusive', ['u6', 'checkout', 6, 100, []], ['treatment', 'rollout', 6, 94]),
('holdout user with full rollout stays control',
['u14', 'checkout', 10, 100, []],
['control', 'holdout', 9, 58]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('zero rollout control', ['u778', 'search', 0, 0, []], ['control', 'rollout', 35, 5]),
('holdout sample 11', ['u2412', 'checkout', 50, 50, []], ['control', 'rollout', 76, 65]),
('holdout sample 40', ['u1223', 'checkout', 10, 20, ['u1']], ['control', 'holdout', 9, 8]),
('holdout sample 51', ['u1347', 'search', 65, 50, ['qa']], ['control', 'rollout', 65, 59])],
[('forced QA user inside the holdout', ['u6', 'checkout', 10, 0, ['u6']], ['treatment', 'forced', 6, 94]),
('forcing matches whole user ids only', ['u14', 'search', 10, 100, ['u1']], ['control', 'holdout', 9, 44]),
('holdout user with full rollout stays control',
['u14', 'checkout', 10, 100, []],
['control', 'holdout', 9, 58]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('zero rollout control', ['u778', 'search', 0, 0, []], ['control', 'rollout', 35, 5]),
('holdout sample 16', ['u1149', 'search', 48, 50, ['qa']], ['control', 'rollout', 48, 62]),
('holdout sample 23', ['u1007', 'checkout', 52, 100, ['qa']], ['treatment', 'rollout', 52, 1]),
('holdout sample 31', ['u274', 'checkout', 96, 100, ['qa']], ['control', 'holdout', 95, 82])],
[('forced QA user inside the holdout', ['u6', 'checkout', 10, 0, ['u6']], ['treatment', 'forced', 6, 94]),
('forcing matches whole user ids only', ['u14', 'search', 10, 100, ['u1']], ['control', 'holdout', 9, 44]),
('holdout boundary is exclusive', ['u6', 'checkout', 6, 100, []], ['treatment', 'rollout', 6, 94]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('zero rollout control', ['u778', 'search', 0, 0, []], ['control', 'rollout', 35, 5]),
('holdout sample 21', ['u1207', 'search', 0, 20, []], ['control', 'rollout', 66, 64]),
('holdout sample 22', ['u2600', 'checkout', 88, 50, []], ['control', 'holdout', 87, 42]),
('holdout sample 42', ['u309', 'search', 78, 20, ['u3']], ['control', 'rollout', 78, 24])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| forced QA user inside the holdout | ['treatment', 'forced', 6, 94] | ['treatment', 'forced', 6, 94] | Passed |
| forcing matches whole user ids only | ['control', 'holdout', 9, 44] | ['control', 'holdout', 9, 44] | Passed |
| holdout boundary is exclusive | ['control', 'holdout', 6, 94] | ['treatment', 'rollout', 6, 94] | Failed |
| holdout user with full rollout stays control | ['control', 'holdout', 9, 58] | ['control', 'holdout', 9, 58] | Passed |
| user outside holdout follows rollout | ['treatment', 'rollout', 30, 52] | ['treatment', 'rollout', 30, 52] | Passed |
| holdout sample 1 | ['control', 'holdout', 92, 6] | ['control', 'holdout', 92, 6] | Passed |
| holdout sample 2 | ['control', 'rollout', 24, 94] | ['control', 'rollout', 24, 94] | Passed |
| holdout sample 3 | ['control', 'holdout', 75, 54] | ['control', 'rollout', 75, 54] | Failed |
SHA-256 / 3fd9c9c67adb744db41bff5858164f7fc1ef27c6dd9cdfe17c724ab60ec04b83
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import zlib
N = 1
observations = []
def solve(user, flag, holdout_pct, rollout, force):
h = zlib.crc32(('holdout:' + user).encode()) % 100
b = zlib.crc32((flag + ':' + user).encode()) % 100
if user in force:
return ['treatment', 'forced', h, b]
if h < holdout_pct - 1:
return ['control', 'holdout', h, b]
if b < rollout:
return ['treatment', 'rollout', h, b]
return ['control', 'rollout', h, b]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('forced QA user inside the holdout', ['u6', 'checkout', 10, 0, ['u6']], ['treatment', 'forced', 6, 94]),
('forcing matches whole user ids only', ['u14', 'search', 10, 100, ['u1']], ['control', 'holdout', 9, 44]),
('holdout boundary is exclusive', ['u6', 'checkout', 6, 100, []], ['treatment', 'rollout', 6, 94]),
('holdout user with full rollout stays control',
['u14', 'checkout', 10, 100, []],
['control', 'holdout', 9, 58]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('holdout sample 1', ['u1665', 'search', 93, 0, ['qa']], ['control', 'holdout', 92, 6]),
('holdout sample 2', ['u2377', 'search', 10, 20, ['u2']], ['control', 'rollout', 24, 94]),
('holdout sample 3', ['u1179', 'checkout', 75, 20, []], ['control', 'rollout', 75, 54])],
[('forcing matches whole user ids only', ['u14', 'search', 10, 100, ['u1']], ['control', 'holdout', 9, 44]),
('holdout boundary is exclusive', ['u6', 'checkout', 6, 100, []], ['treatment', 'rollout', 6, 94]),
('holdout user with full rollout stays control',
['u14', 'checkout', 10, 100, []],
['control', 'holdout', 9, 58]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('zero rollout control', ['u778', 'search', 0, 0, []], ['control', 'rollout', 35, 5]),
('holdout sample 6', ['u1739', 'checkout', 74, 100, ['u1739']], ['treatment', 'forced', 73, 48]),
('holdout sample 26', ['u2754', 'checkout', 20, 100, []], ['treatment', 'rollout', 20, 17]),
('holdout sample 52', ['u2085', 'search', 55, 20, []], ['control', 'holdout', 54, 96])],
[('forced QA user inside the holdout', ['u6', 'checkout', 10, 0, ['u6']], ['treatment', 'forced', 6, 94]),
('holdout boundary is exclusive', ['u6', 'checkout', 6, 100, []], ['treatment', 'rollout', 6, 94]),
('holdout user with full rollout stays control',
['u14', 'checkout', 10, 100, []],
['control', 'holdout', 9, 58]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('zero rollout control', ['u778', 'search', 0, 0, []], ['control', 'rollout', 35, 5]),
('holdout sample 11', ['u2412', 'checkout', 50, 50, []], ['control', 'rollout', 76, 65]),
('holdout sample 40', ['u1223', 'checkout', 10, 20, ['u1']], ['control', 'holdout', 9, 8]),
('holdout sample 51', ['u1347', 'search', 65, 50, ['qa']], ['control', 'rollout', 65, 59])],
[('forced QA user inside the holdout', ['u6', 'checkout', 10, 0, ['u6']], ['treatment', 'forced', 6, 94]),
('forcing matches whole user ids only', ['u14', 'search', 10, 100, ['u1']], ['control', 'holdout', 9, 44]),
('holdout user with full rollout stays control',
['u14', 'checkout', 10, 100, []],
['control', 'holdout', 9, 58]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('zero rollout control', ['u778', 'search', 0, 0, []], ['control', 'rollout', 35, 5]),
('holdout sample 16', ['u1149', 'search', 48, 50, ['qa']], ['control', 'rollout', 48, 62]),
('holdout sample 23', ['u1007', 'checkout', 52, 100, ['qa']], ['treatment', 'rollout', 52, 1]),
('holdout sample 31', ['u274', 'checkout', 96, 100, ['qa']], ['control', 'holdout', 95, 82])],
[('forced QA user inside the holdout', ['u6', 'checkout', 10, 0, ['u6']], ['treatment', 'forced', 6, 94]),
('forcing matches whole user ids only', ['u14', 'search', 10, 100, ['u1']], ['control', 'holdout', 9, 44]),
('holdout boundary is exclusive', ['u6', 'checkout', 6, 100, []], ['treatment', 'rollout', 6, 94]),
('user outside holdout follows rollout', ['u777', 'search', 0, 100, []], ['treatment', 'rollout', 30, 52]),
('zero rollout control', ['u778', 'search', 0, 0, []], ['control', 'rollout', 35, 5]),
('holdout sample 21', ['u1207', 'search', 0, 20, []], ['control', 'rollout', 66, 64]),
('holdout sample 22', ['u2600', 'checkout', 88, 50, []], ['control', 'holdout', 87, 42]),
('holdout sample 42', ['u309', 'search', 78, 20, ['u3']], ['control', 'rollout', 78, 24])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| forced QA user inside the holdout | ['treatment', 'forced', 6, 94] | ['treatment', 'forced', 6, 94] | Passed |
| forcing matches whole user ids only | ['treatment', 'rollout', 9, 44] | ['control', 'holdout', 9, 44] | Failed |
| holdout boundary is exclusive | ['treatment', 'rollout', 6, 94] | ['treatment', 'rollout', 6, 94] | Passed |
| holdout user with full rollout stays control | ['treatment', 'rollout', 9, 58] | ['control', 'holdout', 9, 58] | Failed |
| user outside holdout follows rollout | ['treatment', 'rollout', 30, 52] | ['treatment', 'rollout', 30, 52] | Passed |
| holdout sample 1 | ['control', 'rollout', 92, 6] | ['control', 'holdout', 92, 6] | Failed |
| holdout sample 2 | ['control', 'rollout', 24, 94] | ['control', 'rollout', 24, 94] | Passed |
| holdout sample 3 | ['control', 'rollout', 75, 54] | ['control', 'rollout', 75, 54] | Passed |
SHA-256 / f10989223be0fa4a0f6cc0d48e565ed4bcdda57fd33b4e6c002fda3e3704a21d
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A deterministic toy flag-evaluation model with a stipulated contract; it does not reproduce any vendor SDK byte for byte. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:48:53.623292+00:00.
Case digest / 0fc5d169f8a1e903182c9e9ae8aaf21f942b976274bb4ece2652d3fb742d8fda