FAILURE MAP
← Case archive

FA-97916 / Dataset split isolation / Open access

Dataset split: exact multiples emit an empty trailing block · case 01

exact multiples emit an empty trailing block.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The range includes a start at n when n is exactly divisible by width, creating a zero-length block.

THE FAILURE

The range includes a start at n when n is exactly divisible by width, creating a zero-length block.

Unsuccessful approach: Reducing each block end by one avoids the empty block but leaves uncovered indices.

Case contract

For n items and positive width w, return [start,end) blocks covering each index once.

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(n, width):
    return [[s,min(n,s+width)] for s in range(0,n+1,width)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('tail block',solve(5,3),[[0,3],[3,5]])
check('exact multiple',solve(6,3),[[0,3],[3,6]])
check('singleton',solve(1,N),[[0,1]])
check('empty sequence',solve(0,N),[])
check('width one',solve(3,1),[[0,1],[1,2],[2,3]])
check('shorter than width',solve(2,4),[[0,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 fixtureActualExpectedOutcome
tail block[[0, 3], [3, 5]][[0, 3], [3, 5]]Passed
exact multiple[[0, 3], [3, 6], [6, 6]][[0, 3], [3, 6]]Failed
singleton[[0, 1], [1, 1]][[0, 1]]Failed
empty sequence[[0, 0]][]Failed
width one[[0, 1], [1, 2], [2, 3], [3, 3]][[0, 1], [1, 2], [2, 3]]Failed
shorter than width[[0, 2]][[0, 2]]Passed

SHA-256 / e627eedf6c33896406c8ce6f11b0d6ac0f02ba6fadf56fa5e1cd42214871e6e2

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(n, width):
    return [[s,min(n,s+width-1)] for s in range(0,n,width)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('tail block',solve(5,3),[[0,3],[3,5]])
check('exact multiple',solve(6,3),[[0,3],[3,6]])
check('singleton',solve(1,N),[[0,1]])
check('empty sequence',solve(0,N),[])
check('width one',solve(3,1),[[0,1],[1,2],[2,3]])
check('shorter than width',solve(2,4),[[0,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 fixtureActualExpectedOutcome
tail block[[0, 2], [3, 5]][[0, 3], [3, 5]]Failed
exact multiple[[0, 2], [3, 5]][[0, 3], [3, 6]]Failed
singleton[[0, 0]][[0, 1]]Failed
empty sequence[][]Passed
width one[[0, 0], [1, 1], [2, 2]][[0, 1], [1, 2], [2, 3]]Failed
shorter than width[[0, 2]][[0, 2]]Passed

SHA-256 / 04f73418868dd9be734f53e75864405ae027db38235fcf54a115ea7397e91bcb

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.117292+00:00.

Case digest / 321458e15848b1d857bcf6b77e0c28eb84b5d07858962a7e43f905f22487e1d8