FAILURE MAP
← Case archive

FA-99161 / Checkpoint tensor mapping / Open access

Checkpoint mapping: missing shard indices are not detected · case 01

missing shard indices are not detected.

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

ROOT CAUSE

Matching shard count does not prove that every required index appears once.

THE FAILURE

Matching shard count does not prove that every required index appears once.

Unsuccessful approach: Length-only validation accepts duplicate indices while omitting another shard.

Case contract

Return values in shard order only when indices are exactly 0 through count-1; otherwise return [] (also for count zero).

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(shards, count):
    return sum((v for i,v in sorted(shards)), [])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('gap', solve(*([[0, [3]], [2, [2]]], 3)), [])
check('complete', solve(*([[1, [1]], [0, [0]]], 2)), [0, 1])
check('empty zero', solve(*([], 0)), [])
check('unexpected', solve(*([[0, [3]]], 0)), [])
check('duplicate', solve(*([[0, [1]], [0, [2]]], 2)), [])
check('single', solve(*([[0, [3]]], 1)), [3])
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
gap[3, 2][]Failed
complete[0, 1][0, 1]Passed
empty zero[][]Passed
unexpected[3][]Failed
duplicate[1, 2][]Failed
single[3][3]Passed

SHA-256 / 0cc34992cc4d533676c753a4cb03b81a822c343ab6d6aa32e50b4614f8d0b239

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(shards, count):
    return sum((v for i,v in sorted(shards)), []) if len(shards)==count else []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('gap', solve(*([[0, [3]], [2, [2]]], 3)), [])
check('complete', solve(*([[1, [1]], [0, [0]]], 2)), [0, 1])
check('empty zero', solve(*([], 0)), [])
check('unexpected', solve(*([[0, [3]]], 0)), [])
check('duplicate', solve(*([[0, [1]], [0, [2]]], 2)), [])
check('single', solve(*([[0, [3]]], 1)), [3])
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
gap[][]Passed
complete[0, 1][0, 1]Passed
empty zero[][]Passed
unexpected[][]Passed
duplicate[1, 2][]Failed
single[3][3]Passed

SHA-256 / 2090ce9847154d48269d9cb2e50cff0f576107dfd5cbe82a6d6a5054e9eb3e32

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.244187+00:00.

Case digest / 0e8b49a8109a53ce3c341c05723dc7d4ecad44fd77121f050aeeb9d8c1724f34