{"abstract":"a group appears in multiple cross-validation folds.","category":"Dataset split isolation","checks":6,"contract":"Rows [id,group]; assign sorted distinct groups round-robin to k folds and return [id,fold] in input order.","contract_signature":"rows, k","evaluation_group":"ds-fold-rotation","failed_approach":"Sorting rows first still rotates multiple rows of the same group separately.","family":"w3-dataset-split-isolation-fold-group-rotation","id":"FA-97886","implementations":{"attempt":{"sha256":"2b1d62c0bbcc52e058fbd5f6638a22878bdd10823921391bc2fe177abdf37ace","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, k):\n    return [[i,j%k] for j,(i,g) in enumerate(sorted(rows,key=lambda r:r[1]))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeated group same fold',solve([['a','g'],['b','h'],['c','g']],2),[['a',0],['b',1],['c',0]])\ncheck('one group',solve([['a','g']],3),[['a',0]])\ncheck('empty',solve([],2),[])\ncheck('lexical rotation',solve([['x','z'],['y','a']],2),[['x',1],['y',0]])\ncheck('three groups',solve([['a','c'],['b','b'],['c','a']],2),[['a',0],['b',1],['c',0]])\ncheck('single fold',solve([['a','x'],['b','y']],1),[['a',0],['b',0]])\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":"f3a3c7e3306e9edcf28473a58ac7cb64faea7a42c2390c576890801e9266fc94","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, k):\n    return [[i,j%k] for j,(i,g) in enumerate(rows)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeated group same fold',solve([['a','g'],['b','h'],['c','g']],2),[['a',0],['b',1],['c',0]])\ncheck('one group',solve([['a','g']],3),[['a',0]])\ncheck('empty',solve([],2),[])\ncheck('lexical rotation',solve([['x','z'],['y','a']],2),[['x',1],['y',0]])\ncheck('three groups',solve([['a','c'],['b','b'],['c','a']],2),[['a',0],['b',1],['c',0]])\ncheck('single fold',solve([['a','x'],['b','y']],1),[['a',0],['b',0]])\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 records with self-contained contracts; no claim is made about production sampling 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-split-isolation-fold-group-rotation","generated_at":"2026-09-30T16:48:07.116766+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This toy split allocator makes membership rules explicit for reproducible evaluation fixtures.","root_cause":"Fold assignment cycles over rows instead of unique groups.","sha256":"3636d5cc6db3408bf359690b8bc9d6dc10c1f3e22b2943b748bad34f6b91e019","title":"Dataset split: a group appears in multiple cross-validation folds · case 01","variant":1,"variant_policy":"The same explicitly authored fixtures repeat across all five numbered records; runtime N is unused. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":28.025,"exit_code":1,"observations":[{"actual":[["a",0],["c",1],["b",0]],"check":"repeated group same fold","expected":[["a",0],["b",1],["c",0]],"passed":false},{"actual":[["a",0]],"check":"one group","expected":[["a",0]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["y",0],["x",1]],"check":"lexical rotation","expected":[["x",1],["y",0]],"passed":false},{"actual":[["c",0],["b",1],["a",0]],"check":"three groups","expected":[["a",0],["b",1],["c",0]],"passed":false},{"actual":[["a",0],["b",0]],"check":"single fold","expected":[["a",0],["b",0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated group same fold\", \"actual\": [[\"a\", 0], [\"c\", 1], [\"b\", 0]], \"expected\": [[\"a\", 0], [\"b\", 1], [\"c\", 0]], \"passed\": false}, {\"check\": \"one group\", \"actual\": [[\"a\", 0]], \"expected\": [[\"a\", 0]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"lexical rotation\", \"actual\": [[\"y\", 0], [\"x\", 1]], \"expected\": [[\"x\", 1], [\"y\", 0]], \"passed\": false}, {\"check\": \"three groups\", \"actual\": [[\"c\", 0], [\"b\", 1], [\"a\", 0]], \"expected\": [[\"a\", 0], [\"b\", 1], [\"c\", 0]], \"passed\": false}, {\"check\": \"single fold\", \"actual\": [[\"a\", 0], [\"b\", 0]], \"expected\": [[\"a\", 0], [\"b\", 0]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.388,"exit_code":1,"observations":[{"actual":[["a",0],["b",1],["c",0]],"check":"repeated group same fold","expected":[["a",0],["b",1],["c",0]],"passed":true},{"actual":[["a",0]],"check":"one group","expected":[["a",0]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["x",0],["y",1]],"check":"lexical rotation","expected":[["x",1],["y",0]],"passed":false},{"actual":[["a",0],["b",1],["c",0]],"check":"three groups","expected":[["a",0],["b",1],["c",0]],"passed":true},{"actual":[["a",0],["b",0]],"check":"single fold","expected":[["a",0],["b",0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated group same fold\", \"actual\": [[\"a\", 0], [\"b\", 1], [\"c\", 0]], \"expected\": [[\"a\", 0], [\"b\", 1], [\"c\", 0]], \"passed\": true}, {\"check\": \"one group\", \"actual\": [[\"a\", 0]], \"expected\": [[\"a\", 0]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"lexical rotation\", \"actual\": [[\"x\", 0], [\"y\", 1]], \"expected\": [[\"x\", 1], [\"y\", 0]], \"passed\": false}, {\"check\": \"three groups\", \"actual\": [[\"a\", 0], [\"b\", 1], [\"c\", 0]], \"expected\": [[\"a\", 0], [\"b\", 1], [\"c\", 0]], \"passed\": true}, {\"check\": \"single fold\", \"actual\": [[\"a\", 0], [\"b\", 0]], \"expected\": [[\"a\", 0], [\"b\", 0]], \"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."}}