{"abstract":"Labels attach by row position after examples are reordered.","category":"Training label alignment","checks":7,"contract":"Examples are [id,payload] and labels are [id,label], with unique IDs. Return [id,label] in example order and omit examples without labels.","contract_signature":"examples, labels","evaluation_group":"training-label-alignment-keyed-record-join","failed_approach":"Sorting examples and stripping label IDs still cannot recover which example owns each value.","family":"w3-training-label-alignment-id-keyed-join","id":"FA-97941","implementations":{"attempt":{"sha256":"1c13671aac4d2ada0723ce60e71359dbc35041741818bc071cb97bc49e50fc06","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(examples, labels):\n    return [[e[0], y] for e,y in zip(sorted(examples), [r[1] for r in labels])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reordered rows',solve([['b','B'],['a','A']], [['a',N],['b',N+1]]),[['b',N+1],['a',N]])\ncheck('missing label omitted',solve([['x',0],['y',1]],[['y',N]]),[['y',N]])\ncheck('empty examples',solve([], [['a',1]]),[])\ncheck('empty labels',solve([['a',0]],[]),[])\ncheck('single match',solve([['a',0]],[['a',N]]),[['a',N]])\ncheck('extra label ignored',solve([['a',0]],[['z',9],['a',N]]),[['a',N]])\ncheck('zero identifier',solve([[0,'v']],[[0,N]]),[[0,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":"326636ec6042b98dde68b7069502f6ced06726706e525543e7aa7069685912d5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(examples, labels):\n    return [[e[0], labels[i][1]] for i,e in enumerate(examples) if i < len(labels)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reordered rows',solve([['b','B'],['a','A']], [['a',N],['b',N+1]]),[['b',N+1],['a',N]])\ncheck('missing label omitted',solve([['x',0],['y',1]],[['y',N]]),[['y',N]])\ncheck('empty examples',solve([], [['a',1]]),[])\ncheck('empty labels',solve([['a',0]],[]),[])\ncheck('single match',solve([['a',0]],[['a',N]]),[['a',N]])\ncheck('extra label ignored',solve([['a',0]],[['z',9],['a',N]]),[['a',N]])\ncheck('zero identifier',solve([[0,'v']],[[0,N]]),[[0,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 are toy hashable labels; duplicate IDs are outside this contract. 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-id-keyed-join","generated_at":"2026-09-30T16:48:07.548264+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":"An example reorder leaves labels in their former positional order.","sha256":"a61dfec6287b3f35ad6117bcc65cdbdcbd6baa929e090f548cdb402001821e3b","title":"Labels attach by row position after examples are reordered · 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":27.325,"exit_code":1,"observations":[{"actual":[["a",1],["b",2]],"check":"reordered rows","expected":[["b",2],["a",1]],"passed":false},{"actual":[["x",1]],"check":"missing label omitted","expected":[["y",1]],"passed":false},{"actual":[],"check":"empty examples","expected":[],"passed":true},{"actual":[],"check":"empty labels","expected":[],"passed":true},{"actual":[["a",1]],"check":"single match","expected":[["a",1]],"passed":true},{"actual":[["a",9]],"check":"extra label ignored","expected":[["a",1]],"passed":false},{"actual":[[0,1]],"check":"zero identifier","expected":[[0,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reordered rows\", \"actual\": [[\"a\", 1], [\"b\", 2]], \"expected\": [[\"b\", 2], [\"a\", 1]], \"passed\": false}, {\"check\": \"missing label omitted\", \"actual\": [[\"x\", 1]], \"expected\": [[\"y\", 1]], \"passed\": false}, {\"check\": \"empty examples\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty labels\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single match\", \"actual\": [[\"a\", 1]], \"expected\": [[\"a\", 1]], \"passed\": true}, {\"check\": \"extra label ignored\", \"actual\": [[\"a\", 9]], \"expected\": [[\"a\", 1]], \"passed\": false}, {\"check\": \"zero identifier\", \"actual\": [[0, 1]], \"expected\": [[0, 1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.027,"exit_code":1,"observations":[{"actual":[["b",1],["a",2]],"check":"reordered rows","expected":[["b",2],["a",1]],"passed":false},{"actual":[["x",1]],"check":"missing label omitted","expected":[["y",1]],"passed":false},{"actual":[],"check":"empty examples","expected":[],"passed":true},{"actual":[],"check":"empty labels","expected":[],"passed":true},{"actual":[["a",1]],"check":"single match","expected":[["a",1]],"passed":true},{"actual":[["a",9]],"check":"extra label ignored","expected":[["a",1]],"passed":false},{"actual":[[0,1]],"check":"zero identifier","expected":[[0,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reordered rows\", \"actual\": [[\"b\", 1], [\"a\", 2]], \"expected\": [[\"b\", 2], [\"a\", 1]], \"passed\": false}, {\"check\": \"missing label omitted\", \"actual\": [[\"x\", 1]], \"expected\": [[\"y\", 1]], \"passed\": false}, {\"check\": \"empty examples\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty labels\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single match\", \"actual\": [[\"a\", 1]], \"expected\": [[\"a\", 1]], \"passed\": true}, {\"check\": \"extra label ignored\", \"actual\": [[\"a\", 9]], \"expected\": [[\"a\", 1]], \"passed\": false}, {\"check\": \"zero identifier\", \"actual\": [[0, 1]], \"expected\": [[0, 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."}}