{"abstract":"groups are alternated by input order despite unequal sizes.","category":"Dataset split isolation","checks":6,"contract":"Groups map to nonempty lists of row IDs. Return train IDs from largest-first greedy size balancing; ties choose train.","contract_signature":"groups","evaluation_group":"ds-weighted-greedy","failed_approach":"A half-total threshold approximates a split but does not compare both side loads and can cross the threshold at an exact-half boundary.","family":"w3-dataset-split-isolation-weighted-group-greedy","id":"FA-97846","implementations":{"attempt":{"sha256":"c4fb72c35a61e10bc687b1fa49ff4784e1d673b74deb35d8f29e2678374db1ee","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(groups):\n    out=[]; total=0\n    for g,rs in sorted(groups.items(),key=lambda z:-len(z[1])):\n     if total<=sum(map(len,groups.values()))//2: out+=rs; total+=len(rs)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('large first',solve({'a':list(range(N+3)),'b':['b'],'c':['c']}),list(range(N+3)))\ncheck('one group',solve({'g':['x']}),['x'])\ncheck('empty groups',solve({}),[])\ncheck('stable tie',solve({'b':['b'],'a':['a']}),['a'])\ncheck('two large',solve({'a':['a1','a2'],'b':['b1','b2']}),['a1','a2'])\ncheck('small follows load',solve({'a':['a1','a2','a3'],'b':['b'],'c':['c']}),['a1','a2','a3'])\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":"a9417f01d9682780c35635a48400d7b1734df29d2d5ff85e554173205df6723a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(groups):\n    return [x for g,rows in groups.items() if len([r for r in rows]) and list(groups).index(g)%2==0 for x in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('large first',solve({'a':list(range(N+3)),'b':['b'],'c':['c']}),list(range(N+3)))\ncheck('one group',solve({'g':['x']}),['x'])\ncheck('empty groups',solve({}),[])\ncheck('stable tie',solve({'b':['b'],'a':['a']}),['a'])\ncheck('two large',solve({'a':['a1','a2'],'b':['b1','b2']}),['a1','a2'])\ncheck('small follows load',solve({'a':['a1','a2','a3'],'b':['b'],'c':['c']}),['a1','a2','a3'])\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-weighted-group-greedy","generated_at":"2026-09-30T16:48:06.687810+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":"The implementation alternates group positions without considering how many rows each group contributes.","sha256":"d724123d98f29acfcb67ecb34940b5d893aee4b423ce93c3e775cf7363cafcf3","title":"Dataset split: groups are alternated by input order despite unequal sizes · 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.866,"exit_code":1,"observations":[{"actual":[0,1,2,3],"check":"large first","expected":[0,1,2,3],"passed":true},{"actual":["x"],"check":"one group","expected":["x"],"passed":true},{"actual":[],"check":"empty groups","expected":[],"passed":true},{"actual":["b","a"],"check":"stable tie","expected":["a"],"passed":false},{"actual":["a1","a2","b1","b2"],"check":"two large","expected":["a1","a2"],"passed":false},{"actual":["a1","a2","a3"],"check":"small follows load","expected":["a1","a2","a3"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"large first\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 2, 3], \"passed\": true}, {\"check\": \"one group\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"empty groups\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"stable tie\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"two large\", \"actual\": [\"a1\", \"a2\", \"b1\", \"b2\"], \"expected\": [\"a1\", \"a2\"], \"passed\": false}, {\"check\": \"small follows load\", \"actual\": [\"a1\", \"a2\", \"a3\"], \"expected\": [\"a1\", \"a2\", \"a3\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":31.193,"exit_code":1,"observations":[{"actual":[0,1,2,3,"c"],"check":"large first","expected":[0,1,2,3],"passed":false},{"actual":["x"],"check":"one group","expected":["x"],"passed":true},{"actual":[],"check":"empty groups","expected":[],"passed":true},{"actual":["b"],"check":"stable tie","expected":["a"],"passed":false},{"actual":["a1","a2"],"check":"two large","expected":["a1","a2"],"passed":true},{"actual":["a1","a2","a3","c"],"check":"small follows load","expected":["a1","a2","a3"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"large first\", \"actual\": [0, 1, 2, 3, \"c\"], \"expected\": [0, 1, 2, 3], \"passed\": false}, {\"check\": \"one group\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"empty groups\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"stable tie\", \"actual\": [\"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"two large\", \"actual\": [\"a1\", \"a2\"], \"expected\": [\"a1\", \"a2\"], \"passed\": true}, {\"check\": \"small follows load\", \"actual\": [\"a1\", \"a2\", \"a3\", \"c\"], \"expected\": [\"a1\", \"a2\", \"a3\"], \"passed\": false}], \"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."}}