{"abstract":"A 10 percent experiment enrols 11 percent of users.","category":"Feature flag rollout bucketing","checks":8,"contract":"Stage 1: t = crc32(salt + \":traffic:\" + user) % 100; users with t >= traffic (1..100) are not in the experiment. Stage 2 uses an independent v = crc32(salt + \":variant:\" + user) % 100 and walks weights ([arm, percent of allocated users], summing to 100) cumulatively, half-open. Return [in_experiment, arm or None].","contract_signature":"salt, user, traffic, weights","evaluation_group":"w2-feature-flag-rollout-bucketing-two-stage-allocation","failed_approach":"Excluding from traffic - 1 drops the last legitimate traffic bucket.","family":"w2-feature-flag-rollout-bucketing-two-stage-allocation-traffic-boundary","id":"FA-74281","implementations":{"attempt":{"sha256":"d1f607c64635841e0ffb7c2910f9ecdf84126331e699dfb5a03f203f8838af62","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport zlib\nN = 1\nobservations = []\ndef solve(salt, user, traffic, weights):\n    t = zlib.crc32((salt + ':traffic:' + user).encode()) % 100\n    if t >= traffic - 1:\n        return [False, None]\n    v = zlib.crc32((salt + ':variant:' + user).encode()) % 100\n    acc = 0\n    for arm, w in weights:\n        acc += w\n        if v < acc:\n            return [True, arm]\n    return [True, weights[-1][0]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('low traffic still fills every arm',\n   ['exp1', 'm0', 20, [['control', 50], ['treatment', 50]]],\n   [True, 'treatment']),\n  ('low traffic second user', ['exp1', 'm5', 20, [['control', 50], ['treatment', 50]]], [True, 'treatment']),\n  ('arm weights are relative to allocated users',\n   ['exp1', 'm8', 20, [['control', 20], ['treatment', 80]]],\n   [True, 'control']),\n  ('traffic boundary excludes t equal to traffic', ['exp1', 'm0', 14, [['a', 50], ['b', 50]]], [False, None]),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('allocation sample 1', ['exp2', 'u3390', 9, [['control', 20], ['treatment', 80]]], [False, None]),\n  ('allocation sample 2', ['exp2', 'u2292', 50, [['control', 20], ['treatment', 80]]], [False, None]),\n  ('allocation sample 3', ['exp2', 'u2623', 67, [['control', 20], ['treatment', 80]]], [True, 'control'])],\n [('low traffic second user', ['exp1', 'm5', 20, [['control', 50], ['treatment', 50]]], [True, 'treatment']),\n  ('arm weights are relative to allocated users',\n   ['exp1', 'm8', 20, [['control', 20], ['treatment', 80]]],\n   [True, 'control']),\n  ('traffic boundary excludes t equal to traffic', ['exp1', 'm0', 14, [['a', 50], ['b', 50]]], [False, None]),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('full traffic control', ['exp2', 'n1', 100, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 6', ['exp1', 'u2423', 50, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 22', ['exp2', 'u568', 88, [['control', 20], ['treatment', 80]]], [True, 'treatment']),\n  ('allocation sample 49', ['exp1', 'u586', 13, [['control', 50], ['treatment', 50]]], [False, None])],\n [('low traffic still fills every arm',\n   ['exp1', 'm0', 20, [['control', 50], ['treatment', 50]]],\n   [True, 'treatment']),\n  ('arm weights are relative to allocated users',\n   ['exp1', 'm8', 20, [['control', 20], ['treatment', 80]]],\n   [True, 'control']),\n  ('traffic boundary excludes t equal to traffic', ['exp1', 'm0', 14, [['a', 50], ['b', 50]]], [False, None]),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('full traffic control', ['exp2', 'n1', 100, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 9', ['exp1', 'u3147', 77, [['a', 34], ['b', 33], ['c', 33]]], [True, 'a']),\n  ('allocation sample 11', ['exp1', 'u2908', 30, [['a', 34], ['b', 33], ['c', 33]]], [False, None]),\n  ('allocation sample 39', ['exp2', 'u1649', 12, [['control', 50], ['treatment', 50]]], [False, None])],\n [('low traffic still fills every arm',\n   ['exp1', 'm0', 20, [['control', 50], ['treatment', 50]]],\n   [True, 'treatment']),\n  ('low traffic second user', ['exp1', 'm5', 20, [['control', 50], ['treatment', 50]]], [True, 'treatment']),\n  ('traffic boundary excludes t equal to traffic', ['exp1', 'm0', 14, [['a', 50], ['b', 50]]], [False, None]),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('full traffic control', ['exp2', 'n1', 100, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 16', ['exp2', 'u2262', 53, [['control', 20], ['treatment', 80]]], [True, 'treatment']),\n  ('allocation sample 38', ['exp1', 'u1107', 59, [['control', 50], ['treatment', 50]]], [False, None]),\n  ('allocation sample 44', ['exp2', 'u1337', 52, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b'])],\n [('low traffic still fills every arm',\n   ['exp1', 'm0', 20, [['control', 50], ['treatment', 50]]],\n   [True, 'treatment']),\n  ('low traffic second user', ['exp1', 'm5', 20, [['control', 50], ['treatment', 50]]], [True, 'treatment']),\n  ('arm weights are relative to allocated users',\n   ['exp1', 'm8', 20, [['control', 20], ['treatment', 80]]],\n   [True, 'control']),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('full traffic control', ['exp2', 'n1', 100, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 18', ['exp1', 'u1356', 18, [['control', 50], ['treatment', 50]]], [False, None]),\n  ('allocation sample 20', ['exp1', 'u1715', 57, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 21', ['exp1', 'u843', 100, [['control', 20], ['treatment', 80]]], [True, 'treatment'])]]\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":"a6ac77d5e235374daf22c6ecd3eebd5a67271e2e7f31556183a0dcec60e82ace","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport zlib\nN = 1\nobservations = []\ndef solve(salt, user, traffic, weights):\n    t = zlib.crc32((salt + ':traffic:' + user).encode()) % 100\n    if t > traffic:\n        return [False, None]\n    v = zlib.crc32((salt + ':variant:' + user).encode()) % 100\n    acc = 0\n    for arm, w in weights:\n        acc += w\n        if v < acc:\n            return [True, arm]\n    return [True, weights[-1][0]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('low traffic still fills every arm',\n   ['exp1', 'm0', 20, [['control', 50], ['treatment', 50]]],\n   [True, 'treatment']),\n  ('low traffic second user', ['exp1', 'm5', 20, [['control', 50], ['treatment', 50]]], [True, 'treatment']),\n  ('arm weights are relative to allocated users',\n   ['exp1', 'm8', 20, [['control', 20], ['treatment', 80]]],\n   [True, 'control']),\n  ('traffic boundary excludes t equal to traffic', ['exp1', 'm0', 14, [['a', 50], ['b', 50]]], [False, None]),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('allocation sample 1', ['exp2', 'u3390', 9, [['control', 20], ['treatment', 80]]], [False, None]),\n  ('allocation sample 2', ['exp2', 'u2292', 50, [['control', 20], ['treatment', 80]]], [False, None]),\n  ('allocation sample 3', ['exp2', 'u2623', 67, [['control', 20], ['treatment', 80]]], [True, 'control'])],\n [('low traffic second user', ['exp1', 'm5', 20, [['control', 50], ['treatment', 50]]], [True, 'treatment']),\n  ('arm weights are relative to allocated users',\n   ['exp1', 'm8', 20, [['control', 20], ['treatment', 80]]],\n   [True, 'control']),\n  ('traffic boundary excludes t equal to traffic', ['exp1', 'm0', 14, [['a', 50], ['b', 50]]], [False, None]),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('full traffic control', ['exp2', 'n1', 100, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 6', ['exp1', 'u2423', 50, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 22', ['exp2', 'u568', 88, [['control', 20], ['treatment', 80]]], [True, 'treatment']),\n  ('allocation sample 49', ['exp1', 'u586', 13, [['control', 50], ['treatment', 50]]], [False, None])],\n [('low traffic still fills every arm',\n   ['exp1', 'm0', 20, [['control', 50], ['treatment', 50]]],\n   [True, 'treatment']),\n  ('arm weights are relative to allocated users',\n   ['exp1', 'm8', 20, [['control', 20], ['treatment', 80]]],\n   [True, 'control']),\n  ('traffic boundary excludes t equal to traffic', ['exp1', 'm0', 14, [['a', 50], ['b', 50]]], [False, None]),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('full traffic control', ['exp2', 'n1', 100, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 9', ['exp1', 'u3147', 77, [['a', 34], ['b', 33], ['c', 33]]], [True, 'a']),\n  ('allocation sample 11', ['exp1', 'u2908', 30, [['a', 34], ['b', 33], ['c', 33]]], [False, None]),\n  ('allocation sample 39', ['exp2', 'u1649', 12, [['control', 50], ['treatment', 50]]], [False, None])],\n [('low traffic still fills every arm',\n   ['exp1', 'm0', 20, [['control', 50], ['treatment', 50]]],\n   [True, 'treatment']),\n  ('low traffic second user', ['exp1', 'm5', 20, [['control', 50], ['treatment', 50]]], [True, 'treatment']),\n  ('traffic boundary excludes t equal to traffic', ['exp1', 'm0', 14, [['a', 50], ['b', 50]]], [False, None]),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('full traffic control', ['exp2', 'n1', 100, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 16', ['exp2', 'u2262', 53, [['control', 20], ['treatment', 80]]], [True, 'treatment']),\n  ('allocation sample 38', ['exp1', 'u1107', 59, [['control', 50], ['treatment', 50]]], [False, None]),\n  ('allocation sample 44', ['exp2', 'u1337', 52, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b'])],\n [('low traffic still fills every arm',\n   ['exp1', 'm0', 20, [['control', 50], ['treatment', 50]]],\n   [True, 'treatment']),\n  ('low traffic second user', ['exp1', 'm5', 20, [['control', 50], ['treatment', 50]]], [True, 'treatment']),\n  ('arm weights are relative to allocated users',\n   ['exp1', 'm8', 20, [['control', 20], ['treatment', 80]]],\n   [True, 'control']),\n  ('traffic boundary includes t just below', ['exp1', 'm5', 6, [['a', 50], ['b', 50]]], [True, 'b']),\n  ('full traffic control', ['exp2', 'n1', 100, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 18', ['exp1', 'u1356', 18, [['control', 50], ['treatment', 50]]], [False, None]),\n  ('allocation sample 20', ['exp1', 'u1715', 57, [['a', 34], ['b', 33], ['c', 33]]], [True, 'b']),\n  ('allocation sample 21', ['exp1', 'u843', 100, [['control', 20], ['treatment', 80]]], [True, 'treatment'])]]\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-two-stage-allocation-traffic-boundary","generated_at":"2026-09-29T14:48:55.185813+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Separating traffic allocation from the variant split keeps arms balanced when traffic changes.","root_cause":"Users are excluded only when t > traffic.","sha256":"64f22a63b518618da1af1fab8a8cd6cb0fa3e7a6be884d954c7761b69a03a3bd","title":"Traffic then variant allocation: Traffic allocation admits one extra bucket · 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":38.901,"exit_code":1,"observations":[{"actual":[true,"treatment"],"check":"low traffic still fills every arm","expected":[true,"treatment"],"passed":true},{"actual":[true,"treatment"],"check":"low traffic second user","expected":[true,"treatment"],"passed":true},{"actual":[true,"control"],"check":"arm weights are relative to allocated users","expected":[true,"control"],"passed":true},{"actual":[false,null],"check":"traffic boundary excludes t equal to traffic","expected":[false,null],"passed":true},{"actual":[false,null],"check":"traffic boundary includes t just below","expected":[true,"b"],"passed":false},{"actual":[false,null],"check":"allocation sample 1","expected":[false,null],"passed":true},{"actual":[false,null],"check":"allocation sample 2","expected":[false,null],"passed":true},{"actual":[false,null],"check":"allocation sample 3","expected":[true,"control"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"low traffic still fills every arm\", \"actual\": [true, \"treatment\"], \"expected\": [true, \"treatment\"], \"passed\": true}, {\"check\": \"low traffic second user\", \"actual\": [true, \"treatment\"], \"expected\": [true, \"treatment\"], \"passed\": true}, {\"check\": \"arm weights are relative to allocated users\", \"actual\": [true, \"control\"], \"expected\": [true, \"control\"], \"passed\": true}, {\"check\": \"traffic boundary excludes t equal to traffic\", \"actual\": [false, null], \"expected\": [false, null], \"passed\": true}, {\"check\": \"traffic boundary includes t just below\", \"actual\": [false, null], \"expected\": [true, \"b\"], \"passed\": false}, {\"check\": \"allocation sample 1\", \"actual\": [false, null], \"expected\": [false, null], \"passed\": true}, {\"check\": \"allocation sample 2\", \"actual\": [false, null], \"expected\": [false, null], \"passed\": true}, {\"check\": \"allocation sample 3\", \"actual\": [false, null], \"expected\": [true, \"control\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.323,"exit_code":1,"observations":[{"actual":[true,"treatment"],"check":"low traffic still fills every arm","expected":[true,"treatment"],"passed":true},{"actual":[true,"treatment"],"check":"low traffic second user","expected":[true,"treatment"],"passed":true},{"actual":[true,"control"],"check":"arm weights are relative to allocated users","expected":[true,"control"],"passed":true},{"actual":[true,"b"],"check":"traffic boundary excludes t equal to traffic","expected":[false,null],"passed":false},{"actual":[true,"b"],"check":"traffic boundary includes t just below","expected":[true,"b"],"passed":true},{"actual":[true,"control"],"check":"allocation sample 1","expected":[false,null],"passed":false},{"actual":[false,null],"check":"allocation sample 2","expected":[false,null],"passed":true},{"actual":[true,"control"],"check":"allocation sample 3","expected":[true,"control"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"low traffic still fills every arm\", \"actual\": [true, \"treatment\"], \"expected\": [true, \"treatment\"], \"passed\": true}, {\"check\": \"low traffic second user\", \"actual\": [true, \"treatment\"], \"expected\": [true, \"treatment\"], \"passed\": true}, {\"check\": \"arm weights are relative to allocated users\", \"actual\": [true, \"control\"], \"expected\": [true, \"control\"], \"passed\": true}, {\"check\": \"traffic boundary excludes t equal to traffic\", \"actual\": [true, \"b\"], \"expected\": [false, null], \"passed\": false}, {\"check\": \"traffic boundary includes t just below\", \"actual\": [true, \"b\"], \"expected\": [true, \"b\"], \"passed\": true}, {\"check\": \"allocation sample 1\", \"actual\": [true, \"control\"], \"expected\": [false, null], \"passed\": false}, {\"check\": \"allocation sample 2\", \"actual\": [false, null], \"expected\": [false, null], \"passed\": true}, {\"check\": \"allocation sample 3\", \"actual\": [true, \"control\"], \"expected\": [true, \"control\"], \"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."}}