FAILURE MAP
← Case archive

FA-12406 / Laboratory measurement reporting / Open access

Calibration lookup borrows coefficients from another matrix · case 01

Calibration lookup borrows coefficients from another matrix.

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

ROOT CAUSE

Calibration records are indexed by lot alone despite matrix-specific fits.

THE FAILURE

Calibration records are indexed by lot alone despite matrix-specific fits.

Unsuccessful approach: Filtering by matrix alone fixes one collision but can borrow a different lot.

Case contract

Given unique [lot,matrix,slope] records, return the slope for an exact pair or None. No fallback between lots or matrices.

Why this case matters

A deterministic synthetic laboratory reporting model isolates a software metadata contract; it is not a clinical procedure.

1 / The failure

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

N = 1
observations = []
def solve(records, lot, matrix):
    return next((s for l,m,s in records if l == lot), None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = [('A','water',N),('A','soil',N+2),('B','soil',N+4)]
check('same lot different matrix', solve(r,'A','soil'), N+2)
check('same matrix different lot', solve(r,'B','soil'), N+4)
check('missing pair', solve(r,'B','water'), None)
check('first exact pair', solve(r,'A','water'), N)
check('unknown lot', solve(r,'C','soil'), None)
check('empty calibration table', solve([], 'A','water'), None)
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
same lot different matrix13Failed
same matrix different lot55Passed
missing pair5NoneFailed
first exact pair11Passed
unknown lotNoneNonePassed
empty calibration tableNoneNonePassed

SHA-256 / b9e6bbdd413dd00f220495823d9cffd1f991f711b2956134c96d12adf6a65266

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(records, lot, matrix):
    return next((s for l,m,s in records if m == matrix), None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = [('A','water',N),('A','soil',N+2),('B','soil',N+4)]
check('same lot different matrix', solve(r,'A','soil'), N+2)
check('same matrix different lot', solve(r,'B','soil'), N+4)
check('missing pair', solve(r,'B','water'), None)
check('first exact pair', solve(r,'A','water'), N)
check('unknown lot', solve(r,'C','soil'), None)
check('empty calibration table', solve([], 'A','water'), None)
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
same lot different matrix33Passed
same matrix different lot35Failed
missing pair1NoneFailed
first exact pair11Passed
unknown lot3NoneFailed
empty calibration tableNoneNonePassed

SHA-256 / 7ac7cbb9a186faaad4ecfe78d36a425ca3b21e1cbe4deff89d23b9ee2b024e5d

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

Synthetic integer/rational fixtures only; no instrument validation or clinical interpretation. 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:56.645386+00:00.

Case digest / 4258c153fc4c1af1557a6e3b55db4815785886c8a7a6ce55f174519b446696d4