{"abstract":"A 0.29 percent rollout admits only 28 basis points of buckets.","category":"Feature flag rollout bucketing","checks":8,"contract":"bucket = int(first 8 hex digits of sha1(salt + \".\" + flag + \".\" + user), 16) % 10000; the rollout percentage pct has at most two decimals and becomes a basis-point limit round(pct * 100); the user is enabled iff bucket < limit. Return [bucket, enabled].","contract_signature":"flag, user, salt, pct","evaluation_group":"w2-feature-flag-rollout-bucketing-percentage-gate","failed_approach":"Truncating pct before scaling discards the fractional percent entirely.","family":"w2-feature-flag-rollout-bucketing-percentage-gate-percent-truncation","id":"FA-73856","implementations":{"attempt":{"sha256":"1fd575ba96856fccc6a8a5dd3e4abdded591e890c894dd4222250d83befe597f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport hashlib\nN = 1\nobservations = []\ndef solve(flag, user, salt, pct):\n    limit = int(pct) * 100\n    digest = hashlib.sha1((salt + '.' + flag + '.' + user).encode()).hexdigest()\n    bucket = int(digest[:8], 16) % 10000\n    return [bucket, bucket < limit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('bucket exactly at limit is excluded (alice)', ['new-checkout', 'alice', 'prod', 66.65], [6665, False]),\n  ('bucket one below limit is included (alice)', ['new-checkout', 'alice', 'prod', 66.66], [6665, True]),\n  ('bucket exactly at limit is excluded (bob)', ['dark-mode', 'bob', 's1', 27.55], [2755, False]),\n  ('bucket one below limit is included (bob)', ['dark-mode', 'bob', 's1', 27.56], [2755, True]),\n  ('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('hashed user sample 1', ['search-v2', 'u55140', 's1', 100], [5052, True]),\n  ('hashed user sample 2', ['new-checkout', 'u28082', 's1', 50], [928, True])],\n [('bucket one below limit is included (alice)', ['new-checkout', 'alice', 'prod', 66.66], [6665, True]),\n  ('bucket exactly at limit is excluded (bob)', ['dark-mode', 'bob', 's1', 27.55], [2755, False]),\n  ('bucket one below limit is included (bob)', ['dark-mode', 'bob', 's1', 27.56], [2755, True]),\n  ('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('bucket one below limit is included (carol)', ['search-v2', 'carol', 'prod', 57.46], [5745, True]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('hashed user sample 13', ['new-checkout', 'u70823', 'ramp-7', 31.8], [3179, True]),\n  ('hashed user sample 32', ['fast-pay', 'u26409', 's1', 39.73], [3972, True])],\n [('bucket exactly at limit is excluded (bob)', ['dark-mode', 'bob', 's1', 27.55], [2755, False]),\n  ('bucket one below limit is included (bob)', ['dark-mode', 'bob', 's1', 27.56], [2755, True]),\n  ('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('bucket one below limit is included (carol)', ['search-v2', 'carol', 'prod', 57.46], [5745, True]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('hashed user sample 11', ['search-v2', 'u91686', 'prod', 100], [5233, True]),\n  ('hashed user sample 40', ['fast-pay', 'u536', 'prod', 9.61], [960, True]),\n  ('hashed user sample 47', ['dark-mode', 'u58180', 's1', 70.46], [7045, True])],\n [('bucket one below limit is included (bob)', ['dark-mode', 'bob', 's1', 27.56], [2755, True]),\n  ('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('bucket one below limit is included (carol)', ['search-v2', 'carol', 'prod', 57.46], [5745, True]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('zero percent disables everyone', ['dark-mode', 'dave', 's1', 0], [4167, False]),\n  ('hashed user sample 16', ['new-checkout', 'u25854', 'prod', 0.57], [5842, False]),\n  ('hashed user sample 17', ['search-v2', 'u90753', 'prod', 0], [9423, False]),\n  ('hashed user sample 51', ['new-checkout', 'u15929', 'ramp-7', 98.17], [9816, True])],\n [('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('bucket one below limit is included (carol)', ['search-v2', 'carol', 'prod', 57.46], [5745, True]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('zero percent disables everyone', ['dark-mode', 'dave', 's1', 0], [4167, False]),\n  ('full rollout enables everyone', ['dark-mode', 'erin', 's1', 100], [9606, True]),\n  ('hashed user sample 21', ['new-checkout', 'u7954', 'prod', 59.72], [196, True]),\n  ('hashed user sample 22', ['new-checkout', 'u52965', 'ramp-7', 70.89], [7088, True]),\n  ('hashed user sample 32', ['fast-pay', 'u26409', 's1', 39.73], [3972, True])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"1fd6131c0f4c232ec5311daaaf61adccfef5e5bb1effa97e9fccf2f05a467189","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport hashlib\nN = 1\nobservations = []\ndef solve(flag, user, salt, pct):\n    limit = int(pct * 100)\n    digest = hashlib.sha1((salt + '.' + flag + '.' + user).encode()).hexdigest()\n    bucket = int(digest[:8], 16) % 10000\n    return [bucket, bucket < limit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('bucket exactly at limit is excluded (alice)', ['new-checkout', 'alice', 'prod', 66.65], [6665, False]),\n  ('bucket one below limit is included (alice)', ['new-checkout', 'alice', 'prod', 66.66], [6665, True]),\n  ('bucket exactly at limit is excluded (bob)', ['dark-mode', 'bob', 's1', 27.55], [2755, False]),\n  ('bucket one below limit is included (bob)', ['dark-mode', 'bob', 's1', 27.56], [2755, True]),\n  ('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('hashed user sample 1', ['search-v2', 'u55140', 's1', 100], [5052, True]),\n  ('hashed user sample 2', ['new-checkout', 'u28082', 's1', 50], [928, True])],\n [('bucket one below limit is included (alice)', ['new-checkout', 'alice', 'prod', 66.66], [6665, True]),\n  ('bucket exactly at limit is excluded (bob)', ['dark-mode', 'bob', 's1', 27.55], [2755, False]),\n  ('bucket one below limit is included (bob)', ['dark-mode', 'bob', 's1', 27.56], [2755, True]),\n  ('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('bucket one below limit is included (carol)', ['search-v2', 'carol', 'prod', 57.46], [5745, True]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('hashed user sample 13', ['new-checkout', 'u70823', 'ramp-7', 31.8], [3179, True]),\n  ('hashed user sample 32', ['fast-pay', 'u26409', 's1', 39.73], [3972, True])],\n [('bucket exactly at limit is excluded (bob)', ['dark-mode', 'bob', 's1', 27.55], [2755, False]),\n  ('bucket one below limit is included (bob)', ['dark-mode', 'bob', 's1', 27.56], [2755, True]),\n  ('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('bucket one below limit is included (carol)', ['search-v2', 'carol', 'prod', 57.46], [5745, True]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('hashed user sample 11', ['search-v2', 'u91686', 'prod', 100], [5233, True]),\n  ('hashed user sample 40', ['fast-pay', 'u536', 'prod', 9.61], [960, True]),\n  ('hashed user sample 47', ['dark-mode', 'u58180', 's1', 70.46], [7045, True])],\n [('bucket one below limit is included (bob)', ['dark-mode', 'bob', 's1', 27.56], [2755, True]),\n  ('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('bucket one below limit is included (carol)', ['search-v2', 'carol', 'prod', 57.46], [5745, True]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('zero percent disables everyone', ['dark-mode', 'dave', 's1', 0], [4167, False]),\n  ('hashed user sample 16', ['new-checkout', 'u25854', 'prod', 0.57], [5842, False]),\n  ('hashed user sample 17', ['search-v2', 'u90753', 'prod', 0], [9423, False]),\n  ('hashed user sample 51', ['new-checkout', 'u15929', 'ramp-7', 98.17], [9816, True])],\n [('bucket exactly at limit is excluded (carol)', ['search-v2', 'carol', 'prod', 57.45], [5745, False]),\n  ('bucket one below limit is included (carol)', ['search-v2', 'carol', 'prod', 57.46], [5745, True]),\n  ('float truncation regression at 65.82 percent', ['fast-pay', 'member13', 'prod', 65.82], [6581, True]),\n  ('zero percent disables everyone', ['dark-mode', 'dave', 's1', 0], [4167, False]),\n  ('full rollout enables everyone', ['dark-mode', 'erin', 's1', 100], [9606, True]),\n  ('hashed user sample 21', ['new-checkout', 'u7954', 'prod', 59.72], [196, True]),\n  ('hashed user sample 22', ['new-checkout', 'u52965', 'ramp-7', 70.89], [7088, True]),\n  ('hashed user sample 32', ['fast-pay', 'u26409', 's1', 39.73], [3972, True])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-feature-flag-rollout-bucketing-percentage-gate-percent-truncation","generated_at":"2026-09-29T14:48:51.335593+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Percentage gates must be reproducible across services so the same user sees the same state everywhere.","root_cause":"The limit is int(pct * 100), which truncates binary floating-point results such as 28.999999999999996.","sha256":"f2a966efb600c07bc9d283ecffc1897d7d349e6797da39e90dab1bcba9be090d","title":"Percentage rollout gate: Float truncation shrinks fractional rollout limits · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.259,"exit_code":1,"observations":[{"actual":[6665,false],"check":"bucket exactly at limit is excluded (alice)","expected":[6665,false],"passed":true},{"actual":[6665,false],"check":"bucket one below limit is included (alice)","expected":[6665,true],"passed":false},{"actual":[2755,false],"check":"bucket exactly at limit is excluded (bob)","expected":[2755,false],"passed":true},{"actual":[2755,false],"check":"bucket one below limit is included (bob)","expected":[2755,true],"passed":false},{"actual":[5745,false],"check":"bucket exactly at limit is excluded (carol)","expected":[5745,false],"passed":true},{"actual":[6581,false],"check":"float truncation regression at 65.82 percent","expected":[6581,true],"passed":false},{"actual":[5052,true],"check":"hashed user sample 1","expected":[5052,true],"passed":true},{"actual":[928,true],"check":"hashed user sample 2","expected":[928,true],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"bucket exactly at limit is excluded (alice)\", \"actual\": [6665, false], \"expected\": [6665, false], \"passed\": true}, {\"check\": \"bucket one below limit is included (alice)\", \"actual\": [6665, false], \"expected\": [6665, true], \"passed\": false}, {\"check\": \"bucket exactly at limit is excluded (bob)\", \"actual\": [2755, false], \"expected\": [2755, false], \"passed\": true}, {\"check\": \"bucket one below limit is included (bob)\", \"actual\": [2755, false], \"expected\": [2755, true], \"passed\": false}, {\"check\": \"bucket exactly at limit is excluded (carol)\", \"actual\": [5745, false], \"expected\": [5745, false], \"passed\": true}, {\"check\": \"float truncation regression at 65.82 percent\", \"actual\": [6581, false], \"expected\": [6581, true], \"passed\": false}, {\"check\": \"hashed user sample 1\", \"actual\": [5052, true], \"expected\": [5052, true], \"passed\": true}, {\"check\": \"hashed user sample 2\", \"actual\": [928, true], \"expected\": [928, true], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.205,"exit_code":1,"observations":[{"actual":[6665,false],"check":"bucket exactly at limit is excluded (alice)","expected":[6665,false],"passed":true},{"actual":[6665,true],"check":"bucket one below limit is included (alice)","expected":[6665,true],"passed":true},{"actual":[2755,false],"check":"bucket exactly at limit is excluded (bob)","expected":[2755,false],"passed":true},{"actual":[2755,true],"check":"bucket one below limit is included (bob)","expected":[2755,true],"passed":true},{"actual":[5745,false],"check":"bucket exactly at limit is excluded (carol)","expected":[5745,false],"passed":true},{"actual":[6581,false],"check":"float truncation regression at 65.82 percent","expected":[6581,true],"passed":false},{"actual":[5052,true],"check":"hashed user sample 1","expected":[5052,true],"passed":true},{"actual":[928,true],"check":"hashed user sample 2","expected":[928,true],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"bucket exactly at limit is excluded (alice)\", \"actual\": [6665, false], \"expected\": [6665, false], \"passed\": true}, {\"check\": \"bucket one below limit is included (alice)\", \"actual\": [6665, true], \"expected\": [6665, true], \"passed\": true}, {\"check\": \"bucket exactly at limit is excluded (bob)\", \"actual\": [2755, false], \"expected\": [2755, false], \"passed\": true}, {\"check\": \"bucket one below limit is included (bob)\", \"actual\": [2755, true], \"expected\": [2755, true], \"passed\": true}, {\"check\": \"bucket exactly at limit is excluded (carol)\", \"actual\": [5745, false], \"expected\": [5745, false], \"passed\": true}, {\"check\": \"float truncation regression at 65.82 percent\", \"actual\": [6581, false], \"expected\": [6581, true], \"passed\": false}, {\"check\": \"hashed user sample 1\", \"actual\": [5052, true], \"expected\": [5052, true], \"passed\": true}, {\"check\": \"hashed user sample 2\", \"actual\": [928, true], \"expected\": [928, true], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}