FAILURE MAP
← Case archive

FA-99191 / Checkpoint tensor mapping / Open access

Checkpoint mapping: row shard offset ignores preceding shard lengths · case 01

row shard offset ignores preceding shard lengths.

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

ROOT CAUSE

The local shard length is returned instead of its global starting offset.

THE FAILURE

The local shard length is returned instead of its global starting offset.

Unsuccessful approach: Including the current extent returns the shard end offset.

Case contract

Return the sum of lengths before a valid shard index; invalid index returns -1.

Why this case matters

A bounded offline model of checkpoint tensor bookkeeping in a training workflow.

1 / The failure

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

N = 1
observations = []
def solve(lengths, index):
    return lengths[index] if 0<=index<len(lengths) else -1
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('second', solve(*([3, 3, 4], 1)), 3)
check('first', solve(*([3, 3], 0)), 0)
check('last', solve(*([2, 3, 3], 2)), 5)
check('empty', solve(*([], 0)), -1)
check('out of range', solve(*([3], 1)), -1)
check('zero length', solve(*([0, 3], 1)), 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 fixtureActualExpectedOutcome
second33Passed
first30Failed
last35Failed
empty-1-1Passed
out of range-1-1Passed
zero length30Failed

SHA-256 / 8990cb44bcc2c7a42369dc0371da66fe56a7453ea2177e563aa5996ed4a87ffe

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(lengths, index):
    return sum(lengths[:index+1]) if 0<=index<len(lengths) else -1
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('second', solve(*([3, 3, 4], 1)), 3)
check('first', solve(*([3, 3], 0)), 0)
check('last', solve(*([2, 3, 3], 2)), 5)
check('empty', solve(*([], 0)), -1)
check('out of range', solve(*([3], 1)), -1)
check('zero length', solve(*([0, 3], 1)), 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 fixtureActualExpectedOutcome
second63Failed
first30Failed
last85Failed
empty-1-1Passed
out of range-1-1Passed
zero length30Failed

SHA-256 / 64ac2cbd9e8a424842ca4d9121f914d03a49729fdb9cf178278ffc4fcc30054e

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 already decoded Python values; this toy contract makes no claim about a framework, file format, or production checkpoint. 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:21.243162+00:00.

Case digest / 781cfec478b8d009fbd8c69e48fea0368b0f39fccf140bb1c9cc1ff297d69be8