{"abstract":"impossible fold requests silently produce an incomplete fold map.","category":"Dataset split isolation","checks":6,"contract":"For a positive integer k, return sorted groups assigned round-robin to folds; return empty mapping when k exceeds the number of distinct groups.","contract_signature":"groups, k","evaluation_group":"ds-group-kfold","failed_approach":"Clamping to the available group count still hides that the requested number of folds cannot be filled.","family":"w3-dataset-split-isolation-group-kfold-capacity","id":"FA-97921","implementations":{"attempt":{"sha256":"a24712bd295ebb9237340f821af2332f7119cafb8a998a5b3dfb3ec2d9066f4f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(groups, k):\n    if k<1: return {}\n    uniq=sorted(set(groups)); k=min(k,len(uniq))\n    return {g:j%k for j,g in enumerate(uniq)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('balanced map',solve(['c','a','b'],2),{'a':0,'b':1,'c':0})\ncheck('duplicates count once',solve(['a','a','b'],2),{'a':0,'b':1})\ncheck('empty rejected',solve([],1),{})\ncheck('single group',solve(['x'],1),{'x':0})\ncheck('invalid zero',solve(['x'],0),{})\ncheck('too many folds',solve(['x'],2),{})\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":"b354bb870e608b98f8cfcea05ed1816502c293e91b68b6fe4f2b767e60426f1e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(groups, k):\n    return {g:j%max(1,k) for j,g in enumerate(sorted(set(groups)))}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('balanced map',solve(['c','a','b'],2),{'a':0,'b':1,'c':0})\ncheck('duplicates count once',solve(['a','a','b'],2),{'a':0,'b':1})\ncheck('empty rejected',solve([],1),{})\ncheck('single group',solve(['x'],1),{'x':0})\ncheck('invalid zero',solve(['x'],0),{})\ncheck('too many folds',solve(['x'],2),{})\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-kfold-capacity","generated_at":"2026-09-30T16:48:07.548420+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 requested fold count is not checked against the number of distinct groups, so some requested folds receive no group.","sha256":"1809193a418bd46c5f71fc77f3b6b5be461b111a07b5b4948ef83de818b19721","title":"Dataset split: impossible fold requests silently produce an incomplete fold map · 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":27.57,"exit_code":1,"observations":[{"actual":{"a":0,"b":1,"c":0},"check":"balanced map","expected":{"a":0,"b":1,"c":0},"passed":true},{"actual":{"a":0,"b":1},"check":"duplicates count once","expected":{"a":0,"b":1},"passed":true},{"actual":{},"check":"empty rejected","expected":{},"passed":true},{"actual":{"x":0},"check":"single group","expected":{"x":0},"passed":true},{"actual":{},"check":"invalid zero","expected":{},"passed":true},{"actual":{"x":0},"check":"too many folds","expected":{},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"balanced map\", \"actual\": {\"a\": 0, \"b\": 1, \"c\": 0}, \"expected\": {\"a\": 0, \"b\": 1, \"c\": 0}, \"passed\": true}, {\"check\": \"duplicates count once\", \"actual\": {\"a\": 0, \"b\": 1}, \"expected\": {\"a\": 0, \"b\": 1}, \"passed\": true}, {\"check\": \"empty rejected\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"single group\", \"actual\": {\"x\": 0}, \"expected\": {\"x\": 0}, \"passed\": true}, {\"check\": \"invalid zero\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"too many folds\", \"actual\": {\"x\": 0}, \"expected\": {}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.302,"exit_code":1,"observations":[{"actual":{"a":0,"b":1,"c":0},"check":"balanced map","expected":{"a":0,"b":1,"c":0},"passed":true},{"actual":{"a":0,"b":1},"check":"duplicates count once","expected":{"a":0,"b":1},"passed":true},{"actual":{},"check":"empty rejected","expected":{},"passed":true},{"actual":{"x":0},"check":"single group","expected":{"x":0},"passed":true},{"actual":{"x":0},"check":"invalid zero","expected":{},"passed":false},{"actual":{"x":0},"check":"too many folds","expected":{},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"balanced map\", \"actual\": {\"a\": 0, \"b\": 1, \"c\": 0}, \"expected\": {\"a\": 0, \"b\": 1, \"c\": 0}, \"passed\": true}, {\"check\": \"duplicates count once\", \"actual\": {\"a\": 0, \"b\": 1}, \"expected\": {\"a\": 0, \"b\": 1}, \"passed\": true}, {\"check\": \"empty rejected\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"single group\", \"actual\": {\"x\": 0}, \"expected\": {\"x\": 0}, \"passed\": true}, {\"check\": \"invalid zero\", \"actual\": {\"x\": 0}, \"expected\": {}, \"passed\": false}, {\"check\": \"too many folds\", \"actual\": {\"x\": 0}, \"expected\": {}, \"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."}}