FA-98086 / Sequence batch packing / Open access
Packed positions count across segment boundaries · case 01
Packed positions count across segment boundaries.
ROOT CAUSE
Position indices are cumulative over a packed row rather than local to its segment.
THE FAILURE
Position indices are cumulative over a packed row rather than local to its segment.
Unsuccessful approach: One-based local positions still misalign every segment start.
Case contract
For each packed row of segment lengths, assign positions 0 through length-1 inside each segment, resetting at every boundary.
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(rows):
return [[p for total in [sum(row)] for p in range(total)] for row in rows]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('two segment reset', solve([[N,2]]), [list(range(N))+[0,1]])
check('empty batch', solve([]), [])
check('empty row', solve([[]]), [[]])
check('zero segment', solve([[0,N]]), [list(range(N))])
check('several boundaries', solve([[1,3,2]]), [[0,0,1,2,0,1]])
check('separate rows', solve([[2],[N]]), [[0,1],list(range(N))])
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 |
|---|---|---|---|
| two segment reset | [[0, 1, 2]] | [[0, 0, 1]] | Failed |
| empty batch | [] | [] | Passed |
| empty row | [[]] | [[]] | Passed |
| zero segment | [[0]] | [[0]] | Passed |
| several boundaries | [[0, 1, 2, 3, 4, 5]] | [[0, 0, 1, 2, 0, 1]] | Failed |
| separate rows | [[0, 1], [0]] | [[0, 1], [0]] | Passed |
SHA-256 / 9329a192c133cd7da5538f94719caafd424ba6a50645dbc9157191ffabc44b2d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
return [[p for length in row for p in range(1,length+1)] for row in rows]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('two segment reset', solve([[N,2]]), [list(range(N))+[0,1]])
check('empty batch', solve([]), [])
check('empty row', solve([[]]), [[]])
check('zero segment', solve([[0,N]]), [list(range(N))])
check('several boundaries', solve([[1,3,2]]), [[0,0,1,2,0,1]])
check('separate rows', solve([[2],[N]]), [[0,1],list(range(N))])
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 |
|---|---|---|---|
| two segment reset | [[1, 1, 2]] | [[0, 0, 1]] | Failed |
| empty batch | [] | [] | Passed |
| empty row | [[]] | [[]] | Passed |
| zero segment | [[1]] | [[0]] | Failed |
| several boundaries | [[1, 1, 2, 3, 1, 2]] | [[0, 0, 1, 2, 0, 1]] | Failed |
| separate rows | [[1, 2], [1]] | [[0, 1], [0]] | Failed |
SHA-256 / db47bef7f113f83fb94aa1b431f77549766984fc66f0a54dee9db282a5e45bf1
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.322254+00:00.
Case digest / 28ddf6356d26496695ab8fe2fdfb06b6a38662823ddd8ed2409436a22230b46d