FA-98131 / Sequence batch packing / Open access
Flattened packed tokens retain the wrong owner indices · case 01
Flattened packed tokens retain the wrong owner indices.
ROOT CAUSE
Owner IDs are shifted to one-based values and can mismatch other row-local metadata.
THE FAILURE
Owner IDs are shifted to one-based values and can mismatch other row-local metadata.
Unsuccessful approach: Dropping the final owner marker per sequence only passes for empty inputs.
Case contract
Flatten sequences in order and return parallel zero-based sequence-owner IDs for every token.
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):
return [x for s in sequences for x in s], [i+1 for i,s in enumerate(sequences) for _ in s]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a=[N,2]; b=[3]*N
check('ownership lengths', solve([a,b]), (a+b,[0]*2+[1]*N))
check('empty', solve([]), ([],[]))
check('empty segment', solve([[],[7]]), ([7],[1]))
check('single segment', solve([[N]*N]), ([N]*N,[0]*N))
check('three owners', solve([[1],[2,3],[4]]), ([1,2,3,4],[0,1,1,2]))
check('equal values', solve([[1],[1]]), ([1,1],[0,1]))
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 |
|---|---|---|---|
| ownership lengths | [[1, 2, 3], [1, 1, 2]] | [[1, 2, 3], [0, 0, 1]] | Failed |
| empty | [[], []] | [[], []] | Passed |
| empty segment | [[7], [2]] | [[7], [1]] | Failed |
| single segment | [[1], [1]] | [[1], [0]] | Failed |
| three owners | [[1, 2, 3, 4], [1, 2, 2, 3]] | [[1, 2, 3, 4], [0, 1, 1, 2]] | Failed |
| equal values | [[1, 1], [1, 2]] | [[1, 1], [0, 1]] | Failed |
SHA-256 / a13207a23677af110145e36acd7f6c704c0f3185b07702a6f24502984a808468
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sequences):
return [x for s in sequences for x in s], [i for i,s in enumerate(sequences) for _ in range(max(0,len(s)-1))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a=[N,2]; b=[3]*N
check('ownership lengths', solve([a,b]), (a+b,[0]*2+[1]*N))
check('empty', solve([]), ([],[]))
check('empty segment', solve([[],[7]]), ([7],[1]))
check('single segment', solve([[N]*N]), ([N]*N,[0]*N))
check('three owners', solve([[1],[2,3],[4]]), ([1,2,3,4],[0,1,1,2]))
check('equal values', solve([[1],[1]]), ([1,1],[0,1]))
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 |
|---|---|---|---|
| ownership lengths | [[1, 2, 3], [0]] | [[1, 2, 3], [0, 0, 1]] | Failed |
| empty | [[], []] | [[], []] | Passed |
| empty segment | [[7], []] | [[7], [1]] | Failed |
| single segment | [[1], []] | [[1], [0]] | Failed |
| three owners | [[1, 2, 3, 4], [1]] | [[1, 2, 3, 4], [0, 1, 1, 2]] | Failed |
| equal values | [[1, 1], []] | [[1, 1], [0, 1]] | Failed |
SHA-256 / 2bb49053f22b86cc16a51a274d8bd386fa481e1477e3da473120469472294e32
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:09.757740+00:00.
Case digest / 5a1c7a9f7c79cf7f5166b83a498e637c69326c3be3abfcff0ea7aab560d23c26