{"abstract":"Overhead absorbed by a lot is tiny because the rate is applied to hours instead of labor cost.","category":"Inventory cost layering","checks":6,"contract":"Input {material:[[qty,unit]], hours, rate, oh_bp (of labor cost), input_units, good_units, recovery (per scrapped unit), normal_bp}. Total = material + labor + overhead. Scrap = input - good; normal loss = floor(input*normal_bp/10000); abnormal = max(0, scrap - normal) valued at floor(total/input) per unit and expensed. Scrap recovery credits every scrapped unit. Good-unit cost = round-half-up((total - recovery credit - abnormal value)/good); good_units == 0 returns {\"error\"}. Return {total, abnormal_units, abnormal_value, unit_cost}.","evaluation_group":"w2-inventory-cost-layering-production-lot-rollup","failed_approach":"Applying the rate to material cost uses a different allocation base.","family":"w2-inventory-cost-layering-production-lot-rollup-overhead-application-base","id":"FA-60261","implementations":{"attempt":{"sha256":"b62307e615056b96567f58a5a6694e5216726b296591f921f55eb3d5495c9848","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    mat = sum(q * u for q, u in x['material'])\n    labor = x['hours'] * x['rate']\n    oh = mat * x['oh_bp'] // 10000\n    total = mat + labor + oh\n    if x['good_units'] == 0:\n        return {'error': 'no good output'}\n    scrap = x['input_units'] - x['good_units']\n    normal = x['input_units'] * x['normal_bp'] // 10000\n    abnormal = max(0, scrap - normal)\n    ab_value = abnormal * (total // x['input_units'])\n    credit = scrap * x['recovery']\n    net = total - credit - ab_value\n    unit = (2 * net + x['good_units']) // (2 * x['good_units'])\n    return {'total': total, 'abnormal_units': abnormal, 'abnormal_value': ab_value, 'unit_cost': unit}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 501}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 39, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 9, 'abnormal_value': 1980, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2010, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6020, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 151}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 4, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 26037, 'abnormal_units': 3, 'abnormal_value': 2601, 'unit_cost': 866}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 151, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 502}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 38, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 10, 'abnormal_value': 2200, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2020, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6040, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 151}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 5, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 31797, 'abnormal_units': 3, 'abnormal_value': 3177, 'unit_cost': 1058}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 152, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 503}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 37, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 11, 'abnormal_value': 2420, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2030, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6060, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 152}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 6, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 37557, 'abnormal_units': 3, 'abnormal_value': 3753, 'unit_cost': 1250}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 153, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 504}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 36, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 12, 'abnormal_value': 2640, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2040, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6080, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 152}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 7, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 43317, 'abnormal_units': 3, 'abnormal_value': 4329, 'unit_cost': 1442}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 154, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 505}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 35, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 13, 'abnormal_value': 2860, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2050, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6100, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 153}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 8, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 49077, 'abnormal_units': 3, 'abnormal_value': 4905, 'unit_cost': 1634}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 155, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\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":"35cea8e6cba170b7b0396475088a8f260e03abe039cd59bed1aab8dcc8694972","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    mat = sum(q * u for q, u in x['material'])\n    labor = x['hours'] * x['rate']\n    oh = x['hours'] * x['oh_bp'] // 10000\n    total = mat + labor + oh\n    if x['good_units'] == 0:\n        return {'error': 'no good output'}\n    scrap = x['input_units'] - x['good_units']\n    normal = x['input_units'] * x['normal_bp'] // 10000\n    abnormal = max(0, scrap - normal)\n    ab_value = abnormal * (total // x['input_units'])\n    credit = scrap * x['recovery']\n    net = total - credit - ab_value\n    unit = (2 * net + x['good_units']) // (2 * x['good_units'])\n    return {'total': total, 'abnormal_units': abnormal, 'abnormal_value': ab_value, 'unit_cost': unit}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 501}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 39, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 9, 'abnormal_value': 1980, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2010, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6020, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 151}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 4, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 26037, 'abnormal_units': 3, 'abnormal_value': 2601, 'unit_cost': 866}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 151, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 502}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 38, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 10, 'abnormal_value': 2200, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2020, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6040, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 151}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 5, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 31797, 'abnormal_units': 3, 'abnormal_value': 3177, 'unit_cost': 1058}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 152, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 503}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 37, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 11, 'abnormal_value': 2420, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2030, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6060, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 152}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 6, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 37557, 'abnormal_units': 3, 'abnormal_value': 3753, 'unit_cost': 1250}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 153, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 504}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 36, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 12, 'abnormal_value': 2640, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2040, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6080, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 152}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 7, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 43317, 'abnormal_units': 3, 'abnormal_value': 4329, 'unit_cost': 1442}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 154, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 505}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 35, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 13, 'abnormal_value': 2860, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2050, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6100, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 153}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 8, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 49077, 'abnormal_units': 3, 'abnormal_value': 4905, 'unit_cost': 1634}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 155, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\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":"b37fa334cbdc369b425e57129b69dd5f376bc747ff07b662935950fbc6958d92","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    mat = sum(q * u for q, u in x['material'])\n    labor = x['hours'] * x['rate']\n    oh = labor * x['oh_bp'] // 10000\n    total = mat + labor + oh\n    if x['good_units'] == 0:\n        return {'error': 'no good output'}\n    scrap = x['input_units'] - x['good_units']\n    normal = x['input_units'] * x['normal_bp'] // 10000\n    abnormal = max(0, scrap - normal)\n    ab_value = abnormal * (total // x['input_units'])\n    credit = scrap * x['recovery']\n    net = total - credit - ab_value\n    unit = (2 * net + x['good_units']) // (2 * x['good_units'])\n    return {'total': total, 'abnormal_units': abnormal, 'abnormal_value': ab_value, 'unit_cost': unit}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 501}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 39, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 9, 'abnormal_value': 1980, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2010, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6020, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 151}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 4, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 26037, 'abnormal_units': 3, 'abnormal_value': 2601, 'unit_cost': 866}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 151, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 502}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 38, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 10, 'abnormal_value': 2200, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2020, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6040, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 151}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 5, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 31797, 'abnormal_units': 3, 'abnormal_value': 3177, 'unit_cost': 1058}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 152, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 503}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 37, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 11, 'abnormal_value': 2420, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2030, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6060, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 152}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 6, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 37557, 'abnormal_units': 3, 'abnormal_value': 3753, 'unit_cost': 1250}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 153, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 504}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 36, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 12, 'abnormal_value': 2640, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2040, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6080, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 152}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 7, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 43317, 'abnormal_units': 3, 'abnormal_value': 4329, 'unit_cost': 1442}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 154, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]], [['normal run', {'material': [[10, 300], [5, 120]], 'hours': 4, 'rate': 2500, 'oh_bp': 15000, 'input_units': 100, 'good_units': 96, 'recovery': 5, 'normal_bp': 505}, {'total': 28600, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 298}], ['abnormal loss', {'material': [[20, 100]], 'hours': 2, 'rate': 3000, 'oh_bp': 5000, 'input_units': 50, 'good_units': 35, 'recovery': 10, 'normal_bp': 400}, {'total': 11000, 'abnormal_units': 13, 'abnormal_value': 2860, 'unit_cost': 228}], ['better than normal', {'material': [[8, 250]], 'hours': 1, 'rate': 2050, 'oh_bp': 10000, 'input_units': 40, 'good_units': 40, 'recovery': 0, 'normal_bp': 1000}, {'total': 6100, 'abnormal_units': 0, 'abnormal_value': 0, 'unit_cost': 153}], ['no good units', {'material': [[1, 100]], 'hours': 1, 'rate': 100, 'oh_bp': 0, 'input_units': 5, 'good_units': 0, 'recovery': 1, 'normal_bp': 0}, {'error': 'no good output'}], ['high overhead', {'material': [[3, 999]], 'hours': 8, 'rate': 1800, 'oh_bp': 22000, 'input_units': 30, 'good_units': 27, 'recovery': 20, 'normal_bp': 300}, {'total': 49077, 'abnormal_units': 3, 'abnormal_value': 4905, 'unit_cost': 1634}], ['recovery heavy', {'material': [[12, 450]], 'hours': 5, 'rate': 1500, 'oh_bp': 8000, 'input_units': 60, 'good_units': 51, 'recovery': 155, 'normal_bp': 1000}, {'total': 18900, 'abnormal_units': 3, 'abnormal_value': 945, 'unit_cost': 325}]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\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":"Stipulated bounded teaching model with explicit toy rules; not an accounting-standard implementation. 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":"w2-inventory-cost-layering-production-lot-rollup-overhead-application-base","generated_at":"2026-09-29T14:46:44.069351+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Inventory valuation and cost-of-goods decisions depend on this rule.","repair":"Apply the overhead rate to labor cost.","root_cause":"Overhead uses labor hours as the base while the rate is stipulated as a percentage of labor cost.","sha256":"2497893c7ca4d464c6458359ce4fa2b84b984da84fb81a0adc477e48e63f0dc6","title":"Production lot cost roll-up with yield: overhead application base · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.259,"exit_code":1,"observations":[{"actual":{"abnormal_units":0,"abnormal_value":0,"total":19000,"unit_cost":198},"check":"normal run","expected":{"abnormal_units":0,"abnormal_value":0,"total":28600,"unit_cost":298},"passed":false},{"actual":{"abnormal_units":9,"abnormal_value":1620,"total":9000,"unit_cost":186},"check":"abnormal loss","expected":{"abnormal_units":9,"abnormal_value":1980,"total":11000,"unit_cost":228},"passed":false},{"actual":{"abnormal_units":0,"abnormal_value":0,"total":6010,"unit_cost":150},"check":"better than normal","expected":{"abnormal_units":0,"abnormal_value":0,"total":6020,"unit_cost":151},"passed":false},{"actual":{"error":"no good output"},"check":"no good units","expected":{"error":"no good output"},"passed":true},{"actual":{"abnormal_units":3,"abnormal_value":1677,"total":16790,"unit_cost":558},"check":"high overhead","expected":{"abnormal_units":3,"abnormal_value":2601,"total":26037,"unit_cost":866},"passed":false},{"actual":{"abnormal_units":3,"abnormal_value":861,"total":17220,"unit_cost":294},"check":"recovery heavy","expected":{"abnormal_units":3,"abnormal_value":945,"total":18900,"unit_cost":325},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal run\", \"actual\": {\"total\": 19000, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 198}, \"expected\": {\"total\": 28600, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 298}, \"passed\": false}, {\"check\": \"abnormal loss\", \"actual\": {\"total\": 9000, \"abnormal_units\": 9, \"abnormal_value\": 1620, \"unit_cost\": 186}, \"expected\": {\"total\": 11000, \"abnormal_units\": 9, \"abnormal_value\": 1980, \"unit_cost\": 228}, \"passed\": false}, {\"check\": \"better than normal\", \"actual\": {\"total\": 6010, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 150}, \"expected\": {\"total\": 6020, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 151}, \"passed\": false}, {\"check\": \"no good units\", \"actual\": {\"error\": \"no good output\"}, \"expected\": {\"error\": \"no good output\"}, \"passed\": true}, {\"check\": \"high overhead\", \"actual\": {\"total\": 16790, \"abnormal_units\": 3, \"abnormal_value\": 1677, \"unit_cost\": 558}, \"expected\": {\"total\": 26037, \"abnormal_units\": 3, \"abnormal_value\": 2601, \"unit_cost\": 866}, \"passed\": false}, {\"check\": \"recovery heavy\", \"actual\": {\"total\": 17220, \"abnormal_units\": 3, \"abnormal_value\": 861, \"unit_cost\": 294}, \"expected\": {\"total\": 18900, \"abnormal_units\": 3, \"abnormal_value\": 945, \"unit_cost\": 325}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":51.209,"exit_code":1,"observations":[{"actual":{"abnormal_units":0,"abnormal_value":0,"total":13606,"unit_cost":142},"check":"normal run","expected":{"abnormal_units":0,"abnormal_value":0,"total":28600,"unit_cost":298},"passed":false},{"actual":{"abnormal_units":9,"abnormal_value":1440,"total":8001,"unit_cost":165},"check":"abnormal loss","expected":{"abnormal_units":9,"abnormal_value":1980,"total":11000,"unit_cost":228},"passed":false},{"actual":{"abnormal_units":0,"abnormal_value":0,"total":4011,"unit_cost":100},"check":"better than normal","expected":{"abnormal_units":0,"abnormal_value":0,"total":6020,"unit_cost":151},"passed":false},{"actual":{"error":"no good output"},"check":"no good units","expected":{"error":"no good output"},"passed":true},{"actual":{"abnormal_units":3,"abnormal_value":1020,"total":10205,"unit_cost":338},"check":"high overhead","expected":{"abnormal_units":3,"abnormal_value":2601,"total":26037,"unit_cost":866},"passed":false},{"actual":{"abnormal_units":3,"abnormal_value":645,"total":12904,"unit_cost":214},"check":"recovery heavy","expected":{"abnormal_units":3,"abnormal_value":945,"total":18900,"unit_cost":325},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal run\", \"actual\": {\"total\": 13606, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 142}, \"expected\": {\"total\": 28600, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 298}, \"passed\": false}, {\"check\": \"abnormal loss\", \"actual\": {\"total\": 8001, \"abnormal_units\": 9, \"abnormal_value\": 1440, \"unit_cost\": 165}, \"expected\": {\"total\": 11000, \"abnormal_units\": 9, \"abnormal_value\": 1980, \"unit_cost\": 228}, \"passed\": false}, {\"check\": \"better than normal\", \"actual\": {\"total\": 4011, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 100}, \"expected\": {\"total\": 6020, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 151}, \"passed\": false}, {\"check\": \"no good units\", \"actual\": {\"error\": \"no good output\"}, \"expected\": {\"error\": \"no good output\"}, \"passed\": true}, {\"check\": \"high overhead\", \"actual\": {\"total\": 10205, \"abnormal_units\": 3, \"abnormal_value\": 1020, \"unit_cost\": 338}, \"expected\": {\"total\": 26037, \"abnormal_units\": 3, \"abnormal_value\": 2601, \"unit_cost\": 866}, \"passed\": false}, {\"check\": \"recovery heavy\", \"actual\": {\"total\": 12904, \"abnormal_units\": 3, \"abnormal_value\": 645, \"unit_cost\": 214}, \"expected\": {\"total\": 18900, \"abnormal_units\": 3, \"abnormal_value\": 945, \"unit_cost\": 325}, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.532,"exit_code":0,"observations":[{"actual":{"abnormal_units":0,"abnormal_value":0,"total":28600,"unit_cost":298},"check":"normal run","expected":{"abnormal_units":0,"abnormal_value":0,"total":28600,"unit_cost":298},"passed":true},{"actual":{"abnormal_units":9,"abnormal_value":1980,"total":11000,"unit_cost":228},"check":"abnormal loss","expected":{"abnormal_units":9,"abnormal_value":1980,"total":11000,"unit_cost":228},"passed":true},{"actual":{"abnormal_units":0,"abnormal_value":0,"total":6020,"unit_cost":151},"check":"better than normal","expected":{"abnormal_units":0,"abnormal_value":0,"total":6020,"unit_cost":151},"passed":true},{"actual":{"error":"no good output"},"check":"no good units","expected":{"error":"no good output"},"passed":true},{"actual":{"abnormal_units":3,"abnormal_value":2601,"total":26037,"unit_cost":866},"check":"high overhead","expected":{"abnormal_units":3,"abnormal_value":2601,"total":26037,"unit_cost":866},"passed":true},{"actual":{"abnormal_units":3,"abnormal_value":945,"total":18900,"unit_cost":325},"check":"recovery heavy","expected":{"abnormal_units":3,"abnormal_value":945,"total":18900,"unit_cost":325},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal run\", \"actual\": {\"total\": 28600, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 298}, \"expected\": {\"total\": 28600, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 298}, \"passed\": true}, {\"check\": \"abnormal loss\", \"actual\": {\"total\": 11000, \"abnormal_units\": 9, \"abnormal_value\": 1980, \"unit_cost\": 228}, \"expected\": {\"total\": 11000, \"abnormal_units\": 9, \"abnormal_value\": 1980, \"unit_cost\": 228}, \"passed\": true}, {\"check\": \"better than normal\", \"actual\": {\"total\": 6020, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 151}, \"expected\": {\"total\": 6020, \"abnormal_units\": 0, \"abnormal_value\": 0, \"unit_cost\": 151}, \"passed\": true}, {\"check\": \"no good units\", \"actual\": {\"error\": \"no good output\"}, \"expected\": {\"error\": \"no good output\"}, \"passed\": true}, {\"check\": \"high overhead\", \"actual\": {\"total\": 26037, \"abnormal_units\": 3, \"abnormal_value\": 2601, \"unit_cost\": 866}, \"expected\": {\"total\": 26037, \"abnormal_units\": 3, \"abnormal_value\": 2601, \"unit_cost\": 866}, \"passed\": true}, {\"check\": \"recovery heavy\", \"actual\": {\"total\": 18900, \"abnormal_units\": 3, \"abnormal_value\": 945, \"unit_cost\": 325}, \"expected\": {\"total\": 18900, \"abnormal_units\": 3, \"abnormal_value\": 945, \"unit_cost\": 325}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}