FAILURE MAP
← Case archive

FA-97876 / Dataset split isolation / Open access

Dataset split: entity holdout selects a record instead of the whole entity · case 01

entity holdout selects a record instead of the whole entity.

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

ROOT CAUSE

The implementation takes one positional row as the holdout, ignoring entity membership and deterministic entity ordering.

THE FAILURE

The implementation takes one positional row as the holdout, ignoring entity membership and deterministic entity ordering.

Unsuccessful approach: Selecting only one record from the chosen entity leaves its other records on the training side.

Case contract

Rows [id,entity]; hold out the lexically greatest distinct entity and return its IDs sorted.

Why this case matters

This toy split allocator makes membership rules explicit for reproducible evaluation fixtures.

1 / The failure

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

N = 1
observations = []
def solve(rows):
    return sorted(i for i,e in rows[-1:])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('entity rows scattered',solve([['a','x'],['b','y'],['c','x']]),['b'])
check('empty',solve([]),[])
check('single entity',solve([['a','x'],['b','x']]),['a','b'])
check('lexical entity',solve([['z','z'],['a','a']]),['z'])
check('one row per entity',solve([['a','a'],['b','b']]),['b'])
check('duplicate IDs by entity',solve([['a','z'],['a','x']]),['a'])
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
entity rows scattered['c']['b']Failed
empty[][]Passed
single entity['b']['a', 'b']Failed
lexical entity['a']['z']Failed
one row per entity['b']['b']Passed
duplicate IDs by entity['a']['a']Passed

SHA-256 / 7055319ddb3cf55c1fa567159ff9fe6aca45384f60bee859a8e682a0a83104ed

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(rows):
    held=max((e for _,e in rows),default='')
    return sorted(i for i,e in rows if e==held)[:1]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('entity rows scattered',solve([['a','x'],['b','y'],['c','x']]),['b'])
check('empty',solve([]),[])
check('single entity',solve([['a','x'],['b','x']]),['a','b'])
check('lexical entity',solve([['z','z'],['a','a']]),['z'])
check('one row per entity',solve([['a','a'],['b','b']]),['b'])
check('duplicate IDs by entity',solve([['a','z'],['a','x']]),['a'])
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
entity rows scattered['b']['b']Passed
empty[][]Passed
single entity['a']['a', 'b']Failed
lexical entity['z']['z']Passed
one row per entity['b']['b']Passed
duplicate IDs by entity['a']['a']Passed

SHA-256 / 33b8502cec4c78a69ac197f6f234ce804b6a0a6e4768a533cee91b580b1fe04b

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 small in-memory records with self-contained contracts; no claim is made about production sampling quality. 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:06.688110+00:00.

Case digest / 1a6585e7e2d11a1689304a33d8d7b3bcff085f705bc1f236953b95a4664567c3