{"abstract":"Spike recovery subtracts an undiluted baseline from a diluted sample.","category":"Laboratory measurement reporting","checks":6,"contract":"Return exact percent recovery: 100*(measured*(sample_volume+spike_volume)-baseline*sample_volume)/(spike_concentration*spike_volume). Positive volumes and spike concentration; all values integers.","evaluation_group":"model-7833cbbc771376d4","failed_approach":"Correcting baseline dilution but dividing by spike concentration instead of spike amount leaves a volume-dependent bias.","family":"z-laboratory_units-recovery-volume","id":"FA-12421","implementations":{"attempt":{"sha256":"f5ff488c796e17a16a86cdea0f22d5130df29de2baf037c01289eae1ad3347e6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(measured, baseline, sample_volume, spike_volume, spike_concentration):\n    return str(Fraction(100*(measured*(sample_volume+spike_volume)-baseline*sample_volume),spike_concentration))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('complete recovery with added volume', solve(4*N,2*N,2,2,6*N), '100')\ncheck('different spike volume', solve(4*N,2*N,3,3,6*N), '100')\ncheck('half recovery', solve(3*N,2*N,2,2,8*N), '50')\ncheck('zero recovered amount', solve(N,2*N,2,2,6*N), '0')\ncheck('unit spike volume', solve(4*N,2*N,1,1,6*N), '100')\ncheck('negative recovery retained', solve(0,2*N,2,2,4*N), '-50')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"a9a78d194de8884baa00ea31f1c86cab92e8c6e94b0f276551f779f6ddbc331c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(measured, baseline, sample_volume, spike_volume, spike_concentration):\n    return str(Fraction(100*(measured-baseline),spike_concentration))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('complete recovery with added volume', solve(4*N,2*N,2,2,6*N), '100')\ncheck('different spike volume', solve(4*N,2*N,3,3,6*N), '100')\ncheck('half recovery', solve(3*N,2*N,2,2,8*N), '50')\ncheck('zero recovered amount', solve(N,2*N,2,2,6*N), '0')\ncheck('unit spike volume', solve(4*N,2*N,1,1,6*N), '100')\ncheck('negative recovery retained', solve(0,2*N,2,2,4*N), '-50')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"15b97ee2352a6769382a14e69581c4f58025614ab644c4e24f2a30c279f12c8c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(measured, baseline, sample_volume, spike_volume, spike_concentration):\n    return str(Fraction(100*(measured*(sample_volume+spike_volume)-baseline*sample_volume),spike_concentration*spike_volume))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('complete recovery with added volume', solve(4*N,2*N,2,2,6*N), '100')\ncheck('different spike volume', solve(4*N,2*N,3,3,6*N), '100')\ncheck('half recovery', solve(3*N,2*N,2,2,8*N), '50')\ncheck('zero recovered amount', solve(N,2*N,2,2,6*N), '0')\ncheck('unit spike volume', solve(4*N,2*N,1,1,6*N), '100')\ncheck('negative recovery retained', solve(0,2*N,2,2,4*N), '-50')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"z-laboratory_units-recovery-volume","generated_at":"2026-09-29T14:38:56.822740+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic synthetic laboratory reporting model isolates a software metadata contract; it is not a clinical procedure.","repair":"Calculate recovered amount after scaling both mixture and baseline by their own volumes.","root_cause":"Original concentration is subtracted from a mixture concentration without accounting for the added spike volume.","sha256":"f11436046712f362b0b09c90a6f0979c2c282c0389263fb9f23648d602f27f4d","title":"Spike recovery subtracts an undiluted baseline from a diluted sample · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.885,"exit_code":1,"observations":[{"actual":"200","check":"complete recovery with added volume","expected":"100","passed":false},{"actual":"300","check":"different spike volume","expected":"100","passed":false},{"actual":"100","check":"half recovery","expected":"50","passed":false},{"actual":"0","check":"zero recovered amount","expected":"0","passed":true},{"actual":"100","check":"unit spike volume","expected":"100","passed":true},{"actual":"-100","check":"negative recovery retained","expected":"-50","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"complete recovery with added volume\", \"actual\": \"200\", \"expected\": \"100\", \"passed\": false}, {\"check\": \"different spike volume\", \"actual\": \"300\", \"expected\": \"100\", \"passed\": false}, {\"check\": \"half recovery\", \"actual\": \"100\", \"expected\": \"50\", \"passed\": false}, {\"check\": \"zero recovered amount\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"unit spike volume\", \"actual\": \"100\", \"expected\": \"100\", \"passed\": true}, {\"check\": \"negative recovery retained\", \"actual\": \"-100\", \"expected\": \"-50\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.735,"exit_code":1,"observations":[{"actual":"100/3","check":"complete recovery with added volume","expected":"100","passed":false},{"actual":"100/3","check":"different spike volume","expected":"100","passed":false},{"actual":"25/2","check":"half recovery","expected":"50","passed":false},{"actual":"-50/3","check":"zero recovered amount","expected":"0","passed":false},{"actual":"100/3","check":"unit spike volume","expected":"100","passed":false},{"actual":"-50","check":"negative recovery retained","expected":"-50","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"complete recovery with added volume\", \"actual\": \"100/3\", \"expected\": \"100\", \"passed\": false}, {\"check\": \"different spike volume\", \"actual\": \"100/3\", \"expected\": \"100\", \"passed\": false}, {\"check\": \"half recovery\", \"actual\": \"25/2\", \"expected\": \"50\", \"passed\": false}, {\"check\": \"zero recovered amount\", \"actual\": \"-50/3\", \"expected\": \"0\", \"passed\": false}, {\"check\": \"unit spike volume\", \"actual\": \"100/3\", \"expected\": \"100\", \"passed\": false}, {\"check\": \"negative recovery retained\", \"actual\": \"-50\", \"expected\": \"-50\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.32,"exit_code":0,"observations":[{"actual":"100","check":"complete recovery with added volume","expected":"100","passed":true},{"actual":"100","check":"different spike volume","expected":"100","passed":true},{"actual":"50","check":"half recovery","expected":"50","passed":true},{"actual":"0","check":"zero recovered amount","expected":"0","passed":true},{"actual":"100","check":"unit spike volume","expected":"100","passed":true},{"actual":"-50","check":"negative recovery retained","expected":"-50","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"complete recovery with added volume\", \"actual\": \"100\", \"expected\": \"100\", \"passed\": true}, {\"check\": \"different spike volume\", \"actual\": \"100\", \"expected\": \"100\", \"passed\": true}, {\"check\": \"half recovery\", \"actual\": \"50\", \"expected\": \"50\", \"passed\": true}, {\"check\": \"zero recovered amount\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"unit spike volume\", \"actual\": \"100\", \"expected\": \"100\", \"passed\": true}, {\"check\": \"negative recovery retained\", \"actual\": \"-50\", \"expected\": \"-50\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}