FA-45196 / Data systems / Open access
A full batch is flushed before following zero-byte rows can fit · case 01
A full batch is flushed before following zero-byte rows can fit.
ROOT CAUSE
row-batch-packing: A full batch is flushed before following zero-byte rows can fit.
THE FAILURE
row-batch-packing: A full batch is flushed before following zero-byte rows can fit.
Unsuccessful approach: Flushing exact-budget singleton rows still separates zero-byte followers that fit.
Case contract
Pack indivisible [id,size] rows into ordered batches under a positive byte budget. A row exceeding budget occupies its own batch. Flush before an overflowing row, permit exact fits, and omit empty batches.
Why this case matters
A bounded deterministic data engine model makes representation and changelog faults reproducible.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
rows,budget=d
batches=[]; current=[]; used=0
for ident,size in rows:
if current and used+size>budget:
batches.append(current); current=[]; used=0
current.append(ident); used+=size
if used>=budget:
batches.append(current); current=[]; used=0
if current: batches.append(current)
return batches
except (IndexError, KeyError, ValueError, StopIteration) as exc:
return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('exact fit', solve([[[1, 1], [2, 1]], 2]), [[1, 2]])
check('byte budget', solve([[[1, 2], [2, 2], [3, 1]], 3]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 2], [2, 2], [3, 1], [4, 1]], 3]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 4], [2, 0]], 3]), [[1], [2]])
check('full followed by zero', solve([[[1, 3], [2, 0]], 3]), [[1, 2]])
check('single partial', solve([[[1, 1]], 3]), [[1]])
check('no rows', solve([[], 3]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 1]), [[1, 2]])
elif N == 2:
check('exact fit', solve([[[1, 2], [2, 2]], 4]), [[1, 2]])
check('byte budget', solve([[[1, 4], [2, 4], [3, 2]], 6]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 4], [2, 4], [3, 2], [4, 2]], 6]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 8], [2, 0]], 6]), [[1], [2]])
check('full followed by zero', solve([[[1, 6], [2, 0]], 6]), [[1, 2]])
check('single partial', solve([[[1, 2]], 6]), [[1]])
check('no rows', solve([[], 6]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 2]), [[1, 2]])
elif N == 3:
check('exact fit', solve([[[1, 3], [2, 3]], 6]), [[1, 2]])
check('byte budget', solve([[[1, 6], [2, 6], [3, 3]], 9]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 6], [2, 6], [3, 3], [4, 3]], 9]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 12], [2, 0]], 9]), [[1], [2]])
check('full followed by zero', solve([[[1, 9], [2, 0]], 9]), [[1, 2]])
check('single partial', solve([[[1, 3]], 9]), [[1]])
check('no rows', solve([[], 9]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 3]), [[1, 2]])
elif N == 4:
check('exact fit', solve([[[1, 4], [2, 4]], 8]), [[1, 2]])
check('byte budget', solve([[[1, 8], [2, 8], [3, 4]], 12]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 8], [2, 8], [3, 4], [4, 4]], 12]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 16], [2, 0]], 12]), [[1], [2]])
check('full followed by zero', solve([[[1, 12], [2, 0]], 12]), [[1, 2]])
check('single partial', solve([[[1, 4]], 12]), [[1]])
check('no rows', solve([[], 12]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 4]), [[1, 2]])
elif N == 5:
check('exact fit', solve([[[1, 5], [2, 5]], 10]), [[1, 2]])
check('byte budget', solve([[[1, 10], [2, 10], [3, 5]], 15]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 10], [2, 10], [3, 5], [4, 5]], 15]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 20], [2, 0]], 15]), [[1], [2]])
check('full followed by zero', solve([[[1, 15], [2, 0]], 15]), [[1, 2]])
check('single partial', solve([[[1, 5]], 15]), [[1]])
check('no rows', solve([[], 15]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 5]), [[1, 2]])
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 |
|---|---|---|---|
| exact fit | [[1, 2]] | [[1, 2]] | Passed |
| byte budget | [[1], [2, 3]] | [[1], [2, 3]] | Passed |
| reset after flush | [[1], [2, 3], [4]] | [[1], [2, 3], [4]] | Passed |
| oversize and zero | [[1], [2]] | [[1], [2]] | Passed |
| full followed by zero | [[1], [2]] | [[1, 2]] | Failed |
| single partial | [[1]] | [[1]] | Passed |
| no rows | [] | [] | Passed |
| zero-sized rows | [[1, 2]] | [[1, 2]] | Passed |
SHA-256 / d397c2b30f98c50fce1a43ae781c13963513a3c3cc7994cb9c4a5555eaf23475
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
rows,budget=d
batches=[]; current=[]; used=0
for ident,size in rows:
if current and used+size>budget:
batches.append(current); current=[]; used=0
current.append(ident); used+=size
if size>=budget:
batches.append(current); current=[]; used=0
if current: batches.append(current)
return batches
except (IndexError, KeyError, ValueError, StopIteration) as exc:
return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('exact fit', solve([[[1, 1], [2, 1]], 2]), [[1, 2]])
check('byte budget', solve([[[1, 2], [2, 2], [3, 1]], 3]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 2], [2, 2], [3, 1], [4, 1]], 3]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 4], [2, 0]], 3]), [[1], [2]])
check('full followed by zero', solve([[[1, 3], [2, 0]], 3]), [[1, 2]])
check('single partial', solve([[[1, 1]], 3]), [[1]])
check('no rows', solve([[], 3]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 1]), [[1, 2]])
elif N == 2:
check('exact fit', solve([[[1, 2], [2, 2]], 4]), [[1, 2]])
check('byte budget', solve([[[1, 4], [2, 4], [3, 2]], 6]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 4], [2, 4], [3, 2], [4, 2]], 6]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 8], [2, 0]], 6]), [[1], [2]])
check('full followed by zero', solve([[[1, 6], [2, 0]], 6]), [[1, 2]])
check('single partial', solve([[[1, 2]], 6]), [[1]])
check('no rows', solve([[], 6]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 2]), [[1, 2]])
elif N == 3:
check('exact fit', solve([[[1, 3], [2, 3]], 6]), [[1, 2]])
check('byte budget', solve([[[1, 6], [2, 6], [3, 3]], 9]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 6], [2, 6], [3, 3], [4, 3]], 9]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 12], [2, 0]], 9]), [[1], [2]])
check('full followed by zero', solve([[[1, 9], [2, 0]], 9]), [[1, 2]])
check('single partial', solve([[[1, 3]], 9]), [[1]])
check('no rows', solve([[], 9]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 3]), [[1, 2]])
elif N == 4:
check('exact fit', solve([[[1, 4], [2, 4]], 8]), [[1, 2]])
check('byte budget', solve([[[1, 8], [2, 8], [3, 4]], 12]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 8], [2, 8], [3, 4], [4, 4]], 12]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 16], [2, 0]], 12]), [[1], [2]])
check('full followed by zero', solve([[[1, 12], [2, 0]], 12]), [[1, 2]])
check('single partial', solve([[[1, 4]], 12]), [[1]])
check('no rows', solve([[], 12]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 4]), [[1, 2]])
elif N == 5:
check('exact fit', solve([[[1, 5], [2, 5]], 10]), [[1, 2]])
check('byte budget', solve([[[1, 10], [2, 10], [3, 5]], 15]), [[1], [2, 3]])
check('reset after flush', solve([[[1, 10], [2, 10], [3, 5], [4, 5]], 15]), [[1], [2, 3], [4]])
check('oversize and zero', solve([[[1, 20], [2, 0]], 15]), [[1], [2]])
check('full followed by zero', solve([[[1, 15], [2, 0]], 15]), [[1, 2]])
check('single partial', solve([[[1, 5]], 15]), [[1]])
check('no rows', solve([[], 15]), [])
check('zero-sized rows', solve([[[1, 0], [2, 0]], 5]), [[1, 2]])
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 |
|---|---|---|---|
| exact fit | [[1, 2]] | [[1, 2]] | Passed |
| byte budget | [[1], [2, 3]] | [[1], [2, 3]] | Passed |
| reset after flush | [[1], [2, 3], [4]] | [[1], [2, 3], [4]] | Passed |
| oversize and zero | [[1], [2]] | [[1], [2]] | Passed |
| full followed by zero | [[1], [2]] | [[1, 2]] | Failed |
| single partial | [[1]] | [[1]] | Passed |
| no rows | [] | [] | Passed |
| zero-sized rows | [[1, 2]] | [[1, 2]] | Passed |
SHA-256 / f9651683adc5fce4491ae414568ef79a69d92bde7375b10ea55ee303b4d11bfa
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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
Offline stipulated semantics over valid small inputs; no performance, concurrency, or production-engine conformance claim. 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-29T14:44:19.851434+00:00.
Case digest / 4000cca427297df24122dd3bdfb2baa8eb579d922540fb8d406d40fcaba5b7ba