{"abstract":"deleted record is resurrected by older duplicate.","category":"Dataset deduplication grouping","checks":7,"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.","contract_signature":"rows","evaluation_group":"dedup-tombstone-revision","failed_approach":"Treating any tombstone as final hides a later live revision that intentionally restores the key.","family":"w3-dataset-deduplication-grouping-tombstone-revision-dedup","id":"FA-100276","implementations":{"attempt":{"sha256":"0a77a9980a1952566c2f728933e50a30e5d5f5f9c36438fc921a8dc700a7faf9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    tombstoned={k for k,r,deleted,payload in rows if deleted}\n    latest={}\n    for k,r,deleted,payload in rows:\n     if not deleted and (k not in latest or r>latest[k][0]): latest[k]=(r,payload)\n    return [[k,latest[k][1]] for k in sorted(latest) if k not in tombstoned]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nk='item'+str(N)\ncheck('newest tombstone removes key',solve([[k,N,False,'old'],[k,N+1,True,'']]),[])\ncheck('newer live revision restores key',solve([[k,N,True,''],[k,N+1,False,'new']]),[[k,'new']])\ncheck('stale tombstone does not remove later record',solve([[k,N,True,''],[k,N+2,False,'restored']]),[[k,'restored']])\ncheck('unordered latest tombstone',solve([[k,N+2,True,''],[k,N,False,'before']]),[])\ncheck('independent live key',solve([[k,N,True,''],['other',N,False,'keep']]),[['other','keep']])\ncheck('empty history',solve([]),[])\ncheck('single live revision',solve([[k,0,False,'only']]),[[k,'only']])\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":"6a16db7e177cbeeb35e2520dcde70176b8010edc4656171ed47033de841a3c44","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    latest={}\n    for k,r,deleted,payload in rows:\n     if not deleted and (k not in latest or r>latest[k][0]): latest[k]=(r,payload)\n    return [[k,latest[k][1]] for k in sorted(latest)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nk='item'+str(N)\ncheck('newest tombstone removes key',solve([[k,N,False,'old'],[k,N+1,True,'']]),[])\ncheck('newer live revision restores key',solve([[k,N,True,''],[k,N+1,False,'new']]),[[k,'new']])\ncheck('stale tombstone does not remove later record',solve([[k,N,True,''],[k,N+2,False,'restored']]),[[k,'restored']])\ncheck('unordered latest tombstone',solve([[k,N+2,True,''],[k,N,False,'before']]),[])\ncheck('independent live key',solve([[k,N,True,''],['other',N,False,'keep']]),[['other','keep']])\ncheck('empty history',solve([]),[])\ncheck('single live revision',solve([[k,0,False,'only']]),[[k,'only']])\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-tombstone-revision-dedup","generated_at":"2026-09-30T16:48:33.592513+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":"Deduplication filters deletion markers before resolving each key to its newest revision.","sha256":"d0b64673ae902ecbcbf3a243b2d90d30d84f7f99eb0a79ba93d1b2e55da12682","title":"Dataset deduplication: deleted record is resurrected by older duplicate · 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":29.705,"exit_code":1,"observations":[{"actual":[],"check":"newest tombstone removes key","expected":[],"passed":true},{"actual":[],"check":"newer live revision restores key","expected":[["item1","new"]],"passed":false},{"actual":[],"check":"stale tombstone does not remove later record","expected":[["item1","restored"]],"passed":false},{"actual":[],"check":"unordered latest tombstone","expected":[],"passed":true},{"actual":[["other","keep"]],"check":"independent live key","expected":[["other","keep"]],"passed":true},{"actual":[],"check":"empty history","expected":[],"passed":true},{"actual":[["item1","only"]],"check":"single live revision","expected":[["item1","only"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"newest tombstone removes key\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"newer live revision restores key\", \"actual\": [], \"expected\": [[\"item1\", \"new\"]], \"passed\": false}, {\"check\": \"stale tombstone does not remove later record\", \"actual\": [], \"expected\": [[\"item1\", \"restored\"]], \"passed\": false}, {\"check\": \"unordered latest tombstone\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"independent live key\", \"actual\": [[\"other\", \"keep\"]], \"expected\": [[\"other\", \"keep\"]], \"passed\": true}, {\"check\": \"empty history\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single live revision\", \"actual\": [[\"item1\", \"only\"]], \"expected\": [[\"item1\", \"only\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":30.11,"exit_code":1,"observations":[{"actual":[["item1","old"]],"check":"newest tombstone removes key","expected":[],"passed":false},{"actual":[["item1","new"]],"check":"newer live revision restores key","expected":[["item1","new"]],"passed":true},{"actual":[["item1","restored"]],"check":"stale tombstone does not remove later record","expected":[["item1","restored"]],"passed":true},{"actual":[["item1","before"]],"check":"unordered latest tombstone","expected":[],"passed":false},{"actual":[["other","keep"]],"check":"independent live key","expected":[["other","keep"]],"passed":true},{"actual":[],"check":"empty history","expected":[],"passed":true},{"actual":[["item1","only"]],"check":"single live revision","expected":[["item1","only"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"newest tombstone removes key\", \"actual\": [[\"item1\", \"old\"]], \"expected\": [], \"passed\": false}, {\"check\": \"newer live revision restores key\", \"actual\": [[\"item1\", \"new\"]], \"expected\": [[\"item1\", \"new\"]], \"passed\": true}, {\"check\": \"stale tombstone does not remove later record\", \"actual\": [[\"item1\", \"restored\"]], \"expected\": [[\"item1\", \"restored\"]], \"passed\": true}, {\"check\": \"unordered latest tombstone\", \"actual\": [[\"item1\", \"before\"]], \"expected\": [], \"passed\": false}, {\"check\": \"independent live key\", \"actual\": [[\"other\", \"keep\"]], \"expected\": [[\"other\", \"keep\"]], \"passed\": true}, {\"check\": \"empty history\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single live revision\", \"actual\": [[\"item1\", \"only\"]], \"expected\": [[\"item1\", \"only\"]], \"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."}}