{"abstract":"quota fill stops before an indivisible group that crosses the target.","category":"Dataset split isolation","checks":6,"contract":"Groups map to row lists and target is nonnegative; return ordered group IDs selected by size-descending then key, adding whole groups until cumulative size reaches target.","contract_signature":"groups, target","evaluation_group":"ds-group-quota","failed_approach":"Using a less-than-or-equal stop condition admits another group when the target has already been met exactly.","family":"w3-dataset-split-isolation-group-quota-capacity","id":"FA-97936","implementations":{"attempt":{"sha256":"5757e33eb64b1e2f3e321c4d6b32b585d79f841827212526c4da08db97ebc49f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(groups, target):\n    out=[]; count=0\n    for g,rs in sorted(groups.items(),key=lambda z:(-len(z[1]),z[0])):\n     if count<=target: out.append(g); count+=len(rs)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('overshoot whole group',solve({'a':['1','2','3'],'b':['4']},2),['a'])\ncheck('exact target',solve({'a':['1'],'b':['2']},1),['a'])\ncheck('zero target',solve({'a':['1']},0),[])\ncheck('empty',solve({},3),[])\ncheck('large then small',solve({'b':['b'],'a':['1','2']},3),['a','b'])\ncheck('target beyond data',solve({'a':['a'],'b':['b']},9),['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":"c2f9defd5d3b4f33a276f780d4268dc1ebe9d8c3aa377aee5db03f7cc61eddbb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(groups, target):\n    out=[]; count=0\n    for g,rs in sorted(groups.items()):\n     if count+len(rs)<=target: out.append(g); count+=len(rs)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('overshoot whole group',solve({'a':['1','2','3'],'b':['4']},2),['a'])\ncheck('exact target',solve({'a':['1'],'b':['2']},1),['a'])\ncheck('zero target',solve({'a':['1']},0),[])\ncheck('empty',solve({},3),[])\ncheck('large then small',solve({'b':['b'],'a':['1','2']},3),['a','b'])\ncheck('target beyond data',solve({'a':['a'],'b':['b']},9),['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-quota-capacity","generated_at":"2026-09-30T16:48:07.548636+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":"A candidate group is accepted only when its full size fits below the row target, so an overshooting group is omitted.","sha256":"fd288cf73a30dec11a13d27b12f3105cbc9fbe655c0a3c92453b2ba0602ede8b","title":"Dataset split: quota fill stops before an indivisible group that crosses the target · 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.321,"exit_code":1,"observations":[{"actual":["a"],"check":"overshoot whole group","expected":["a"],"passed":true},{"actual":["a","b"],"check":"exact target","expected":["a"],"passed":false},{"actual":["a"],"check":"zero target","expected":[],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a","b"],"check":"large then small","expected":["a","b"],"passed":true},{"actual":["a","b"],"check":"target beyond data","expected":["a","b"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"overshoot whole group\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"exact target\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"zero target\", \"actual\": [\"a\"], \"expected\": [], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"large then small\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"target beyond data\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.277,"exit_code":1,"observations":[{"actual":["b"],"check":"overshoot whole group","expected":["a"],"passed":false},{"actual":["a"],"check":"exact target","expected":["a"],"passed":true},{"actual":[],"check":"zero target","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a","b"],"check":"large then small","expected":["a","b"],"passed":true},{"actual":["a","b"],"check":"target beyond data","expected":["a","b"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"overshoot whole group\", \"actual\": [\"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"exact target\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"zero target\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"large then small\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"target beyond data\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"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."}}