{"abstract":"hash collision merges distinct records.","category":"Dataset deduplication grouping","checks":6,"contract":"Given rows [hash,key,id], return IDs of distinct full keys, retaining first occurrence order even when hashes collide.","contract_signature":"rows","evaluation_group":"dedup-hash-collision","failed_approach":"Checking only record length still merges unequal values of equal length.","family":"w3-dataset-deduplication-grouping-bucket-collision-verification","id":"FA-100321","implementations":{"attempt":{"sha256":"07cf908b1b36cade11262e65b3e7c59fa34bb512e8a6f797542205bfdd0d5e54","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    seen=set(); out=[]\n    for h,k,i in rows:\n     if (h,len(k)) not in seen: seen.add((h,len(k))); out.append(i)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('collision distinct keys',solve([[N,'aa','a'],[N,'bb','b']]),['a','b'])\ncheck('exact duplicate',solve([[N,'same','a'],[N,'same','b']]),['a'])\ncheck('same key different hash',solve([[1,'x','a'],[2,'x','b']]),['a'])\ncheck('empty',solve([]),[])\ncheck('length collision',solve([[0,'aa','a'],[0,'bb','b']]),['a','b'])\ncheck('source order',solve([[1,'z','z'],[1,'a','a']]),['z','a'])\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":"41f7618274b360cf47307cb972d8d7970505f40acdfa9428434edd346103add4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    seen=set(); out=[]\n    for h,k,i in rows:\n     if h not in seen: seen.add(h); out.append(i)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('collision distinct keys',solve([[N,'aa','a'],[N,'bb','b']]),['a','b'])\ncheck('exact duplicate',solve([[N,'same','a'],[N,'same','b']]),['a'])\ncheck('same key different hash',solve([[1,'x','a'],[2,'x','b']]),['a'])\ncheck('empty',solve([]),[])\ncheck('length collision',solve([[0,'aa','a'],[0,'bb','b']]),['a','b'])\ncheck('source order',solve([[1,'z','z'],[1,'a','a']]),['z','a'])\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":"Inputs are small in-memory fixtures with the stated contract; results do not claim production deduplication quality. 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":"w3-dataset-deduplication-grouping-bucket-collision-verification","generated_at":"2026-09-30T16:48:34.472079+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic toy operation makes one dataset equivalence or representative rule explicit.","root_cause":"The candidate bucket is treated as proof of equality.","sha256":"48c843d7182e0bdeb9e09c6dfdc394b85a338b8744219c1b137062412abce032","title":"Dataset deduplication: hash collision merges distinct records · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":28.997,"exit_code":1,"observations":[{"actual":["a"],"check":"collision distinct keys","expected":["a","b"],"passed":false},{"actual":["a"],"check":"exact duplicate","expected":["a"],"passed":true},{"actual":["a","b"],"check":"same key different hash","expected":["a"],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a"],"check":"length collision","expected":["a","b"],"passed":false},{"actual":["z"],"check":"source order","expected":["z","a"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"collision distinct keys\", \"actual\": [\"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"exact duplicate\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"same key different hash\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"length collision\", \"actual\": [\"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"source order\", \"actual\": [\"z\"], \"expected\": [\"z\", \"a\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.631,"exit_code":1,"observations":[{"actual":["a"],"check":"collision distinct keys","expected":["a","b"],"passed":false},{"actual":["a"],"check":"exact duplicate","expected":["a"],"passed":true},{"actual":["a","b"],"check":"same key different hash","expected":["a"],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a"],"check":"length collision","expected":["a","b"],"passed":false},{"actual":["z"],"check":"source order","expected":["z","a"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"collision distinct keys\", \"actual\": [\"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"exact duplicate\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"same key different hash\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"length collision\", \"actual\": [\"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"source order\", \"actual\": [\"z\"], \"expected\": [\"z\", \"a\"], \"passed\": false}], \"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."}}