FA-98056 / Sequence batch packing / Open access
Left padding marks padded prefix tokens as valid · case 01
Left padding marks padded prefix tokens as valid.
ROOT CAUSE
The validity mask is initialized as all valid, including left-padding slots.
THE FAILURE
The validity mask is initialized as all valid, including left-padding slots.
Unsuccessful approach: An off-by-one suffix includes a padding slot or exceeds the requested width.
Case contract
Left-pad tokens with zero to width and return paired binary validity mask, where only original token slots are one.
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):
pad=width-len(tokens); return [0]*pad+tokens, [1]*width
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('short prefix', solve([N],N+2), ([0]*(N+1)+[N],[0]*(N+1)+[1]))
check('full width', solve([1]*N,N), ([1]*N,[1]*N))
check('empty row', solve([],N), ([0]*N,[0]*N))
check('one slot', solve([N],1), ([N],[1]))
check('mixed row', solve([2,3],4), ([0,0,2,3],[0,0,1,1]))
check('zero width', solve([],0), ([],[]))
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 |
|---|---|---|---|
| short prefix | [[0, 0, 1], [1, 1, 1]] | [[0, 0, 1], [0, 0, 1]] | Failed |
| full width | [[1], [1]] | [[1], [1]] | Passed |
| empty row | [[0], [1]] | [[0], [0]] | Failed |
| one slot | [[1], [1]] | [[1], [1]] | Passed |
| mixed row | [[0, 0, 2, 3], [1, 1, 1, 1]] | [[0, 0, 2, 3], [0, 0, 1, 1]] | Failed |
| zero width | [[], []] | [[], []] | Passed |
SHA-256 / 4dd63d8df494b3c015db4df63f7cc5cf75b1a3813b9fa81cf98643988c60ecdf
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, width):
pad=width-len(tokens); return [0]*pad+tokens, [0]*pad+([1]*(len(tokens)+1))[:width]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('short prefix', solve([N],N+2), ([0]*(N+1)+[N],[0]*(N+1)+[1]))
check('full width', solve([1]*N,N), ([1]*N,[1]*N))
check('empty row', solve([],N), ([0]*N,[0]*N))
check('one slot', solve([N],1), ([N],[1]))
check('mixed row', solve([2,3],4), ([0,0,2,3],[0,0,1,1]))
check('zero width', solve([],0), ([],[]))
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 |
|---|---|---|---|
| short prefix | [[0, 0, 1], [0, 0, 1, 1]] | [[0, 0, 1], [0, 0, 1]] | Failed |
| full width | [[1], [1]] | [[1], [1]] | Passed |
| empty row | [[0], [0, 1]] | [[0], [0]] | Failed |
| one slot | [[1], [1]] | [[1], [1]] | Passed |
| mixed row | [[0, 0, 2, 3], [0, 0, 1, 1, 1]] | [[0, 0, 2, 3], [0, 0, 1, 1]] | Failed |
| zero width | [[], []] | [[], []] | Passed |
SHA-256 / bbb44dad81bb2ab8dec2fac90c049e717977068883d832411d19bad54462e9d5
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.895672+00:00.
Case digest / 73682cf99c5325414fef7b5dfd8226ee1bf6be7d9043333355d7332ce8cf02ce