FAILURE MAP
← Case archive

FA-11901 / Scientific pipeline provenance / Open access

An aliquot is credited to its immediate tube instead of its specimen · case 01

An aliquot is credited to its immediate tube instead of its specimen.

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

ROOT CAUSE

One lineage hop is assumed sufficient.

VERIFIED REPAIR

Follow parent links until the source specimen, detecting cycles.

Unsuccessful approach: Following exactly two links still truncates deeper preparation chains.

Case contract

Return the root ID for an acyclic parent mapping; return cycle if a node repeats. Missing parent means a source root.

Why this case matters

A deterministic offline model of scientific workflow bookkeeping; the fixtures test provenance contracts without modeling instruments or biological inference.

1 / The failure

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

N = 1
observations = []
def solve(sample, parents):
    return parents.get(sample, sample)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
root='specimen'+str(N)
check('three preparation steps', solve('c', {'c':'b','b':'a','a':root}), root)
check('source specimen', solve(root, {}), root)
check('single aliquot', solve('a', {'a':root}), root)
check('two aliquots', solve('b', {'b':'a','a':root}), root)
check('self cycle', solve('a', {'a':'a'}), 'cycle')
check('multi tube cycle', solve('a', {'a':'b','b':'a'}), 'cycle')
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
three preparation stepsbspecimen1Failed
source specimenspecimen1specimen1Passed
single aliquotspecimen1specimen1Passed
two aliquotsaspecimen1Failed
self cycleacycleFailed
multi tube cyclebcycleFailed

SHA-256 / 08f1e99e1e6ce2345dd09da89cb23a18e7dcd1c751484828e4481d2624626886

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(sample, parents):
    return parents.get(parents.get(sample,sample),parents.get(sample,sample))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
root='specimen'+str(N)
check('three preparation steps', solve('c', {'c':'b','b':'a','a':root}), root)
check('source specimen', solve(root, {}), root)
check('single aliquot', solve('a', {'a':root}), root)
check('two aliquots', solve('b', {'b':'a','a':root}), root)
check('self cycle', solve('a', {'a':'a'}), 'cycle')
check('multi tube cycle', solve('a', {'a':'b','b':'a'}), 'cycle')
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
three preparation stepsaspecimen1Failed
source specimenspecimen1specimen1Passed
single aliquotspecimen1specimen1Passed
two aliquotsspecimen1specimen1Passed
self cycleacycleFailed
multi tube cycleacycleFailed

SHA-256 / 689a8f320901a9fc12e0b63b418380af0d60557a2812f1ff56cde35bc841bdbd

3 / The verified repair

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

N = 1
observations = []
def solve(sample, parents):
    seen=set()
    while sample in parents:
        if sample in seen: return 'cycle'
        seen.add(sample)
        sample=parents[sample]
    return sample
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
root='specimen'+str(N)
check('three preparation steps', solve('c', {'c':'b','b':'a','a':root}), root)
check('source specimen', solve(root, {}), root)
check('single aliquot', solve('a', {'a':root}), root)
check('two aliquots', solve('b', {'b':'a','a':root}), root)
check('self cycle', solve('a', {'a':'a'}), 'cycle')
check('multi tube cycle', solve('a', {'a':'b','b':'a'}), 'cycle')
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
three preparation stepsspecimen1specimen1Passed
source specimenspecimen1specimen1Passed
single aliquotspecimen1specimen1Passed
two aliquotsspecimen1specimen1Passed
self cyclecyclecyclePassed
multi tube cyclecyclecyclePassed

SHA-256 / eecda1626be45def5f9184cdf73f5fdc2c4abda36a70ecc9e8b53cfef0567e36

Verification & scope

In-memory symbolic records only; no instrument, assay, or production workflow validation. 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-29T14:38:52.016935+00:00.

Case digest / 63466ec062b93cb360cf51fbe565fdb24aad7d22790054eea629d948673d4425