FA-100276 / Dataset deduplication grouping / Open access
Dataset deduplication: deleted record is resurrected by older duplicate · case 01
deleted record is resurrected by older duplicate.
ROOT CAUSE
Deduplication filters deletion markers before resolving each key to its newest revision.
THE FAILURE
Deduplication filters deletion markers before resolving each key to its newest revision.
Unsuccessful approach: Treating any tombstone as final hides a later live revision that intentionally restores the key.
Case contract
Rows [key,revision,deleted,payload] have unique key/revision pairs and arbitrary order. Return [key,payload] for each key whose newest revision is not deleted, sorted by key.
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):
latest={}
for k,r,deleted,payload in rows:
if not deleted and (k not in latest or r>latest[k][0]): latest[k]=(r,payload)
return [[k,latest[k][1]] for k in sorted(latest)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
k='item'+str(N)
check('newest tombstone removes key',solve([[k,N,False,'old'],[k,N+1,True,'']]),[])
check('newer live revision restores key',solve([[k,N,True,''],[k,N+1,False,'new']]),[[k,'new']])
check('stale tombstone does not remove later record',solve([[k,N,True,''],[k,N+2,False,'restored']]),[[k,'restored']])
check('unordered latest tombstone',solve([[k,N+2,True,''],[k,N,False,'before']]),[])
check('independent live key',solve([[k,N,True,''],['other',N,False,'keep']]),[['other','keep']])
check('empty history',solve([]),[])
check('single live revision',solve([[k,0,False,'only']]),[[k,'only']])
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 |
|---|---|---|---|
| newest tombstone removes key | [['item1', 'old']] | [] | Failed |
| newer live revision restores key | [['item1', 'new']] | [['item1', 'new']] | Passed |
| stale tombstone does not remove later record | [['item1', 'restored']] | [['item1', 'restored']] | Passed |
| unordered latest tombstone | [['item1', 'before']] | [] | Failed |
| independent live key | [['other', 'keep']] | [['other', 'keep']] | Passed |
| empty history | [] | [] | Passed |
| single live revision | [['item1', 'only']] | [['item1', 'only']] | Passed |
SHA-256 / 6a16db7e177cbeeb35e2520dcde70176b8010edc4656171ed47033de841a3c44
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
tombstoned={k for k,r,deleted,payload in rows if deleted}
latest={}
for k,r,deleted,payload in rows:
if not deleted and (k not in latest or r>latest[k][0]): latest[k]=(r,payload)
return [[k,latest[k][1]] for k in sorted(latest) if k not in tombstoned]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
k='item'+str(N)
check('newest tombstone removes key',solve([[k,N,False,'old'],[k,N+1,True,'']]),[])
check('newer live revision restores key',solve([[k,N,True,''],[k,N+1,False,'new']]),[[k,'new']])
check('stale tombstone does not remove later record',solve([[k,N,True,''],[k,N+2,False,'restored']]),[[k,'restored']])
check('unordered latest tombstone',solve([[k,N+2,True,''],[k,N,False,'before']]),[])
check('independent live key',solve([[k,N,True,''],['other',N,False,'keep']]),[['other','keep']])
check('empty history',solve([]),[])
check('single live revision',solve([[k,0,False,'only']]),[[k,'only']])
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 |
|---|---|---|---|
| newest tombstone removes key | [] | [] | Passed |
| newer live revision restores key | [] | [['item1', 'new']] | Failed |
| stale tombstone does not remove later record | [] | [['item1', 'restored']] | Failed |
| unordered latest tombstone | [] | [] | Passed |
| independent live key | [['other', 'keep']] | [['other', 'keep']] | Passed |
| empty history | [] | [] | Passed |
| single live revision | [['item1', 'only']] | [['item1', 'only']] | Passed |
SHA-256 / 0a77a9980a1952566c2f728933e50a30e5d5f5f9c36438fc921a8dc700a7faf9
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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:33.592513+00:00.
Case digest / d0b64673ae902ecbcbf3a243b2d90d30d84f7f99eb0a79ba93d1b2e55da12682