{"abstract":"per-class allocation rounds each quota down independently.","category":"Dataset split isolation","checks":6,"contract":"Class counts are nonnegative integers and total is between zero and their sum; return class->train count via largest remainders, ties lexical.","contract_signature":"counts, total","evaluation_group":"ds-stratified-proportion","failed_approach":"Rounding each class to nearest can over-allocate ties.","family":"w3-dataset-split-isolation-stratified-proportion","id":"FA-97911","implementations":{"attempt":{"sha256":"962b6b8b790c4bdd8a0bc83da618f2e27c20c0ee05991011fc9ee95eebd62705","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(counts, total):\n    return {k:round(v*total/sum(counts.values())) for k,v in counts.items()}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('preserve target total',solve({'a':1,'b':1,'c':1},2),{'a':1,'b':1,'c':0})\ncheck('proportional exact',solve({'a':3,'b':1},2),{'a':2,'b':0})\ncheck('zero total',solve({'a':2,'b':1},0),{'a':0,'b':0})\ncheck('all rows',solve({'a':2,'b':3},5),{'a':2,'b':3})\ncheck('empty classes',solve({},0),{})\ncheck('remainder lexical tie',solve({'b':1,'a':1},1),{'a':1,'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":"909b71ea14e5113d40685529f6a32673ec9baa70d1bde1a2fb8f65f6d3bf3f28","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(counts, total):\n    return {k:int(v*total/sum(counts.values())) for k,v in counts.items()}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('preserve target total',solve({'a':1,'b':1,'c':1},2),{'a':1,'b':1,'c':0})\ncheck('proportional exact',solve({'a':3,'b':1},2),{'a':2,'b':0})\ncheck('zero total',solve({'a':2,'b':1},0),{'a':0,'b':0})\ncheck('all rows',solve({'a':2,'b':3},5),{'a':2,'b':3})\ncheck('empty classes',solve({},0),{})\ncheck('remainder lexical tie',solve({'b':1,'a':1},1),{'a':1,'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-stratified-proportion","generated_at":"2026-09-30T16:48:07.117722+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":"Independent floors systematically underfill small classes.","sha256":"a2ce7e68b9daf332b45993a518723abfd11170f3676523afc79704c3531fa6be","title":"Dataset split: per-class allocation rounds each quota down independently · 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.291,"exit_code":1,"observations":[{"actual":{"a":1,"b":1,"c":1},"check":"preserve target total","expected":{"a":1,"b":1,"c":0},"passed":false},{"actual":{"a":2,"b":0},"check":"proportional exact","expected":{"a":2,"b":0},"passed":true},{"actual":{"a":0,"b":0},"check":"zero total","expected":{"a":0,"b":0},"passed":true},{"actual":{"a":2,"b":3},"check":"all rows","expected":{"a":2,"b":3},"passed":true},{"actual":{},"check":"empty classes","expected":{},"passed":true},{"actual":{"a":0,"b":0},"check":"remainder lexical tie","expected":{"a":1,"b":0},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"preserve target total\", \"actual\": {\"a\": 1, \"b\": 1, \"c\": 1}, \"expected\": {\"a\": 1, \"b\": 1, \"c\": 0}, \"passed\": false}, {\"check\": \"proportional exact\", \"actual\": {\"a\": 2, \"b\": 0}, \"expected\": {\"a\": 2, \"b\": 0}, \"passed\": true}, {\"check\": \"zero total\", \"actual\": {\"a\": 0, \"b\": 0}, \"expected\": {\"a\": 0, \"b\": 0}, \"passed\": true}, {\"check\": \"all rows\", \"actual\": {\"a\": 2, \"b\": 3}, \"expected\": {\"a\": 2, \"b\": 3}, \"passed\": true}, {\"check\": \"empty classes\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"remainder lexical tie\", \"actual\": {\"b\": 0, \"a\": 0}, \"expected\": {\"a\": 1, \"b\": 0}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.053,"exit_code":1,"observations":[{"actual":{"a":0,"b":0,"c":0},"check":"preserve target total","expected":{"a":1,"b":1,"c":0},"passed":false},{"actual":{"a":1,"b":0},"check":"proportional exact","expected":{"a":2,"b":0},"passed":false},{"actual":{"a":0,"b":0},"check":"zero total","expected":{"a":0,"b":0},"passed":true},{"actual":{"a":2,"b":3},"check":"all rows","expected":{"a":2,"b":3},"passed":true},{"actual":{},"check":"empty classes","expected":{},"passed":true},{"actual":{"a":0,"b":0},"check":"remainder lexical tie","expected":{"a":1,"b":0},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"preserve target total\", \"actual\": {\"a\": 0, \"b\": 0, \"c\": 0}, \"expected\": {\"a\": 1, \"b\": 1, \"c\": 0}, \"passed\": false}, {\"check\": \"proportional exact\", \"actual\": {\"a\": 1, \"b\": 0}, \"expected\": {\"a\": 2, \"b\": 0}, \"passed\": false}, {\"check\": \"zero total\", \"actual\": {\"a\": 0, \"b\": 0}, \"expected\": {\"a\": 0, \"b\": 0}, \"passed\": true}, {\"check\": \"all rows\", \"actual\": {\"a\": 2, \"b\": 3}, \"expected\": {\"a\": 2, \"b\": 3}, \"passed\": true}, {\"check\": \"empty classes\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"remainder lexical tie\", \"actual\": {\"b\": 0, \"a\": 0}, \"expected\": {\"a\": 1, \"b\": 0}, \"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."}}