{"abstract":"Flags configured with seed 0 bucket by flag key and salt, breaking the shared cohort.","category":"Feature flag rollout bucketing","checks":8,"contract":"Hash text is (str(seed) if seed is not None else flag_key + \".\" + salt) + \".\" + ident, plus \".\" + secondary when secondary is not None (an empty string still counts). bucket = int(first 15 hex digits of sha1(text), 16) / 0xFFFFFFFFFFFFFFF. weights are in 1/100000 units; return the first index whose cumulative weight / 100000 exceeds the bucket, else the last index, as [index, round(bucket, 6)].","contract_signature":"flag_key, salt, ident, secondary, seed, weights","evaluation_group":"w2-feature-flag-rollout-bucketing-seeded-rollout","failed_approach":"Combining seed and flag key defeats the purpose of sharing a seed across flags.","family":"w2-feature-flag-rollout-bucketing-seeded-rollout-zero-seed","id":"FA-74306","implementations":{"attempt":{"sha256":"e615a3781d0c875e92c3f7b6669ce0a12a80684f8d811c427ada24afcac4cadc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport hashlib\nN = 1\nobservations = []\ndef solve(flag_key, salt, ident, secondary, seed, weights):\n    prefix = str(seed) + '.' + flag_key if seed is not None else flag_key + '.' + salt\n    text = prefix + '.' + ident\n    if secondary is not None:\n        text += '.' + secondary\n    bucket = int(hashlib.sha1(text.encode()).hexdigest()[:15], 16) / float(0xFFFFFFFFFFFFFFF)\n    acc = 0\n    for index, w in enumerate(weights):\n        acc += w\n        if bucket < acc / 100000.0:\n            return [index, round(bucket, 6)]\n    return [len(weights) - 1, round(bucket, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('seed replaces flag key and salt', ['flag-b', 's', 'id2', None, 7, [30000, 70000]], [1, 0.855827]),\n  ('empty secondary is still appended', ['flag-a', 's', 'id3', '', None, [50000, 50000]], [1, 0.891663]),\n  ('non-empty secondary', ['flag-a', 's', 'id4', 'eu', None, [10000, 90000]], [1, 0.975219]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('rollout sample 1', ['flag-b', 'salt2', 'id120', '', 0, [0, 60000, 40000]], [2, 0.88242]),\n  ('rollout sample 2', ['flag-b', 's', 'id212', 'x', 61, [25000, 25000, 25000]], [1, 0.37423]),\n  ('rollout sample 3', ['flag-b', 'salt2', 'id106', None, 7, [50000, 50000]], [0, 0.322784])],\n [('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('seed replaces flag key and salt', ['flag-b', 's', 'id2', None, 7, [30000, 70000]], [1, 0.855827]),\n  ('empty secondary is still appended', ['flag-a', 's', 'id3', '', None, [50000, 50000]], [1, 0.891663]),\n  ('non-empty secondary', ['flag-a', 's', 'id4', 'eu', None, [10000, 90000]], [1, 0.975219]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('zero-weight first variation', ['flag-b', 's', 'id6', None, None, [0, 100000]], [1, 0.255084]),\n  ('rollout sample 6', ['flag-b', 'salt2', 'id765', None, 7, [10000, 20000, 70000]], [2, 0.464498]),\n  ('rollout sample 19', ['flag-b', 's', 'id433', 'x', 0, [0, 60000, 40000]], [1, 0.110676])],\n [('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('empty secondary is still appended', ['flag-a', 's', 'id3', '', None, [50000, 50000]], [1, 0.891663]),\n  ('non-empty secondary', ['flag-a', 's', 'id4', 'eu', None, [10000, 90000]], [1, 0.975219]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('zero-weight first variation', ['flag-b', 's', 'id6', None, None, [0, 100000]], [1, 0.255084]),\n  ('rollout sample 11', ['flag-a', 'salt2', 'id773', '', 7, [0, 60000, 40000]], [1, 0.477906]),\n  ('rollout sample 15', ['flag-a', 's', 'id518', None, 0, [25000, 25000, 25000]], [1, 0.304053]),\n  ('rollout sample 48', ['flag-b', 's', 'id25', '', 0, [0, 60000, 40000]], [2, 0.8777])],\n [('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('seed replaces flag key and salt', ['flag-b', 's', 'id2', None, 7, [30000, 70000]], [1, 0.855827]),\n  ('non-empty secondary', ['flag-a', 's', 'id4', 'eu', None, [10000, 90000]], [1, 0.975219]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('zero-weight first variation', ['flag-b', 's', 'id6', None, None, [0, 100000]], [1, 0.255084]),\n  ('rollout sample 8', ['flag-b', 's', 'id129', None, 0, [25000, 25000, 25000]], [0, 0.124835]),\n  ('rollout sample 16', ['flag-b', 'salt2', 'id229', 'eu', 61, [10000, 20000, 70000]], [2, 0.315757]),\n  ('rollout sample 27', ['flag-a', 'salt2', 'id732', '', 61, [50000, 50000]], [1, 0.80431])],\n [('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('seed replaces flag key and salt', ['flag-b', 's', 'id2', None, 7, [30000, 70000]], [1, 0.855827]),\n  ('empty secondary is still appended', ['flag-a', 's', 'id3', '', None, [50000, 50000]], [1, 0.891663]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('zero-weight first variation', ['flag-b', 's', 'id6', None, None, [0, 100000]], [1, 0.255084]),\n  ('rollout sample 21', ['flag-a', 'salt2', 'id352', '', None, [99999]], [0, 0.94531]),\n  ('rollout sample 30', ['flag-b', 'salt2', 'id599', 'eu', 0, [30000, 30000]], [1, 0.450018]),\n  ('rollout sample 40', ['flag-b', 'salt2', 'id862', 'x', 61, [10000, 20000, 70000]], [2, 0.319084])]]\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":"466c122410545f7ef8f2b39918b9a10ebe5722e221373eda0770f5a787c2efe6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport hashlib\nN = 1\nobservations = []\ndef solve(flag_key, salt, ident, secondary, seed, weights):\n    prefix = str(seed) if seed else flag_key + '.' + salt\n    text = prefix + '.' + ident\n    if secondary is not None:\n        text += '.' + secondary\n    bucket = int(hashlib.sha1(text.encode()).hexdigest()[:15], 16) / float(0xFFFFFFFFFFFFFFF)\n    acc = 0\n    for index, w in enumerate(weights):\n        acc += w\n        if bucket < acc / 100000.0:\n            return [index, round(bucket, 6)]\n    return [len(weights) - 1, round(bucket, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('seed replaces flag key and salt', ['flag-b', 's', 'id2', None, 7, [30000, 70000]], [1, 0.855827]),\n  ('empty secondary is still appended', ['flag-a', 's', 'id3', '', None, [50000, 50000]], [1, 0.891663]),\n  ('non-empty secondary', ['flag-a', 's', 'id4', 'eu', None, [10000, 90000]], [1, 0.975219]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('rollout sample 1', ['flag-b', 'salt2', 'id120', '', 0, [0, 60000, 40000]], [2, 0.88242]),\n  ('rollout sample 2', ['flag-b', 's', 'id212', 'x', 61, [25000, 25000, 25000]], [1, 0.37423]),\n  ('rollout sample 3', ['flag-b', 'salt2', 'id106', None, 7, [50000, 50000]], [0, 0.322784])],\n [('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('seed replaces flag key and salt', ['flag-b', 's', 'id2', None, 7, [30000, 70000]], [1, 0.855827]),\n  ('empty secondary is still appended', ['flag-a', 's', 'id3', '', None, [50000, 50000]], [1, 0.891663]),\n  ('non-empty secondary', ['flag-a', 's', 'id4', 'eu', None, [10000, 90000]], [1, 0.975219]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('zero-weight first variation', ['flag-b', 's', 'id6', None, None, [0, 100000]], [1, 0.255084]),\n  ('rollout sample 6', ['flag-b', 'salt2', 'id765', None, 7, [10000, 20000, 70000]], [2, 0.464498]),\n  ('rollout sample 19', ['flag-b', 's', 'id433', 'x', 0, [0, 60000, 40000]], [1, 0.110676])],\n [('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('empty secondary is still appended', ['flag-a', 's', 'id3', '', None, [50000, 50000]], [1, 0.891663]),\n  ('non-empty secondary', ['flag-a', 's', 'id4', 'eu', None, [10000, 90000]], [1, 0.975219]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('zero-weight first variation', ['flag-b', 's', 'id6', None, None, [0, 100000]], [1, 0.255084]),\n  ('rollout sample 11', ['flag-a', 'salt2', 'id773', '', 7, [0, 60000, 40000]], [1, 0.477906]),\n  ('rollout sample 15', ['flag-a', 's', 'id518', None, 0, [25000, 25000, 25000]], [1, 0.304053]),\n  ('rollout sample 48', ['flag-b', 's', 'id25', '', 0, [0, 60000, 40000]], [2, 0.8777])],\n [('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('seed replaces flag key and salt', ['flag-b', 's', 'id2', None, 7, [30000, 70000]], [1, 0.855827]),\n  ('non-empty secondary', ['flag-a', 's', 'id4', 'eu', None, [10000, 90000]], [1, 0.975219]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('zero-weight first variation', ['flag-b', 's', 'id6', None, None, [0, 100000]], [1, 0.255084]),\n  ('rollout sample 8', ['flag-b', 's', 'id129', None, 0, [25000, 25000, 25000]], [0, 0.124835]),\n  ('rollout sample 16', ['flag-b', 'salt2', 'id229', 'eu', 61, [10000, 20000, 70000]], [2, 0.315757]),\n  ('rollout sample 27', ['flag-a', 'salt2', 'id732', '', 61, [50000, 50000]], [1, 0.80431])],\n [('seed zero is a real seed', ['flag-a', 's', 'id1', None, 0, [50000, 50000]], [0, 0.331393]),\n  ('seed replaces flag key and salt', ['flag-b', 's', 'id2', None, 7, [30000, 70000]], [1, 0.855827]),\n  ('empty secondary is still appended', ['flag-a', 's', 'id3', '', None, [50000, 50000]], [1, 0.891663]),\n  ('weights short of total go to last index',\n   ['flag-b', 'salt2', 'id5', None, None, [10000, 10000]],\n   [1, 0.233147]),\n  ('zero-weight first variation', ['flag-b', 's', 'id6', None, None, [0, 100000]], [1, 0.255084]),\n  ('rollout sample 21', ['flag-a', 'salt2', 'id352', '', None, [99999]], [0, 0.94531]),\n  ('rollout sample 30', ['flag-b', 'salt2', 'id599', 'eu', 0, [30000, 30000]], [1, 0.450018]),\n  ('rollout sample 40', ['flag-b', 'salt2', 'id862', 'x', 61, [10000, 20000, 70000]], [2, 0.319084])]]\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-seeded-rollout-zero-seed","generated_at":"2026-09-29T14:48:55.427021+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Seeds let several flags share one bucketing so a cohort sees consistent variations.","root_cause":"The seed is tested for truthiness, so 0 counts as no seed.","sha256":"cac57d2565fe8cc4bce3eb890c66f237598ad8586da80fa171b63e7456af863a","title":"Seeded weighted rollout: Seed zero is ignored · 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.103,"exit_code":1,"observations":[{"actual":[0,0.430117],"check":"seed zero is a real seed","expected":[0,0.331393],"passed":false},{"actual":[1,0.759987],"check":"seed replaces flag key and salt","expected":[1,0.855827],"passed":false},{"actual":[1,0.891663],"check":"empty secondary is still appended","expected":[1,0.891663],"passed":true},{"actual":[1,0.975219],"check":"non-empty secondary","expected":[1,0.975219],"passed":true},{"actual":[1,0.233147],"check":"weights short of total go to last index","expected":[1,0.233147],"passed":true},{"actual":[2,0.854306],"check":"rollout sample 1","expected":[2,0.88242],"passed":false},{"actual":[2,0.901075],"check":"rollout sample 2","expected":[1,0.37423],"passed":false},{"actual":[0,0.026223],"check":"rollout sample 3","expected":[0,0.322784],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"seed zero is a real seed\", \"actual\": [0, 0.430117], \"expected\": [0, 0.331393], \"passed\": false}, {\"check\": \"seed replaces flag key and salt\", \"actual\": [1, 0.759987], \"expected\": [1, 0.855827], \"passed\": false}, {\"check\": \"empty secondary is still appended\", \"actual\": [1, 0.891663], \"expected\": [1, 0.891663], \"passed\": true}, {\"check\": \"non-empty secondary\", \"actual\": [1, 0.975219], \"expected\": [1, 0.975219], \"passed\": true}, {\"check\": \"weights short of total go to last index\", \"actual\": [1, 0.233147], \"expected\": [1, 0.233147], \"passed\": true}, {\"check\": \"rollout sample 1\", \"actual\": [2, 0.854306], \"expected\": [2, 0.88242], \"passed\": false}, {\"check\": \"rollout sample 2\", \"actual\": [2, 0.901075], \"expected\": [1, 0.37423], \"passed\": false}, {\"check\": \"rollout sample 3\", \"actual\": [0, 0.026223], \"expected\": [0, 0.322784], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.773,"exit_code":1,"observations":[{"actual":[1,0.703145],"check":"seed zero is a real seed","expected":[0,0.331393],"passed":false},{"actual":[1,0.855827],"check":"seed replaces flag key and salt","expected":[1,0.855827],"passed":true},{"actual":[1,0.891663],"check":"empty secondary is still appended","expected":[1,0.891663],"passed":true},{"actual":[1,0.975219],"check":"non-empty secondary","expected":[1,0.975219],"passed":true},{"actual":[1,0.233147],"check":"weights short of total go to last index","expected":[1,0.233147],"passed":true},{"actual":[1,0.127778],"check":"rollout sample 1","expected":[2,0.88242],"passed":false},{"actual":[1,0.37423],"check":"rollout sample 2","expected":[1,0.37423],"passed":true},{"actual":[0,0.322784],"check":"rollout sample 3","expected":[0,0.322784],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"seed zero is a real seed\", \"actual\": [1, 0.703145], \"expected\": [0, 0.331393], \"passed\": false}, {\"check\": \"seed replaces flag key and salt\", \"actual\": [1, 0.855827], \"expected\": [1, 0.855827], \"passed\": true}, {\"check\": \"empty secondary is still appended\", \"actual\": [1, 0.891663], \"expected\": [1, 0.891663], \"passed\": true}, {\"check\": \"non-empty secondary\", \"actual\": [1, 0.975219], \"expected\": [1, 0.975219], \"passed\": true}, {\"check\": \"weights short of total go to last index\", \"actual\": [1, 0.233147], \"expected\": [1, 0.233147], \"passed\": true}, {\"check\": \"rollout sample 1\", \"actual\": [1, 0.127778], \"expected\": [2, 0.88242], \"passed\": false}, {\"check\": \"rollout sample 2\", \"actual\": [1, 0.37423], \"expected\": [1, 0.37423], \"passed\": true}, {\"check\": \"rollout sample 3\", \"actual\": [0, 0.322784], \"expected\": [0, 0.322784], \"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."}}