FAILURE MAP
← Case archive

FA-99331 / Distributed training aggregation / Open access

Equal-offset shard fragments retain arrival order · case 01

Equal-offset shard fragments retain arrival order.

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

ROOT CAUSE

Shard index ties need a deterministic secondary ownership key.

THE FAILURE

Shard index ties need a deterministic secondary ownership key.

Unsuccessful approach: Sorting tied fragments by payload length ignores stable owner IDs and can preserve the wrong arrival order.

Case contract

Rows [shard_index,worker_id,values]; sort by both keys and concatenate.

Why this case matters

A toy distributed-training contract makes replica and shard contribution rules explicit without claiming framework compatibility or performance.

1 / The failure

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

N = 1
observations = []
def solve(rows):
    return [v for s,w,vs in sorted(rows,key=lambda r:r[0]) for v in vs]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('tie arrival reversed',solve([[0,'b',['b']],[0,'a',['a']]]),['a','b'])
check('different shard first',solve([[1,'a',['c']],[0,'z',['a']]]),['a','c'])
check('empty',solve([]),[])
check('singleton',solve([[N,'w',[N]]]),[N])
check('width cannot order ties',solve([[0,'z',[1,2]],[0,'a',[3]]]),[3,1,2])
check('three owners',solve([[2,'b',['c']],[1,'a',['b']],[0,'a',['a']]]),['a','b','c'])
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
tie arrival reversed['b', 'a']['a', 'b']Failed
different shard first['a', 'c']['a', 'c']Passed
empty[][]Passed
singleton[1][1]Passed
width cannot order ties[1, 2, 3][3, 1, 2]Failed
three owners['a', 'b', 'c']['a', 'b', 'c']Passed

SHA-256 / 785bfcdff336edaaf09ef4606a4b1a1061b529fdc58fbd83a1f8bd88a0f099fb

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(rows):
    return [v for s,w,vs in sorted(rows,key=lambda r:(r[0],len(r[2]))) for v in vs]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('tie arrival reversed',solve([[0,'b',['b']],[0,'a',['a']]]),['a','b'])
check('different shard first',solve([[1,'a',['c']],[0,'z',['a']]]),['a','c'])
check('empty',solve([]),[])
check('singleton',solve([[N,'w',[N]]]),[N])
check('width cannot order ties',solve([[0,'z',[1,2]],[0,'a',[3]]]),[3,1,2])
check('three owners',solve([[2,'b',['c']],[1,'a',['b']],[0,'a',['a']]]),['a','b','c'])
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
tie arrival reversed['b', 'a']['a', 'b']Failed
different shard first['a', 'c']['a', 'c']Passed
empty[][]Passed
singleton[1][1]Passed
width cannot order ties[3, 1, 2][3, 1, 2]Passed
three owners['a', 'b', 'c']['a', 'b', 'c']Passed

SHA-256 / cba68676610366af122f76c4caa0d3b92291e780b6ba5ab3ada556ca3cbd578c

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 materialized Python values from a fixed toy collective; no transport, failure recovery, optimizer state, or real model behavior is represented. 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:23.079372+00:00.

Case digest / 61495cfbb48a8bed8a560289f8db42af6d94dcd3364e8a0cbef0f1ffe3edbf67