{"abstract":"Conflicting duplicate labels are resolved by last-write order.","category":"Training label alignment","checks":7,"contract":"Records are [example_id,label]. Return ordered [id,label] for IDs with a single consistent label; omit IDs with conflicts.","contract_signature":"records","evaluation_group":"training-label-alignment-consistent-duplicate-label-merge","failed_approach":"Keeping the first value avoids last-write behavior but silently accepts the same conflict.","family":"w3-training-label-alignment-label-merge-conflicts","id":"FA-97981","implementations":{"attempt":{"sha256":"d5cdcf91e9e6f79db3d366c88d48fce9fb6670b896fcd8a54d36f6b82b4a5fb5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(records):\n    d={}\n    for i,y in records: d.setdefault(i,y)\n    return [[i,y] for i,y in d.items()]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('agreeing repeats collapse',solve([['a',N],['a',N]]),[['a',N]])\ncheck('conflict omitted',solve([['a',N],['a',N+1],['b',0]]),[['b',0]])\ncheck('empty',solve([]),[])\ncheck('single record',solve([['x',N]]),[['x',N]])\ncheck('late conflict',solve([['x',1],['y',2],['x',3]]),[['y',2]])\ncheck('zero label consistency',solve([['z',0],['z',0]]),[['z',0]])\ncheck('distinct IDs same label',solve([['a',N],['b',N]]),[['a',N],['b',N]])\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":"94433033ca2ecd6fd312a7072d3aa4621e2f5c5d218669fbf0466d8b2ece267f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(records):\n    d={i:y for i,y in records}\n    return [[i,y] for i,y in d.items()]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('agreeing repeats collapse',solve([['a',N],['a',N]]),[['a',N]])\ncheck('conflict omitted',solve([['a',N],['a',N+1],['b',0]]),[['b',0]])\ncheck('empty',solve([]),[])\ncheck('single record',solve([['x',N]]),[['x',N]])\ncheck('late conflict',solve([['x',1],['y',2],['x',3]]),[['y',2]])\ncheck('zero label consistency',solve([['z',0],['z',0]]),[['z',0]])\ncheck('distinct IDs same label',solve([['a',N],['b',N]]),[['a',N],['b',N]])\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":"IDs and labels are hashable and may use any value other than identity semantics. 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-training-label-alignment-label-merge-conflicts","generated_at":"2026-09-30T16:48:07.975706+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small deterministic training-data operation makes label ownership and ordering explicit.","root_cause":"Repeated records overwrite earlier labels without checking agreement.","sha256":"0afd9c0dbd6062442ed1bf96abccefcc8520c1dacdced38f31d5aec34c10e703","title":"Conflicting duplicate labels are resolved by last-write order · 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":25.925,"exit_code":1,"observations":[{"actual":[["a",1]],"check":"agreeing repeats collapse","expected":[["a",1]],"passed":true},{"actual":[["a",1],["b",0]],"check":"conflict omitted","expected":[["b",0]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["x",1]],"check":"single record","expected":[["x",1]],"passed":true},{"actual":[["x",1],["y",2]],"check":"late conflict","expected":[["y",2]],"passed":false},{"actual":[["z",0]],"check":"zero label consistency","expected":[["z",0]],"passed":true},{"actual":[["a",1],["b",1]],"check":"distinct IDs same label","expected":[["a",1],["b",1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"agreeing repeats collapse\", \"actual\": [[\"a\", 1]], \"expected\": [[\"a\", 1]], \"passed\": true}, {\"check\": \"conflict omitted\", \"actual\": [[\"a\", 1], [\"b\", 0]], \"expected\": [[\"b\", 0]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single record\", \"actual\": [[\"x\", 1]], \"expected\": [[\"x\", 1]], \"passed\": true}, {\"check\": \"late conflict\", \"actual\": [[\"x\", 1], [\"y\", 2]], \"expected\": [[\"y\", 2]], \"passed\": false}, {\"check\": \"zero label consistency\", \"actual\": [[\"z\", 0]], \"expected\": [[\"z\", 0]], \"passed\": true}, {\"check\": \"distinct IDs same label\", \"actual\": [[\"a\", 1], [\"b\", 1]], \"expected\": [[\"a\", 1], [\"b\", 1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.822,"exit_code":1,"observations":[{"actual":[["a",1]],"check":"agreeing repeats collapse","expected":[["a",1]],"passed":true},{"actual":[["a",2],["b",0]],"check":"conflict omitted","expected":[["b",0]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["x",1]],"check":"single record","expected":[["x",1]],"passed":true},{"actual":[["x",3],["y",2]],"check":"late conflict","expected":[["y",2]],"passed":false},{"actual":[["z",0]],"check":"zero label consistency","expected":[["z",0]],"passed":true},{"actual":[["a",1],["b",1]],"check":"distinct IDs same label","expected":[["a",1],["b",1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"agreeing repeats collapse\", \"actual\": [[\"a\", 1]], \"expected\": [[\"a\", 1]], \"passed\": true}, {\"check\": \"conflict omitted\", \"actual\": [[\"a\", 2], [\"b\", 0]], \"expected\": [[\"b\", 0]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single record\", \"actual\": [[\"x\", 1]], \"expected\": [[\"x\", 1]], \"passed\": true}, {\"check\": \"late conflict\", \"actual\": [[\"x\", 3], [\"y\", 2]], \"expected\": [[\"y\", 2]], \"passed\": false}, {\"check\": \"zero label consistency\", \"actual\": [[\"z\", 0]], \"expected\": [[\"z\", 0]], \"passed\": true}, {\"check\": \"distinct IDs same label\", \"actual\": [[\"a\", 1], [\"b\", 1]], \"expected\": [[\"a\", 1], [\"b\", 1]], \"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."}}