FAILURE MAP
← Case archive

FA-12396 / Laboratory measurement reporting / Open access

Aliquot blank is subtracted after dilution correction · case 01

Aliquot blank is subtracted after dilution correction.

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

ROOT CAUSE

Blank and sample values expressed on the aliquot basis are combined on different bases.

VERIFIED REPAIR

Subtract the aliquot blank before scaling to the original sample.

Unsuccessful approach: Clamping negative aliquot differences to zero conceals signed blank-corrected results.

Case contract

Return signed (signal - aliquot_blank) * dilution as a Fraction string. Signals are rational strings and dilution is positive. Negative results remain reportable in this model.

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
from fractions import Fraction
N = 1
observations = []
def solve(signal, blank, dilution):
    return str(Fraction(signal)*dilution-Fraction(blank))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('blank scales with aliquot', solve(str(5*N), str(N), 3), str(12*N))
check('negative blank correction retained', solve(str(N), str(2*N), 4), str(-4*N))
check('blank equality', solve(str(N), str(N), 5), '0')
check('undiluted sample', solve(str(3*N), str(N), 1), str(2*N))
check('zero blank', solve(str(N), '0', 3), str(3*N))
check('fractional blank', solve('1', '1/2', 3), '3/2')
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
blank scales with aliquot1412Failed
negative blank correction retained2-4Failed
blank equality40Failed
undiluted sample22Passed
zero blank33Passed
fractional blank5/23/2Failed

SHA-256 / 1aadf6598537f2899bb76dffffcf9c21c05458dc3dec3d416905c37b0d2f9612

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(signal, blank, dilution):
    return str(max(Fraction(0), Fraction(signal)-Fraction(blank))*dilution)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('blank scales with aliquot', solve(str(5*N), str(N), 3), str(12*N))
check('negative blank correction retained', solve(str(N), str(2*N), 4), str(-4*N))
check('blank equality', solve(str(N), str(N), 5), '0')
check('undiluted sample', solve(str(3*N), str(N), 1), str(2*N))
check('zero blank', solve(str(N), '0', 3), str(3*N))
check('fractional blank', solve('1', '1/2', 3), '3/2')
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
blank scales with aliquot1212Passed
negative blank correction retained0-4Failed
blank equality00Passed
undiluted sample22Passed
zero blank33Passed
fractional blank3/23/2Passed

SHA-256 / 9d5fea203290069dcb48dbac8d13a6b1d6eb384e66469327e53a7062280641b0

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(signal, blank, dilution):
    return str((Fraction(signal)-Fraction(blank))*dilution)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('blank scales with aliquot', solve(str(5*N), str(N), 3), str(12*N))
check('negative blank correction retained', solve(str(N), str(2*N), 4), str(-4*N))
check('blank equality', solve(str(N), str(N), 5), '0')
check('undiluted sample', solve(str(3*N), str(N), 1), str(2*N))
check('zero blank', solve(str(N), '0', 3), str(3*N))
check('fractional blank', solve('1', '1/2', 3), '3/2')
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
blank scales with aliquot1212Passed
negative blank correction retained-4-4Passed
blank equality00Passed
undiluted sample22Passed
zero blank33Passed
fractional blank3/23/2Passed

SHA-256 / f426cb741a4191a436feb4351e1193e1c107c86e9284983bf9e4e2e946e67a24

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.568518+00:00.

Case digest / c109f32eea6828e711bfbdb29f3a6bfbd3e1bef4ea6db4548ab3dfe7dfcc9c2d