FAILURE MAP
← Case archive

FA-98046 / Sequence batch packing / Open access

Oversized sequences are split into artificial chunks · case 01

Oversized sequences are split into artificial chunks.

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

ROOT CAUSE

The builder splits an indivisible oversized sequence into capacity-sized token pieces.

THE FAILURE

The builder splits an indivisible oversized sequence into capacity-sized token pieces.

Unsuccessful approach: Truncating the oversized item respects the numeric bound but changes its content.

Case contract

Keep each sequence intact and place it alone if its length exceeds capacity; all other sequences use ordered greedy packing.

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(sequences, capacity):
    bins=[]; cur=[]; used=0
    for s in sequences:
        if len(s)>capacity and capacity>0:
            if cur: bins.append(cur); cur=[]; used=0
            bins.extend([[s[i:i+capacity]] for i in range(0,len(s),capacity)])
            continue
        if cur and used+len(s)>capacity: bins.append(cur); cur=[]; used=0
        cur.append(s); used+=len(s)
    if cur: bins.append(cur)
    return bins
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
s=[N]* (N+1); a=[1]*N
check('oversize preserved', solve([s],N), [[s]])
check('oversize separated', solve([a,s,a],N), [[a],[s],[a]])
check('exact capacity', solve([a],N), [[a]])
check('empty input', solve([],N), [])
check('zero capacity empty sequence', solve([[]],0), [[[]]])
check('two normal fit', solve([[1],[2]],N+1), [[[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 fixtureActualExpectedOutcome
oversize preserved[[[1]], [[1]]][[[1, 1]]]Failed
oversize separated[[[1]], [[1]], [[1]], [[1]]][[[1]], [[1, 1]], [[1]]]Failed
exact capacity[[[1]]][[[1]]]Passed
empty input[][]Passed
zero capacity empty sequence[[[]]][[[]]]Passed
two normal fit[[[1], [2]]][[[1], [2]]]Passed

SHA-256 / 400462c5f8b5d642aa4d2943198b051cf3f67997706947fc427b36402448183e

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(sequences, capacity):
    bins=[]; cur=[]; used=0
    for s in sequences:
        if cur and used+len(s)>capacity: bins.append(cur); cur=[]; used=0
        cur.append(s[:capacity]); used+=min(len(s),capacity)
    if cur: bins.append(cur)
    return bins
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
s=[N]* (N+1); a=[1]*N
check('oversize preserved', solve([s],N), [[s]])
check('oversize separated', solve([a,s,a],N), [[a],[s],[a]])
check('exact capacity', solve([a],N), [[a]])
check('empty input', solve([],N), [])
check('zero capacity empty sequence', solve([[]],0), [[[]]])
check('two normal fit', solve([[1],[2]],N+1), [[[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 fixtureActualExpectedOutcome
oversize preserved[[[1]]][[[1, 1]]]Failed
oversize separated[[[1]], [[1]], [[1]]][[[1]], [[1, 1]], [[1]]]Failed
exact capacity[[[1]]][[[1]]]Passed
empty input[][]Passed
zero capacity empty sequence[[[]]][[[]]]Passed
two normal fit[[[1], [2]]][[[1], [2]]]Passed

SHA-256 / 22d76e600708aec880aeab5d5eec9e5375fa413dd13259a354ff7e491364b250

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

Case digest / a6530ac5433d8935cca0d27c414aaf07a8d3f6598d342adbb1234022927cf979