FA-98106 / Sequence batch packing / Open access
Round-robin packing consumes one source unevenly · case 01
Round-robin packing consumes one source unevenly.
ROOT CAUSE
Flattening drains one stream completely before visiting the next.
THE FAILURE
Flattening drains one stream completely before visiting the next.
Unsuccessful approach: The attempted bound skips the last token in every stream.
Case contract
Interleave source token lists one token per source per pass, skipping exhausted sources, until all are empty.
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(streams):
return [x for stream in streams for x in stream]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a=[N,10*N]; b=[2*N]
check('alternating', solve([a,b]), [N,2*N,10*N])
check('empty sources', solve([[],[]]), [])
check('single source', solve([[N]]), [N])
check('uneven tails', solve([[1,2,3],[4]]), [1,4,2,3])
check('three sources', solve([[1],[2,3],[4]]), [1,2,4,3])
check('no sources', solve([]), [])
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 |
|---|---|---|---|
| alternating | [1, 10, 2] | [1, 2, 10] | Failed |
| empty sources | [] | [] | Passed |
| single source | [1] | [1] | Passed |
| uneven tails | [1, 2, 3, 4] | [1, 4, 2, 3] | Failed |
| three sources | [1, 2, 3, 4] | [1, 2, 4, 3] | Failed |
| no sources | [] | [] | Passed |
SHA-256 / 95bfddee02d9e1a931c9d5aa3dd4d0044379598ab2f6c3b822d960a7842ad0b8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(streams):
return [stream[i] for i in range(max(map(len,streams),default=0)) for stream in streams if len(stream)>i+1]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a=[N,10*N]; b=[2*N]
check('alternating', solve([a,b]), [N,2*N,10*N])
check('empty sources', solve([[],[]]), [])
check('single source', solve([[N]]), [N])
check('uneven tails', solve([[1,2,3],[4]]), [1,4,2,3])
check('three sources', solve([[1],[2,3],[4]]), [1,2,4,3])
check('no sources', solve([]), [])
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 |
|---|---|---|---|
| alternating | [1] | [1, 2, 10] | Failed |
| empty sources | [] | [] | Passed |
| single source | [] | [1] | Failed |
| uneven tails | [1, 2] | [1, 4, 2, 3] | Failed |
| three sources | [2] | [1, 2, 4, 3] | Failed |
| no sources | [] | [] | Passed |
SHA-256 / 626940ed990ab96bb98fd97b368ece32a80fd48bb637ba5daf4523159d9843e6
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.321964+00:00.
Case digest / 6608f30c0d9bba5afdb291281c30da9dfff4793ace742868a36674b2c49e85f7