FAILURE MAP
← Case archive

FA-97981 / Training label alignment / Open access

Conflicting duplicate labels are resolved by last-write order · case 01

Conflicting duplicate labels are resolved by last-write order.

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

ROOT CAUSE

Repeated records overwrite earlier labels without checking agreement.

THE FAILURE

Repeated records overwrite earlier labels without checking agreement.

Unsuccessful approach: Keeping the first value avoids last-write behavior but silently accepts the same conflict.

Case contract

Records are [example_id,label]. Return ordered [id,label] for IDs with a single consistent label; omit IDs with conflicts.

Why this case matters

A small deterministic training-data operation makes label ownership and ordering explicit.

1 / The failure

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

N = 1
observations = []
def solve(records):
    d={i:y for i,y in records}
    return [[i,y] for i,y in d.items()]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('agreeing repeats collapse',solve([['a',N],['a',N]]),[['a',N]])
check('conflict omitted',solve([['a',N],['a',N+1],['b',0]]),[['b',0]])
check('empty',solve([]),[])
check('single record',solve([['x',N]]),[['x',N]])
check('late conflict',solve([['x',1],['y',2],['x',3]]),[['y',2]])
check('zero label consistency',solve([['z',0],['z',0]]),[['z',0]])
check('distinct IDs same label',solve([['a',N],['b',N]]),[['a',N],['b',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 fixtureActualExpectedOutcome
agreeing repeats collapse[['a', 1]][['a', 1]]Passed
conflict omitted[['a', 2], ['b', 0]][['b', 0]]Failed
empty[][]Passed
single record[['x', 1]][['x', 1]]Passed
late conflict[['x', 3], ['y', 2]][['y', 2]]Failed
zero label consistency[['z', 0]][['z', 0]]Passed
distinct IDs same label[['a', 1], ['b', 1]][['a', 1], ['b', 1]]Passed

SHA-256 / 94433033ca2ecd6fd312a7072d3aa4621e2f5c5d218669fbf0466d8b2ece267f

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(records):
    d={}
    for i,y in records: d.setdefault(i,y)
    return [[i,y] for i,y in d.items()]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('agreeing repeats collapse',solve([['a',N],['a',N]]),[['a',N]])
check('conflict omitted',solve([['a',N],['a',N+1],['b',0]]),[['b',0]])
check('empty',solve([]),[])
check('single record',solve([['x',N]]),[['x',N]])
check('late conflict',solve([['x',1],['y',2],['x',3]]),[['y',2]])
check('zero label consistency',solve([['z',0],['z',0]]),[['z',0]])
check('distinct IDs same label',solve([['a',N],['b',N]]),[['a',N],['b',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 fixtureActualExpectedOutcome
agreeing repeats collapse[['a', 1]][['a', 1]]Passed
conflict omitted[['a', 1], ['b', 0]][['b', 0]]Failed
empty[][]Passed
single record[['x', 1]][['x', 1]]Passed
late conflict[['x', 1], ['y', 2]][['y', 2]]Failed
zero label consistency[['z', 0]][['z', 0]]Passed
distinct IDs same label[['a', 1], ['b', 1]][['a', 1], ['b', 1]]Passed

SHA-256 / d5cdcf91e9e6f79db3d366c88d48fce9fb6670b896fcd8a54d36f6b82b4a5fb5

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 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

IDs and labels are hashable and may use any value other than identity semantics. 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:07.975706+00:00.

Case digest / 0afd9c0dbd6062442ed1bf96abccefcc8520c1dacdced38f31d5aec34c10e703