FA-100321 / Dataset deduplication grouping / Open access
Dataset deduplication: hash collision merges distinct records · case 01
hash collision merges distinct records.
ROOT CAUSE
The candidate bucket is treated as proof of equality.
THE FAILURE
The candidate bucket is treated as proof of equality.
Unsuccessful approach: Checking only record length still merges unequal values of equal length.
Case contract
Given rows [hash,key,id], return IDs of distinct full keys, retaining first occurrence order even when hashes collide.
Why this case matters
This deterministic toy operation makes one dataset equivalence or representative rule explicit.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
seen=set(); out=[]
for h,k,i in rows:
if h not in seen: seen.add(h); out.append(i)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('collision distinct keys',solve([[N,'aa','a'],[N,'bb','b']]),['a','b'])
check('exact duplicate',solve([[N,'same','a'],[N,'same','b']]),['a'])
check('same key different hash',solve([[1,'x','a'],[2,'x','b']]),['a'])
check('empty',solve([]),[])
check('length collision',solve([[0,'aa','a'],[0,'bb','b']]),['a','b'])
check('source order',solve([[1,'z','z'],[1,'a','a']]),['z','a'])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| collision distinct keys | ['a'] | ['a', 'b'] | Failed |
| exact duplicate | ['a'] | ['a'] | Passed |
| same key different hash | ['a', 'b'] | ['a'] | Failed |
| empty | [] | [] | Passed |
| length collision | ['a'] | ['a', 'b'] | Failed |
| source order | ['z'] | ['z', 'a'] | Failed |
SHA-256 / 41f7618274b360cf47307cb972d8d7970505f40acdfa9428434edd346103add4
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
seen=set(); out=[]
for h,k,i in rows:
if (h,len(k)) not in seen: seen.add((h,len(k))); out.append(i)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('collision distinct keys',solve([[N,'aa','a'],[N,'bb','b']]),['a','b'])
check('exact duplicate',solve([[N,'same','a'],[N,'same','b']]),['a'])
check('same key different hash',solve([[1,'x','a'],[2,'x','b']]),['a'])
check('empty',solve([]),[])
check('length collision',solve([[0,'aa','a'],[0,'bb','b']]),['a','b'])
check('source order',solve([[1,'z','z'],[1,'a','a']]),['z','a'])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| collision distinct keys | ['a'] | ['a', 'b'] | Failed |
| exact duplicate | ['a'] | ['a'] | Passed |
| same key different hash | ['a', 'b'] | ['a'] | Failed |
| empty | [] | [] | Passed |
| length collision | ['a'] | ['a', 'b'] | Failed |
| source order | ['z'] | ['z', 'a'] | Failed |
SHA-256 / 07cf908b1b36cade11262e65b3e7c59fa34bb512e8a6f797542205bfdd0d5e54
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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
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.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:34.472079+00:00.
Case digest / 48c843d7182e0bdeb9e09c6dfdc394b85a338b8744219c1b137062412abce032