FA-73971 / Feature flag rollout bucketing / Open access
Bucketing attribute selection: Missing bucketing attribute yields no identity · case 01
Users without an org attribute are all treated as unbucketable instead of using their key.
ROOT CAUSE
The identity is taken from user.get(bucket_by) with no fallback to the user key.
VERIFIED REPAIR
Fall back to the user key when the bucketing attribute is absent.
Unsuccessful approach: Falling back with "or" also discards legitimate falsy identities such as 0 or "".
Case contract
The bucketing identity is user[bucket_by] when bucket_by is non-empty and present, else user["key"]. Booleans, None and non-scalar values are unbucketable -> [None, 0]; integral floats use their integer form, other floats are unbucketable; ints and strings are used verbatim via str(). Return [identity, crc32(flag_key + "." + salt + "." + identity) % 100000].
Why this case matters
Bucketing by organisation or device keeps whole accounts in one variant; the identity must be stable.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import zlib
N = 1
observations = []
def solve(flag_key, salt, user, bucket_by):
value = user.get(bucket_by) if bucket_by else user.get('key')
if isinstance(value, bool) or value is None:
return [None, 0]
if isinstance(value, float):
if value != int(value):
return [None, 0]
value = int(value)
if not isinstance(value, (int, str)):
return [None, 0]
ident = str(value)
return [ident, zlib.crc32((flag_key + '.' + salt + '.' + ident).encode()) % 100000]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('boolean attribute is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': True}, 'org'], [None, 0]),
('integral float bucketed as integer', ['new-nav', 'a', {'key': 'u1', 'org': 5.0}, 'org'], ['5', 7520]),
('integral float matches integer identity', ['new-nav', 'a', {'key': 'u1', 'org': 5}, 'org'], ['5', 7520]),
('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 1', ['new-nav', 'b', {'key': '05', 'org': '', 'team': 5.0}, 'team'], ['5', 56729]),
('identity sample 2', ['new-nav', 'b', {'key': 'u1', 'org': '05', 'team': [1]}, 'org'], ['05', 58693])],
[('integral float bucketed as integer', ['new-nav', 'a', {'key': 'u1', 'org': 5.0}, 'org'], ['5', 7520]),
('integral float matches integer identity', ['new-nav', 'a', {'key': 'u1', 'org': 5}, 'org'], ['5', 7520]),
('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 21', ['new-nav', 'a', {'key': 'u42', 'org': 12, 'team': False}, 'team'], [None, 0]),
('identity sample 48', ['new-nav', 'b', {'key': 'x0'}, 'team'], ['x0', 76711])],
[('integral float matches integer identity', ['new-nav', 'a', {'key': 'u1', 'org': 5}, 'org'], ['5', 7520]),
('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('leading-zero string kept verbatim', ['new-nav', 'a', {'key': 'u1', 'org': '007'}, 'org'], ['007', 42108]),
('identity sample 11', ['new-nav', 'a', {'key': 'u1', 'org': 12, 'team': 2.5}, None], ['u1', 4562]),
('identity sample 41', ['new-nav', 'b', {'key': '007', 'org': 0, 'team': [1]}, 'org'], ['0', 81622]),
('identity sample 42', ['new-nav', 'a', {'key': '05', 'team': False}, 'org'], ['05', 69931])],
[('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('leading-zero string kept verbatim', ['new-nav', 'a', {'key': 'u1', 'org': '007'}, 'org'], ['007', 42108]),
('leading-zero key kept verbatim', ['bulk-edit', 'b', {'key': '05'}, None], ['05', 9565]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 16', ['new-nav', 'b', {'key': 'u1', 'org': '0012', 'team': ''}, None], ['u1', 96668]),
('identity sample 24', ['bulk-edit', 'b', {'key': 'abc'}, 'org'], ['abc', 50988])],
[('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('leading-zero string kept verbatim', ['new-nav', 'a', {'key': 'u1', 'org': '007'}, 'org'], ['007', 42108]),
('leading-zero key kept verbatim', ['bulk-edit', 'b', {'key': '05'}, None], ['05', 9565]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 21', ['new-nav', 'a', {'key': 'u42', 'org': 12, 'team': False}, 'team'], [None, 0]),
('identity sample 34', ['bulk-edit', 'a', {'key': '007', 'org': ''}, 'org'], ['', 82099]),
('identity sample 55', ['new-nav', 'a', {'key': '05', 'org': 5.0}, 'team'], ['05', 69931])]]
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 |
|---|---|---|---|
| boolean attribute is unbucketable | [None, 0] | [None, 0] | Passed |
| integral float bucketed as integer | ['5', 7520] | ['5', 7520] | Passed |
| integral float matches integer identity | ['5', 7520] | ['5', 7520] | Passed |
| missing bucket attribute falls back to key | [None, 0] | ['u1', 4562] | Failed |
| zero attribute is a real identity | ['0', 47112] | ['0', 47112] | Passed |
| false attribute is unbucketable | [None, 0] | [None, 0] | Passed |
| identity sample 1 | ['5', 56729] | ['5', 56729] | Passed |
| identity sample 2 | ['05', 58693] | ['05', 58693] | Passed |
SHA-256 / fa35f1159e46744a3da8e59fe661ee01de98e9e3be3864add259b1ad0befe3d9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import zlib
N = 1
observations = []
def solve(flag_key, salt, user, bucket_by):
value = (user.get(bucket_by) if bucket_by else None) or user.get('key')
if isinstance(value, bool) or value is None:
return [None, 0]
if isinstance(value, float):
if value != int(value):
return [None, 0]
value = int(value)
if not isinstance(value, (int, str)):
return [None, 0]
ident = str(value)
return [ident, zlib.crc32((flag_key + '.' + salt + '.' + ident).encode()) % 100000]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('boolean attribute is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': True}, 'org'], [None, 0]),
('integral float bucketed as integer', ['new-nav', 'a', {'key': 'u1', 'org': 5.0}, 'org'], ['5', 7520]),
('integral float matches integer identity', ['new-nav', 'a', {'key': 'u1', 'org': 5}, 'org'], ['5', 7520]),
('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 1', ['new-nav', 'b', {'key': '05', 'org': '', 'team': 5.0}, 'team'], ['5', 56729]),
('identity sample 2', ['new-nav', 'b', {'key': 'u1', 'org': '05', 'team': [1]}, 'org'], ['05', 58693])],
[('integral float bucketed as integer', ['new-nav', 'a', {'key': 'u1', 'org': 5.0}, 'org'], ['5', 7520]),
('integral float matches integer identity', ['new-nav', 'a', {'key': 'u1', 'org': 5}, 'org'], ['5', 7520]),
('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 21', ['new-nav', 'a', {'key': 'u42', 'org': 12, 'team': False}, 'team'], [None, 0]),
('identity sample 48', ['new-nav', 'b', {'key': 'x0'}, 'team'], ['x0', 76711])],
[('integral float matches integer identity', ['new-nav', 'a', {'key': 'u1', 'org': 5}, 'org'], ['5', 7520]),
('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('leading-zero string kept verbatim', ['new-nav', 'a', {'key': 'u1', 'org': '007'}, 'org'], ['007', 42108]),
('identity sample 11', ['new-nav', 'a', {'key': 'u1', 'org': 12, 'team': 2.5}, None], ['u1', 4562]),
('identity sample 41', ['new-nav', 'b', {'key': '007', 'org': 0, 'team': [1]}, 'org'], ['0', 81622]),
('identity sample 42', ['new-nav', 'a', {'key': '05', 'team': False}, 'org'], ['05', 69931])],
[('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('leading-zero string kept verbatim', ['new-nav', 'a', {'key': 'u1', 'org': '007'}, 'org'], ['007', 42108]),
('leading-zero key kept verbatim', ['bulk-edit', 'b', {'key': '05'}, None], ['05', 9565]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 16', ['new-nav', 'b', {'key': 'u1', 'org': '0012', 'team': ''}, None], ['u1', 96668]),
('identity sample 24', ['bulk-edit', 'b', {'key': 'abc'}, 'org'], ['abc', 50988])],
[('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('leading-zero string kept verbatim', ['new-nav', 'a', {'key': 'u1', 'org': '007'}, 'org'], ['007', 42108]),
('leading-zero key kept verbatim', ['bulk-edit', 'b', {'key': '05'}, None], ['05', 9565]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 21', ['new-nav', 'a', {'key': 'u42', 'org': 12, 'team': False}, 'team'], [None, 0]),
('identity sample 34', ['bulk-edit', 'a', {'key': '007', 'org': ''}, 'org'], ['', 82099]),
('identity sample 55', ['new-nav', 'a', {'key': '05', 'org': 5.0}, 'team'], ['05', 69931])]]
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 |
|---|---|---|---|
| boolean attribute is unbucketable | [None, 0] | [None, 0] | Passed |
| integral float bucketed as integer | ['5', 7520] | ['5', 7520] | Passed |
| integral float matches integer identity | ['5', 7520] | ['5', 7520] | Passed |
| missing bucket attribute falls back to key | ['u1', 4562] | ['u1', 4562] | Passed |
| zero attribute is a real identity | ['u2', 33150] | ['0', 47112] | Failed |
| false attribute is unbucketable | ['u1', 14884] | [None, 0] | Failed |
| identity sample 1 | ['5', 56729] | ['5', 56729] | Passed |
| identity sample 2 | ['05', 58693] | ['05', 58693] | Passed |
SHA-256 / 50aba143ed4548511a8fc9b1c1e88d44d334efbf57e7ef49df3c3ac5b93111a1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import zlib
N = 1
observations = []
def solve(flag_key, salt, user, bucket_by):
if bucket_by and bucket_by in user:
value = user[bucket_by]
else:
value = user.get('key')
if isinstance(value, bool) or value is None:
return [None, 0]
if isinstance(value, float):
if value != int(value):
return [None, 0]
value = int(value)
if not isinstance(value, (int, str)):
return [None, 0]
ident = str(value)
return [ident, zlib.crc32((flag_key + '.' + salt + '.' + ident).encode()) % 100000]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('boolean attribute is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': True}, 'org'], [None, 0]),
('integral float bucketed as integer', ['new-nav', 'a', {'key': 'u1', 'org': 5.0}, 'org'], ['5', 7520]),
('integral float matches integer identity', ['new-nav', 'a', {'key': 'u1', 'org': 5}, 'org'], ['5', 7520]),
('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 1', ['new-nav', 'b', {'key': '05', 'org': '', 'team': 5.0}, 'team'], ['5', 56729]),
('identity sample 2', ['new-nav', 'b', {'key': 'u1', 'org': '05', 'team': [1]}, 'org'], ['05', 58693])],
[('integral float bucketed as integer', ['new-nav', 'a', {'key': 'u1', 'org': 5.0}, 'org'], ['5', 7520]),
('integral float matches integer identity', ['new-nav', 'a', {'key': 'u1', 'org': 5}, 'org'], ['5', 7520]),
('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 21', ['new-nav', 'a', {'key': 'u42', 'org': 12, 'team': False}, 'team'], [None, 0]),
('identity sample 48', ['new-nav', 'b', {'key': 'x0'}, 'team'], ['x0', 76711])],
[('integral float matches integer identity', ['new-nav', 'a', {'key': 'u1', 'org': 5}, 'org'], ['5', 7520]),
('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('leading-zero string kept verbatim', ['new-nav', 'a', {'key': 'u1', 'org': '007'}, 'org'], ['007', 42108]),
('identity sample 11', ['new-nav', 'a', {'key': 'u1', 'org': 12, 'team': 2.5}, None], ['u1', 4562]),
('identity sample 41', ['new-nav', 'b', {'key': '007', 'org': 0, 'team': [1]}, 'org'], ['0', 81622]),
('identity sample 42', ['new-nav', 'a', {'key': '05', 'team': False}, 'org'], ['05', 69931])],
[('missing bucket attribute falls back to key', ['new-nav', 'a', {'key': 'u1'}, 'org'], ['u1', 4562]),
('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('leading-zero string kept verbatim', ['new-nav', 'a', {'key': 'u1', 'org': '007'}, 'org'], ['007', 42108]),
('leading-zero key kept verbatim', ['bulk-edit', 'b', {'key': '05'}, None], ['05', 9565]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 16', ['new-nav', 'b', {'key': 'u1', 'org': '0012', 'team': ''}, None], ['u1', 96668]),
('identity sample 24', ['bulk-edit', 'b', {'key': 'abc'}, 'org'], ['abc', 50988])],
[('zero attribute is a real identity', ['bulk-edit', 'b', {'key': 'u2', 'org': 0}, 'org'], ['0', 47112]),
('fractional float is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': 2.5}, 'org'], [None, 0]),
('leading-zero string kept verbatim', ['new-nav', 'a', {'key': 'u1', 'org': '007'}, 'org'], ['007', 42108]),
('leading-zero key kept verbatim', ['bulk-edit', 'b', {'key': '05'}, None], ['05', 9565]),
('false attribute is unbucketable', ['bulk-edit', 'b', {'key': 'u1', 'org': False}, 'org'], [None, 0]),
('identity sample 21', ['new-nav', 'a', {'key': 'u42', 'org': 12, 'team': False}, 'team'], [None, 0]),
('identity sample 34', ['bulk-edit', 'a', {'key': '007', 'org': ''}, 'org'], ['', 82099]),
('identity sample 55', ['new-nav', 'a', {'key': '05', 'org': 5.0}, 'team'], ['05', 69931])]]
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 |
|---|---|---|---|
| boolean attribute is unbucketable | [None, 0] | [None, 0] | Passed |
| integral float bucketed as integer | ['5', 7520] | ['5', 7520] | Passed |
| integral float matches integer identity | ['5', 7520] | ['5', 7520] | Passed |
| missing bucket attribute falls back to key | ['u1', 4562] | ['u1', 4562] | Passed |
| zero attribute is a real identity | ['0', 47112] | ['0', 47112] | Passed |
| false attribute is unbucketable | [None, 0] | [None, 0] | Passed |
| identity sample 1 | ['5', 56729] | ['5', 56729] | Passed |
| identity sample 2 | ['05', 58693] | ['05', 58693] | Passed |
SHA-256 / 85187afae186a00883595695ed99d08316058ea76ec5b7d8dd2e746a3cb0378d
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:52.493467+00:00.
Case digest / 1260108842e36787c841c69f3f0f244c661df49635d907650042ae9534f1188a