FA-97936 / Dataset split isolation / Open access
Dataset split: quota fill stops before an indivisible group that crosses the target · case 01
quota fill stops before an indivisible group that crosses the target.
ROOT CAUSE
A candidate group is accepted only when its full size fits below the row target, so an overshooting group is omitted.
THE FAILURE
A candidate group is accepted only when its full size fits below the row target, so an overshooting group is omitted.
Unsuccessful approach: Using a less-than-or-equal stop condition admits another group when the target has already been met exactly.
Case 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.
Why this case matters
This toy split allocator makes membership rules explicit for reproducible evaluation fixtures.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(groups, target):
out=[]; count=0
for g,rs in sorted(groups.items()):
if count+len(rs)<=target: out.append(g); count+=len(rs)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('overshoot whole group',solve({'a':['1','2','3'],'b':['4']},2),['a'])
check('exact target',solve({'a':['1'],'b':['2']},1),['a'])
check('zero target',solve({'a':['1']},0),[])
check('empty',solve({},3),[])
check('large then small',solve({'b':['b'],'a':['1','2']},3),['a','b'])
check('target beyond data',solve({'a':['a'],'b':['b']},9),['a','b'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| overshoot whole group | ['b'] | ['a'] | Failed |
| exact target | ['a'] | ['a'] | Passed |
| zero target | [] | [] | Passed |
| empty | [] | [] | Passed |
| large then small | ['a', 'b'] | ['a', 'b'] | Passed |
| target beyond data | ['a', 'b'] | ['a', 'b'] | Passed |
SHA-256 / c2f9defd5d3b4f33a276f780d4268dc1ebe9d8c3aa377aee5db03f7cc61eddbb
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(groups, target):
out=[]; count=0
for g,rs in sorted(groups.items(),key=lambda z:(-len(z[1]),z[0])):
if count<=target: out.append(g); count+=len(rs)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('overshoot whole group',solve({'a':['1','2','3'],'b':['4']},2),['a'])
check('exact target',solve({'a':['1'],'b':['2']},1),['a'])
check('zero target',solve({'a':['1']},0),[])
check('empty',solve({},3),[])
check('large then small',solve({'b':['b'],'a':['1','2']},3),['a','b'])
check('target beyond data',solve({'a':['a'],'b':['b']},9),['a','b'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| overshoot whole group | ['a'] | ['a'] | Passed |
| exact target | ['a', 'b'] | ['a'] | Failed |
| zero target | ['a'] | [] | Failed |
| empty | [] | [] | Passed |
| large then small | ['a', 'b'] | ['a', 'b'] | Passed |
| target beyond data | ['a', 'b'] | ['a', 'b'] | Passed |
SHA-256 / 5757e33eb64b1e2f3e321c4d6b32b585d79f841827212526c4da08db97ebc49f
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:07.548636+00:00.
Case digest / fd288cf73a30dec11a13d27b12f3105cbc9fbe655c0a3c92453b2ba0602ede8b