FAILURE MAP
← Case archive

FA-73961 / Feature flag rollout bucketing / Open access

Bucketing attribute selection: Boolean attributes become bucketing identities · case 01

All users with org=True share one bucket named "True".

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Only None is rejected; bool values pass the int check because bool subclasses int.

THE FAILURE

Only None is rejected; bool values pass the int check because bool subclasses int.

Unsuccessful approach: Rejecting only False still turns True into a shared identity.

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):
    if bucket_by and bucket_by in user:
        value = user[bucket_by]
    else:
        value = user.get('key')
    if 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])],
 [('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 21', ['new-nav', 'a', {'key': 'u42', 'org': 12, 'team': False}, 'team'], [None, 0]),
  ('identity sample 46', ['new-nav', 'b', {'key': 'u42', 'org': '0', 'team': True}, 'team'], [None, 0])],
 [('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 12', ['new-nav', 'b', {'key': '007'}, None], ['007', 68652]),
  ('identity sample 54', ['new-nav', 'a', {'key': '05', 'org': True, 'team': [1]}, 'org'], [None, 0])],
 [('boolean attribute is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': True}, 'org'], [None, 0]),
  ('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])],
 [('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 22', ['bulk-edit', 'a', {'key': 'u1', 'org': ''}, None], ['u1', 93162]),
  ('identity sample 46', ['new-nav', 'b', {'key': 'u42', 'org': '0', 'team': True}, 'team'], [None, 0])]]
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 fixtureActualExpectedOutcome
boolean attribute is unbucketable['True', 98223][None, 0]Failed
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['False', 16085][None, 0]Failed
identity sample 1['5', 56729]['5', 56729]Passed
identity sample 2['05', 58693]['05', 58693]Passed

SHA-256 / 16c873843a7e2f1054e149a2ed5706b08bae777fc0a41623126764b58253a923

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):
    if bucket_by and bucket_by in user:
        value = user[bucket_by]
    else:
        value = user.get('key')
    if value is None or value is False:
        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])],
 [('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 21', ['new-nav', 'a', {'key': 'u42', 'org': 12, 'team': False}, 'team'], [None, 0]),
  ('identity sample 46', ['new-nav', 'b', {'key': 'u42', 'org': '0', 'team': True}, 'team'], [None, 0])],
 [('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 12', ['new-nav', 'b', {'key': '007'}, None], ['007', 68652]),
  ('identity sample 54', ['new-nav', 'a', {'key': '05', 'org': True, 'team': [1]}, 'org'], [None, 0])],
 [('boolean attribute is unbucketable', ['new-nav', 'a', {'key': 'u1', 'org': True}, 'org'], [None, 0]),
  ('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])],
 [('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 22', ['bulk-edit', 'a', {'key': 'u1', 'org': ''}, None], ['u1', 93162]),
  ('identity sample 46', ['new-nav', 'b', {'key': 'u42', 'org': '0', 'team': True}, 'team'], [None, 0])]]
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 fixtureActualExpectedOutcome
boolean attribute is unbucketable['True', 98223][None, 0]Failed
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 / d15332c06261a8689b16538e58a2b019fc73c6182f4a0d21566eac1ec71249d6

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:52.365034+00:00.

Case digest / 3f7c9f4e0991f6ca74d3b6812a35ae923273f3a31e4566ca0214f0bcb0927f70