FAILURE MAP
← Case archive

FA-98071 / Sequence batch packing / Open access

Fixed-width chunks use floor instead of ceiling count · case 01

Fixed-width chunks use floor instead of ceiling count.

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

ROOT CAUSE

The final range endpoint is rounded down to a whole number of chunks.

THE FAILURE

The final range endpoint is rounded down to a whole number of chunks.

Unsuccessful approach: Ceiling the range and then adding one creates an empty trailing chunk on exact multiples.

Case contract

Split tokens into consecutive chunks of at most positive width; preserve a final partial chunk.

Why this case matters

This deterministic toy packing rule models a common boundary in preparing bounded training sequences.

1 / The failure

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

N = 1
observations = []
def solve(tokens, width):
    return [tokens[i:i+width] for i in range(0,(len(tokens)//width)*width,width)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
data=list(range(N+1))
check('partial tail', solve(data,N), [data[:N],data[N:]])
check('exact multiple', solve(list(range(2*N)),N), [list(range(N)),list(range(N,2*N))])
check('short singleton', solve([N],N+1), [[N]])
check('empty', solve([],N), [])
check('unit chunks', solve([1,2,3],1), [[1],[2],[3]])
check('single width', solve([4],4), [[4]])
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
partial tail[[0], [1]][[0], [1]]Passed
exact multiple[[0], [1]][[0], [1]]Passed
short singleton[][[1]]Failed
empty[][]Passed
unit chunks[[1], [2], [3]][[1], [2], [3]]Passed
single width[][[4]]Failed

SHA-256 / 34cc1dfbc8815f7057477a3f45d58ab08783027db506063f39ef719831ebbdec

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(tokens, width):
    return [tokens[i:i+width] for i in range(0,((len(tokens)+width-1)//width+1)*width,width)] if tokens else []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
data=list(range(N+1))
check('partial tail', solve(data,N), [data[:N],data[N:]])
check('exact multiple', solve(list(range(2*N)),N), [list(range(N)),list(range(N,2*N))])
check('short singleton', solve([N],N+1), [[N]])
check('empty', solve([],N), [])
check('unit chunks', solve([1,2,3],1), [[1],[2],[3]])
check('single width', solve([4],4), [[4]])
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
partial tail[[0], [1], []][[0], [1]]Failed
exact multiple[[0], [1], []][[0], [1]]Failed
short singleton[[1], []][[1]]Failed
empty[][]Passed
unit chunks[[1], [2], [3], []][[1], [2], [3]]Failed
single width[[4], []][[4]]Failed

SHA-256 / a60e67532eb064a48156237dec263c9e880875edb3b2bce8b23045d3fa3484ac

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 short integer-token lists under the stated toy contract; results do not claim compatibility with a specific training framework. 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:08.895812+00:00.

Case digest / ac27fa895c7d1194ec4189e74cb87edb7681b70cf7acbdc2ae3eea8609169af9