{"abstract":"class representation is uneven across group partitions.","category":"Dataset split isolation","checks":6,"contract":"Each group maps to a list of labels. Return group IDs assigned to train by greedy least-filled label bins; groups stay whole, ties by ID.","contract_signature":"groups","evaluation_group":"ds-group-label-strata","failed_approach":"Sorting groups by only their first label helps pure groups but ignores mixed-label contribution and does not balance the resulting counts.","family":"w3-dataset-split-isolation-group-label-strata","id":"FA-97851","implementations":{"attempt":{"sha256":"1b86b42745a32f16694343681625bc9e983008aae4c349e4adb1e0e8c6d6836f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(groups):\n    return sorted(groups,key=lambda g:groups[g][0] if groups[g] else '')[:(len(groups)+1)//2]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed group stays intact',solve({'a':['x','y'],'b':['x'],'c':['y']}),['a'])\ncheck('empty',solve({}),[])\ncheck('singleton',solve({'g':['z']}),['g'])\ncheck('lexical tie',solve({'b':['q'],'a':['q']}),['a'])\ncheck('minority label',solve({'a':['m','m','r'],'b':['m'],'c':['r'],'d':['r']}),['a','d'])\ncheck('empty labels',solve({'a':[],'b':[]}),['a','b'])\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":"63cc4b04f4dc8d6327655024d7595420ebd1b6e66b87c5ab9ddd4fd42525d469","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(groups):\n    return sorted(groups)[:(len(groups)+1)//2]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed group stays intact',solve({'a':['x','y'],'b':['x'],'c':['y']}),['a'])\ncheck('empty',solve({}),[])\ncheck('singleton',solve({'g':['z']}),['g'])\ncheck('lexical tie',solve({'b':['q'],'a':['q']}),['a'])\ncheck('minority label',solve({'a':['m','m','r'],'b':['m'],'c':['r'],'d':['r']}),['a','d'])\ncheck('empty labels',solve({'a':[],'b':[]}),['a','b'])\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-group-label-strata","generated_at":"2026-09-30T16:48:06.688947+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":"Groups are selected by key order without comparing label counts on the two sides.","sha256":"c89b8d52249a74b030fd9282f8b14eb929c74ee6059042c6d3560041f053ae73","title":"Dataset split: class representation is uneven across group partitions · 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":26.913,"exit_code":1,"observations":[{"actual":["a","b"],"check":"mixed group stays intact","expected":["a"],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["g"],"check":"singleton","expected":["g"],"passed":true},{"actual":["b"],"check":"lexical tie","expected":["a"],"passed":false},{"actual":["a","b"],"check":"minority label","expected":["a","d"],"passed":false},{"actual":["a"],"check":"empty labels","expected":["a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed group stays intact\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [\"g\"], \"expected\": [\"g\"], \"passed\": true}, {\"check\": \"lexical tie\", \"actual\": [\"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"minority label\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"d\"], \"passed\": false}, {\"check\": \"empty labels\", \"actual\": [\"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":33.349,"exit_code":1,"observations":[{"actual":["a","b"],"check":"mixed group stays intact","expected":["a"],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["g"],"check":"singleton","expected":["g"],"passed":true},{"actual":["a"],"check":"lexical tie","expected":["a"],"passed":true},{"actual":["a","b"],"check":"minority label","expected":["a","d"],"passed":false},{"actual":["a"],"check":"empty labels","expected":["a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed group stays intact\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [\"g\"], \"expected\": [\"g\"], \"passed\": true}, {\"check\": \"lexical tie\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"minority label\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"d\"], \"passed\": false}, {\"check\": \"empty labels\", \"actual\": [\"a\"], \"expected\": [\"a\", \"b\"], \"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."}}