{"abstract":"The total Medicare line is off by a cent from the sum of its two printed components.","category":"Payroll withholding rules","checks":10,"contract":"Input [ytd_wages, wages] in cents. Regular Medicare is 1.45% of wages rounded half-up. Additional Medicare is 0.9% of the part of this paycheck that pushes year-to-date wages above 200,000.00, rounded half-up separately. Return [medicare, additional_wages, medicare + additional].","evaluation_group":"w2-payroll-withholding-additional-medicare","failed_approach":"The attempt still combines the components before rounding and additionally truncates, so the total diverges even more often.","family":"w2-payroll-withholding-additional-medicare-separately-rounded-components","id":"FA-58876","implementations":{"attempt":{"sha256":"dda0f7d5677b1edfe73b2ac5525fa1f4419cc483de415f254222f59b6624d336","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    ytd, wages = x\n    base_tax = (wages * 145 + 5000) // 10000\n    over_before = max(0, ytd - 20000000)\n    over_after = max(0, ytd + wages - 20000000)\n    extra_wages = over_after - over_before\n    extra = (extra_wages * 9 + 500) // 1000\n    return [base_tax, extra_wages, (wages * 145 + extra_wages * 90) // 10000]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', [19294581, 2127366], [30847, 1421947, 43645]), ('regression', [20189609, 125208], [1816, 125208, 2943]), ('partial-repair probe', [2439490, 49414], [717, 0, 717]), ('partial-repair probe', [20723172, 31906], [463, 31906, 750]), ('boundary control', [20000000, 100000], [1450, 100000, 2350]), ('boundary control', [19950000, 100000], [1450, 50000, 1900]), ('normal control', [20158685, 407195], [5904, 407195, 9569]), ('normal control', [20518887, 2208012], [32016, 2208012, 51888]), ('normal control', [20000000, 1829965], [26534, 1829965, 43004]), ('normal control', [7554383, 209883], [3043, 0, 3043])], [('regression', [20189609, 125208], [1816, 125208, 2943]), ('regression', [20000000, 13601], [197, 13601, 319]), ('partial-repair probe', [20767841, 19138], [278, 19138, 450]), ('partial-repair probe', [20469014, 260626], [3779, 260626, 6125]), ('boundary control', [0, 0], [0, 0, 0]), ('boundary control', [25000000, 12345], [179, 12345, 290]), ('normal control', [8001356, 2662166], [38601, 0, 38601]), ('normal control', [19681988, 1173456], [17015, 855444, 24714]), ('normal control', [19655408, 1735735], [25168, 1391143, 37688]), ('normal control', [19686537, 15872], [230, 0, 230])], [('regression', [20164631, 554176], [8036, 554176, 13024]), ('regression', [20000000, 13601], [197, 13601, 319]), ('partial-repair probe', [23912137, 659488], [9563, 659488, 15498]), ('partial-repair probe', [21835663, 1842418], [26715, 1842418, 43297]), ('boundary control', [19999999, 1], [0, 0, 0]), ('boundary control', [20000000, 100000], [1450, 100000, 2350]), ('normal control', [3879860, 1040777], [15091, 0, 15091]), ('normal control', [4213397, 2332986], [33828, 0, 33828]), ('normal control', [20000000, 654261], [9487, 654261, 15375]), ('normal control', [20000000, 35595], [516, 35595, 836])], [('regression', [20333577, 41631], [604, 41631, 979]), ('regression', [20290634, 2600150], [37702, 2600150, 61103]), ('partial-repair probe', [19294581, 2127366], [30847, 1421947, 43645]), ('partial-repair probe', [20000000, 1204410], [17464, 1204410, 28304]), ('boundary control', [19950000, 100000], [1450, 50000, 1900]), ('boundary control', [0, 0], [0, 0, 0]), ('normal control', [4705614, 33884], [491, 0, 491]), ('normal control', [4401788, 1347616], [19540, 0, 19540]), ('normal control', [703223, 1018779], [14772, 0, 14772]), ('normal control', [916863, 25193], [365, 0, 365])], [('regression', [20000000, 2376741], [34463, 2376741, 55854]), ('regression', [18969228, 1480792], [21471, 450020, 25521]), ('partial-repair probe', [624582, 1378603], [19990, 0, 19990]), ('partial-repair probe', [19201069, 465833], [6755, 0, 6755]), ('boundary control', [25000000, 12345], [179, 12345, 290]), ('boundary control', [19999999, 1], [0, 0, 0]), ('normal control', [10176860, 61801], [896, 0, 896]), ('normal control', [20000000, 541335], [7849, 541335, 12721]), ('normal control', [20613452, 926054], [13428, 926054, 21762]), ('normal control', [20270374, 43541], [631, 43541, 1023])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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":"baa38e7ce62e52e2f7d83eb4e63fdfdcca2ab8330826c3318c62fd1d7c6c7963","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    ytd, wages = x\n    base_tax = (wages * 145 + 5000) // 10000\n    over_before = max(0, ytd - 20000000)\n    over_after = max(0, ytd + wages - 20000000)\n    extra_wages = over_after - over_before\n    extra = (extra_wages * 9 + 500) // 1000\n    return [base_tax, extra_wages, (wages * 145 + extra_wages * 90 + 5000) // 10000]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', [19294581, 2127366], [30847, 1421947, 43645]), ('regression', [20189609, 125208], [1816, 125208, 2943]), ('partial-repair probe', [2439490, 49414], [717, 0, 717]), ('partial-repair probe', [20723172, 31906], [463, 31906, 750]), ('boundary control', [20000000, 100000], [1450, 100000, 2350]), ('boundary control', [19950000, 100000], [1450, 50000, 1900]), ('normal control', [20158685, 407195], [5904, 407195, 9569]), ('normal control', [20518887, 2208012], [32016, 2208012, 51888]), ('normal control', [20000000, 1829965], [26534, 1829965, 43004]), ('normal control', [7554383, 209883], [3043, 0, 3043])], [('regression', [20189609, 125208], [1816, 125208, 2943]), ('regression', [20000000, 13601], [197, 13601, 319]), ('partial-repair probe', [20767841, 19138], [278, 19138, 450]), ('partial-repair probe', [20469014, 260626], [3779, 260626, 6125]), ('boundary control', [0, 0], [0, 0, 0]), ('boundary control', [25000000, 12345], [179, 12345, 290]), ('normal control', [8001356, 2662166], [38601, 0, 38601]), ('normal control', [19681988, 1173456], [17015, 855444, 24714]), ('normal control', [19655408, 1735735], [25168, 1391143, 37688]), ('normal control', [19686537, 15872], [230, 0, 230])], [('regression', [20164631, 554176], [8036, 554176, 13024]), ('regression', [20000000, 13601], [197, 13601, 319]), ('partial-repair probe', [23912137, 659488], [9563, 659488, 15498]), ('partial-repair probe', [21835663, 1842418], [26715, 1842418, 43297]), ('boundary control', [19999999, 1], [0, 0, 0]), ('boundary control', [20000000, 100000], [1450, 100000, 2350]), ('normal control', [3879860, 1040777], [15091, 0, 15091]), ('normal control', [4213397, 2332986], [33828, 0, 33828]), ('normal control', [20000000, 654261], [9487, 654261, 15375]), ('normal control', [20000000, 35595], [516, 35595, 836])], [('regression', [20333577, 41631], [604, 41631, 979]), ('regression', [20290634, 2600150], [37702, 2600150, 61103]), ('partial-repair probe', [19294581, 2127366], [30847, 1421947, 43645]), ('partial-repair probe', [20000000, 1204410], [17464, 1204410, 28304]), ('boundary control', [19950000, 100000], [1450, 50000, 1900]), ('boundary control', [0, 0], [0, 0, 0]), ('normal control', [4705614, 33884], [491, 0, 491]), ('normal control', [4401788, 1347616], [19540, 0, 19540]), ('normal control', [703223, 1018779], [14772, 0, 14772]), ('normal control', [916863, 25193], [365, 0, 365])], [('regression', [20000000, 2376741], [34463, 2376741, 55854]), ('regression', [18969228, 1480792], [21471, 450020, 25521]), ('partial-repair probe', [624582, 1378603], [19990, 0, 19990]), ('partial-repair probe', [19201069, 465833], [6755, 0, 6755]), ('boundary control', [25000000, 12345], [179, 12345, 290]), ('boundary control', [19999999, 1], [0, 0, 0]), ('normal control', [10176860, 61801], [896, 0, 896]), ('normal control', [20000000, 541335], [7849, 541335, 12721]), ('normal control', [20613452, 926054], [13428, 926054, 21762]), ('normal control', [20270374, 43541], [631, 43541, 1023])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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":"88ce9a801341cd2ce432485eb3f07f0f09bc90af60d5b62174251bf974876b89","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    ytd, wages = x\n    base_tax = (wages * 145 + 5000) // 10000\n    over_before = max(0, ytd - 20000000)\n    over_after = max(0, ytd + wages - 20000000)\n    extra_wages = over_after - over_before\n    extra = (extra_wages * 9 + 500) // 1000\n    return [base_tax, extra_wages, base_tax + extra]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', [19294581, 2127366], [30847, 1421947, 43645]), ('regression', [20189609, 125208], [1816, 125208, 2943]), ('partial-repair probe', [2439490, 49414], [717, 0, 717]), ('partial-repair probe', [20723172, 31906], [463, 31906, 750]), ('boundary control', [20000000, 100000], [1450, 100000, 2350]), ('boundary control', [19950000, 100000], [1450, 50000, 1900]), ('normal control', [20158685, 407195], [5904, 407195, 9569]), ('normal control', [20518887, 2208012], [32016, 2208012, 51888]), ('normal control', [20000000, 1829965], [26534, 1829965, 43004]), ('normal control', [7554383, 209883], [3043, 0, 3043])], [('regression', [20189609, 125208], [1816, 125208, 2943]), ('regression', [20000000, 13601], [197, 13601, 319]), ('partial-repair probe', [20767841, 19138], [278, 19138, 450]), ('partial-repair probe', [20469014, 260626], [3779, 260626, 6125]), ('boundary control', [0, 0], [0, 0, 0]), ('boundary control', [25000000, 12345], [179, 12345, 290]), ('normal control', [8001356, 2662166], [38601, 0, 38601]), ('normal control', [19681988, 1173456], [17015, 855444, 24714]), ('normal control', [19655408, 1735735], [25168, 1391143, 37688]), ('normal control', [19686537, 15872], [230, 0, 230])], [('regression', [20164631, 554176], [8036, 554176, 13024]), ('regression', [20000000, 13601], [197, 13601, 319]), ('partial-repair probe', [23912137, 659488], [9563, 659488, 15498]), ('partial-repair probe', [21835663, 1842418], [26715, 1842418, 43297]), ('boundary control', [19999999, 1], [0, 0, 0]), ('boundary control', [20000000, 100000], [1450, 100000, 2350]), ('normal control', [3879860, 1040777], [15091, 0, 15091]), ('normal control', [4213397, 2332986], [33828, 0, 33828]), ('normal control', [20000000, 654261], [9487, 654261, 15375]), ('normal control', [20000000, 35595], [516, 35595, 836])], [('regression', [20333577, 41631], [604, 41631, 979]), ('regression', [20290634, 2600150], [37702, 2600150, 61103]), ('partial-repair probe', [19294581, 2127366], [30847, 1421947, 43645]), ('partial-repair probe', [20000000, 1204410], [17464, 1204410, 28304]), ('boundary control', [19950000, 100000], [1450, 50000, 1900]), ('boundary control', [0, 0], [0, 0, 0]), ('normal control', [4705614, 33884], [491, 0, 491]), ('normal control', [4401788, 1347616], [19540, 0, 19540]), ('normal control', [703223, 1018779], [14772, 0, 14772]), ('normal control', [916863, 25193], [365, 0, 365])], [('regression', [20000000, 2376741], [34463, 2376741, 55854]), ('regression', [18969228, 1480792], [21471, 450020, 25521]), ('partial-repair probe', [624582, 1378603], [19990, 0, 19990]), ('partial-repair probe', [19201069, 465833], [6755, 0, 6755]), ('boundary control', [25000000, 12345], [179, 12345, 290]), ('boundary control', [19999999, 1], [0, 0, 0]), ('normal control', [10176860, 61801], [896, 0, 896]), ('normal control', [20000000, 541335], [7849, 541335, 12721]), ('normal control', [20613452, 926054], [13428, 926054, 21762]), ('normal control', [20270374, 43541], [631, 43541, 1023])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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":"A deterministic teaching model of a stipulated payroll rule with toy thresholds and rates. It makes no claim of conformance to any tax authority, statute or jurisdiction and is not payroll software. 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-payroll-withholding-additional-medicare-separately-rounded-components","generated_at":"2026-09-29T14:46:30.848807+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"The employer must begin the extra 0.9% exactly with the paycheck that crosses the threshold, and only on the excess portion.","repair":"Restore the contract rule at the separately rounded components step: use `return [base_tax, extra_wages, base_tax + extra]`.","root_cause":"The total is recomputed with one combined rounding instead of adding the separately rounded regular and additional amounts.","sha256":"7ac5a1765bae65fcd59fbe86ef8becfe4cc8e9cf1104e2c8704e6d787d3ba9ec","title":"Additional Medicare withholding threshold: separately rounded components · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.321,"exit_code":1,"observations":[{"actual":[30847,1421947,43644],"check":"regression 0","expected":[30847,1421947,43645],"passed":false},{"actual":[1816,125208,2942],"check":"regression 1","expected":[1816,125208,2943],"passed":false},{"actual":[717,0,716],"check":"partial-repair probe 2","expected":[717,0,717],"passed":false},{"actual":[463,31906,749],"check":"partial-repair probe 3","expected":[463,31906,750],"passed":false},{"actual":[1450,100000,2350],"check":"boundary control 4","expected":[1450,100000,2350],"passed":true},{"actual":[1450,50000,1900],"check":"boundary control 5","expected":[1450,50000,1900],"passed":true},{"actual":[5904,407195,9569],"check":"normal control 6","expected":[5904,407195,9569],"passed":true},{"actual":[32016,2208012,51888],"check":"normal control 7","expected":[32016,2208012,51888],"passed":true},{"actual":[26534,1829965,43004],"check":"normal control 8","expected":[26534,1829965,43004],"passed":true},{"actual":[3043,0,3043],"check":"normal control 9","expected":[3043,0,3043],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [30847, 1421947, 43644], \"expected\": [30847, 1421947, 43645], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [1816, 125208, 2942], \"expected\": [1816, 125208, 2943], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [717, 0, 716], \"expected\": [717, 0, 717], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [463, 31906, 749], \"expected\": [463, 31906, 750], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [1450, 100000, 2350], \"expected\": [1450, 100000, 2350], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [1450, 50000, 1900], \"expected\": [1450, 50000, 1900], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [5904, 407195, 9569], \"expected\": [5904, 407195, 9569], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [32016, 2208012, 51888], \"expected\": [32016, 2208012, 51888], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [26534, 1829965, 43004], \"expected\": [26534, 1829965, 43004], \"passed\": true}, {\"check\": \"normal control 9\", \"actual\": [3043, 0, 3043], \"expected\": [3043, 0, 3043], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.452,"exit_code":1,"observations":[{"actual":[30847,1421947,43644],"check":"regression 0","expected":[30847,1421947,43645],"passed":false},{"actual":[1816,125208,2942],"check":"regression 1","expected":[1816,125208,2943],"passed":false},{"actual":[717,0,717],"check":"partial-repair probe 2","expected":[717,0,717],"passed":true},{"actual":[463,31906,750],"check":"partial-repair probe 3","expected":[463,31906,750],"passed":true},{"actual":[1450,100000,2350],"check":"boundary control 4","expected":[1450,100000,2350],"passed":true},{"actual":[1450,50000,1900],"check":"boundary control 5","expected":[1450,50000,1900],"passed":true},{"actual":[5904,407195,9569],"check":"normal control 6","expected":[5904,407195,9569],"passed":true},{"actual":[32016,2208012,51888],"check":"normal control 7","expected":[32016,2208012,51888],"passed":true},{"actual":[26534,1829965,43004],"check":"normal control 8","expected":[26534,1829965,43004],"passed":true},{"actual":[3043,0,3043],"check":"normal control 9","expected":[3043,0,3043],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [30847, 1421947, 43644], \"expected\": [30847, 1421947, 43645], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [1816, 125208, 2942], \"expected\": [1816, 125208, 2943], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [717, 0, 717], \"expected\": [717, 0, 717], \"passed\": true}, {\"check\": \"partial-repair probe 3\", \"actual\": [463, 31906, 750], \"expected\": [463, 31906, 750], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [1450, 100000, 2350], \"expected\": [1450, 100000, 2350], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [1450, 50000, 1900], \"expected\": [1450, 50000, 1900], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [5904, 407195, 9569], \"expected\": [5904, 407195, 9569], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [32016, 2208012, 51888], \"expected\": [32016, 2208012, 51888], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [26534, 1829965, 43004], \"expected\": [26534, 1829965, 43004], \"passed\": true}, {\"check\": \"normal control 9\", \"actual\": [3043, 0, 3043], \"expected\": [3043, 0, 3043], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":48.832,"exit_code":0,"observations":[{"actual":[30847,1421947,43645],"check":"regression 0","expected":[30847,1421947,43645],"passed":true},{"actual":[1816,125208,2943],"check":"regression 1","expected":[1816,125208,2943],"passed":true},{"actual":[717,0,717],"check":"partial-repair probe 2","expected":[717,0,717],"passed":true},{"actual":[463,31906,750],"check":"partial-repair probe 3","expected":[463,31906,750],"passed":true},{"actual":[1450,100000,2350],"check":"boundary control 4","expected":[1450,100000,2350],"passed":true},{"actual":[1450,50000,1900],"check":"boundary control 5","expected":[1450,50000,1900],"passed":true},{"actual":[5904,407195,9569],"check":"normal control 6","expected":[5904,407195,9569],"passed":true},{"actual":[32016,2208012,51888],"check":"normal control 7","expected":[32016,2208012,51888],"passed":true},{"actual":[26534,1829965,43004],"check":"normal control 8","expected":[26534,1829965,43004],"passed":true},{"actual":[3043,0,3043],"check":"normal control 9","expected":[3043,0,3043],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [30847, 1421947, 43645], \"expected\": [30847, 1421947, 43645], \"passed\": true}, {\"check\": \"regression 1\", \"actual\": [1816, 125208, 2943], \"expected\": [1816, 125208, 2943], \"passed\": true}, {\"check\": \"partial-repair probe 2\", \"actual\": [717, 0, 717], \"expected\": [717, 0, 717], \"passed\": true}, {\"check\": \"partial-repair probe 3\", \"actual\": [463, 31906, 750], \"expected\": [463, 31906, 750], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [1450, 100000, 2350], \"expected\": [1450, 100000, 2350], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [1450, 50000, 1900], \"expected\": [1450, 50000, 1900], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [5904, 407195, 9569], \"expected\": [5904, 407195, 9569], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [32016, 2208012, 51888], \"expected\": [32016, 2208012, 51888], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [26534, 1829965, 43004], \"expected\": [26534, 1829965, 43004], \"passed\": true}, {\"check\": \"normal control 9\", \"actual\": [3043, 0, 3043], \"expected\": [3043, 0, 3043], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}