{"abstract":"Employees reporting other income are withheld as if that income recurred every paycheck.","category":"Payroll withholding rules","checks":9,"contract":"Input {wage, periods, status single|mfj|hoh, step2, credits, other_income, deductions, extra}; annual amounts in cents except wage and extra (per period). Annual = wage*periods + other_income. Deduction = base standard (single 8,600, mfj 12,900, hoh 8,600 dollars; halved when step2) + itemized deductions (never halved). Thresholds 7,000/30,000/90,000 dollars at 10/12/22% scaled by status unit (single 2, mfj 4, hoh 3)/2, or /4 when step2. Tentative per-period = annual tax/periods half-up; credits/periods half-up is subtracted, floored at 0, then extra is added.","evaluation_group":"w2-payroll-withholding-w4-step-adjustments","failed_approach":"The attempt divides the annual other income by periods before annualizing, so only a fraction of it is counted.","family":"w2-payroll-withholding-w4-step-adjustments-other-income-annualization","id":"FA-58911","implementations":{"attempt":{"sha256":"56890c46fc9bda6bd1e1c2b6fe2a55e6470d0351fccee2873f94d97112c6f921","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    p = x['periods']\n    annual = x['wage'] * p + x['other_income'] // p\n    base_std = {'single': 860000, 'mfj': 1290000, 'hoh': 860000}[x['status']]\n    ded = (base_std // 2 if x['step2'] else base_std) + x['deductions']\n    taxable = max(0, annual - ded)\n    unit = {'single': 2, 'mfj': 4, 'hoh': 3}[x['status']]\n    div = 4 if x['step2'] else 2\n    bounds = [700000 * unit // div, 3000000 * unit // div, 9000000 * unit // div]\n    rates = [10, 12, 22]\n    tax = 0\n    for i, lo in enumerate(bounds):\n        hi = bounds[i + 1] if i + 1 < len(bounds) else taxable\n        if taxable > lo:\n            tax += (min(taxable, hi) - lo) * rates[i]\n    tentative = (tax * 2 + 100 * p) // (200 * p)\n    credit_pp = (x['credits'] * 2 + p) // (2 * p)\n    wh = max(0, tentative - credit_pp) + x['extra']\n    return [tentative, wh]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'wage': 4942, 'periods': 12, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 1831505, 'deductions': 0, 'extra': 8860}, [2757, 8860]), ('regression', {'wage': 69636, 'periods': 24, 'status': 'hoh', 'step2': True, 'credits': 877725, 'other_income': 1721162, 'deductions': 1014955, 'extra': 0}, [5927, 0]), ('partial-repair probe', {'wage': 492438, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 400000, 'other_income': 131536, 'deductions': 0, 'extra': 0}, [59948, 26615]), ('partial-repair probe', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 111690, 'periods': 26, 'status': 'mfj', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [823, 823]), ('normal control', {'wage': 67447, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [0, 2500]), ('normal control', {'wage': 1041418, 'periods': 24, 'status': 'hoh', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [156854, 159354]), ('normal control', {'wage': 245742, 'periods': 24, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [19772, 22272])], [('regression', {'wage': 69636, 'periods': 24, 'status': 'hoh', 'step2': True, 'credits': 877725, 'other_income': 1721162, 'deductions': 1014955, 'extra': 0}, [5927, 0]), ('regression', {'wage': 492438, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 400000, 'other_income': 131536, 'deductions': 0, 'extra': 0}, [59948, 26615]), ('partial-repair probe', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('partial-repair probe', {'wage': 37313, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 117737, 'other_income': 1320234, 'deductions': 0, 'extra': 5664}, [1097, 5664]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 196398, 'periods': 12, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [6640, 6640]), ('normal control', {'wage': 64669, 'periods': 24, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [0, 2500]), ('normal control', {'wage': 232685, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 200000, 'other_income': 0, 'deductions': 479252, 'extra': 0}, [18839, 14993]), ('normal control', {'wage': 322003, 'periods': 12, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [19207, 21707])], [('regression', {'wage': 492438, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 400000, 'other_income': 131536, 'deductions': 0, 'extra': 0}, [59948, 26615]), ('regression', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('partial-repair probe', {'wage': 37313, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 117737, 'other_income': 1320234, 'deductions': 0, 'extra': 5664}, [1097, 5664]), ('partial-repair probe', {'wage': 170108, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 200000, 'other_income': 167672, 'deductions': 0, 'extra': 0}, [12373, 0]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 285367, 'periods': 52, 'status': 'hoh', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 1182238, 'extra': 2500}, [41104, 43604]), ('normal control', {'wage': 179669, 'periods': 52, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [17076, 17076]), ('normal control', {'wage': 124748, 'periods': 26, 'status': 'mfj', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [7302, 7302]), ('normal control', {'wage': 90292, 'periods': 52, 'status': 'hoh', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [7968, 10468])], [('regression', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('regression', {'wage': 93316, 'periods': 12, 'status': 'mfj', 'step2': False, 'credits': 200000, 'other_income': 1111591, 'deductions': 0, 'extra': 1563}, [0, 1563]), ('partial-repair probe', {'wage': 244499, 'periods': 26, 'status': 'hoh', 'step2': False, 'credits': 305778, 'other_income': 170107, 'deductions': 0, 'extra': 0}, [18656, 6895]), ('partial-repair probe', {'wage': 290758, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 1100573, 'deductions': 944056, 'extra': 0}, [26644, 26644]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 250357, 'periods': 52, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [31632, 34132]), ('normal control', {'wage': 142479, 'periods': 52, 'status': 'hoh', 'step2': True, 'credits': 551126, 'other_income': 0, 'deductions': 0, 'extra': 3806}, [14670, 7877]), ('normal control', {'wage': 251742, 'periods': 52, 'status': 'hoh', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 392790, 'extra': 0}, [23568, 23568]), ('normal control', {'wage': 76761, 'periods': 52, 'status': 'hoh', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [4003, 2500])], [('regression', {'wage': 37313, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 117737, 'other_income': 1320234, 'deductions': 0, 'extra': 5664}, [1097, 5664]), ('regression', {'wage': 93316, 'periods': 12, 'status': 'mfj', 'step2': False, 'credits': 200000, 'other_income': 1111591, 'deductions': 0, 'extra': 1563}, [0, 1563]), ('partial-repair probe', {'wage': 606158, 'periods': 26, 'status': 'hoh', 'step2': True, 'credits': 0, 'other_income': 1548001, 'deductions': 0, 'extra': 0}, [113103, 113103]), ('partial-repair probe', {'wage': 667888, 'periods': 24, 'status': 'hoh', 'step2': False, 'credits': 200000, 'other_income': 923171, 'deductions': 893525, 'extra': 2500}, [74949, 69116]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 451331, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [54220, 54220]), ('normal control', {'wage': 37554, 'periods': 26, 'status': 'mfj', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 695042, 'extra': 0}, [0, 0]), ('normal control', {'wage': 80276, 'periods': 52, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 10576}, [5149, 10576]), ('normal control', {'wage': 23105, 'periods': 24, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [0, 2500])]]\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":"39d6afa71d5cb9fe0e7f0be5403bed8b15bb8a4f30c29d04fb0847f060b9774b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    p = x['periods']\n    annual = (x['wage'] + x['other_income']) * p\n    base_std = {'single': 860000, 'mfj': 1290000, 'hoh': 860000}[x['status']]\n    ded = (base_std // 2 if x['step2'] else base_std) + x['deductions']\n    taxable = max(0, annual - ded)\n    unit = {'single': 2, 'mfj': 4, 'hoh': 3}[x['status']]\n    div = 4 if x['step2'] else 2\n    bounds = [700000 * unit // div, 3000000 * unit // div, 9000000 * unit // div]\n    rates = [10, 12, 22]\n    tax = 0\n    for i, lo in enumerate(bounds):\n        hi = bounds[i + 1] if i + 1 < len(bounds) else taxable\n        if taxable > lo:\n            tax += (min(taxable, hi) - lo) * rates[i]\n    tentative = (tax * 2 + 100 * p) // (200 * p)\n    credit_pp = (x['credits'] * 2 + p) // (2 * p)\n    wh = max(0, tentative - credit_pp) + x['extra']\n    return [tentative, wh]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'wage': 4942, 'periods': 12, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 1831505, 'deductions': 0, 'extra': 8860}, [2757, 8860]), ('regression', {'wage': 69636, 'periods': 24, 'status': 'hoh', 'step2': True, 'credits': 877725, 'other_income': 1721162, 'deductions': 1014955, 'extra': 0}, [5927, 0]), ('partial-repair probe', {'wage': 492438, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 400000, 'other_income': 131536, 'deductions': 0, 'extra': 0}, [59948, 26615]), ('partial-repair probe', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 111690, 'periods': 26, 'status': 'mfj', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [823, 823]), ('normal control', {'wage': 67447, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [0, 2500]), ('normal control', {'wage': 1041418, 'periods': 24, 'status': 'hoh', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [156854, 159354]), ('normal control', {'wage': 245742, 'periods': 24, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [19772, 22272])], [('regression', {'wage': 69636, 'periods': 24, 'status': 'hoh', 'step2': True, 'credits': 877725, 'other_income': 1721162, 'deductions': 1014955, 'extra': 0}, [5927, 0]), ('regression', {'wage': 492438, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 400000, 'other_income': 131536, 'deductions': 0, 'extra': 0}, [59948, 26615]), ('partial-repair probe', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('partial-repair probe', {'wage': 37313, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 117737, 'other_income': 1320234, 'deductions': 0, 'extra': 5664}, [1097, 5664]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 196398, 'periods': 12, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [6640, 6640]), ('normal control', {'wage': 64669, 'periods': 24, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [0, 2500]), ('normal control', {'wage': 232685, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 200000, 'other_income': 0, 'deductions': 479252, 'extra': 0}, [18839, 14993]), ('normal control', {'wage': 322003, 'periods': 12, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [19207, 21707])], [('regression', {'wage': 492438, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 400000, 'other_income': 131536, 'deductions': 0, 'extra': 0}, [59948, 26615]), ('regression', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('partial-repair probe', {'wage': 37313, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 117737, 'other_income': 1320234, 'deductions': 0, 'extra': 5664}, [1097, 5664]), ('partial-repair probe', {'wage': 170108, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 200000, 'other_income': 167672, 'deductions': 0, 'extra': 0}, [12373, 0]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 285367, 'periods': 52, 'status': 'hoh', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 1182238, 'extra': 2500}, [41104, 43604]), ('normal control', {'wage': 179669, 'periods': 52, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [17076, 17076]), ('normal control', {'wage': 124748, 'periods': 26, 'status': 'mfj', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [7302, 7302]), ('normal control', {'wage': 90292, 'periods': 52, 'status': 'hoh', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [7968, 10468])], [('regression', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('regression', {'wage': 93316, 'periods': 12, 'status': 'mfj', 'step2': False, 'credits': 200000, 'other_income': 1111591, 'deductions': 0, 'extra': 1563}, [0, 1563]), ('partial-repair probe', {'wage': 244499, 'periods': 26, 'status': 'hoh', 'step2': False, 'credits': 305778, 'other_income': 170107, 'deductions': 0, 'extra': 0}, [18656, 6895]), ('partial-repair probe', {'wage': 290758, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 1100573, 'deductions': 944056, 'extra': 0}, [26644, 26644]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 250357, 'periods': 52, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [31632, 34132]), ('normal control', {'wage': 142479, 'periods': 52, 'status': 'hoh', 'step2': True, 'credits': 551126, 'other_income': 0, 'deductions': 0, 'extra': 3806}, [14670, 7877]), ('normal control', {'wage': 251742, 'periods': 52, 'status': 'hoh', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 392790, 'extra': 0}, [23568, 23568]), ('normal control', {'wage': 76761, 'periods': 52, 'status': 'hoh', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [4003, 2500])], [('regression', {'wage': 37313, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 117737, 'other_income': 1320234, 'deductions': 0, 'extra': 5664}, [1097, 5664]), ('regression', {'wage': 93316, 'periods': 12, 'status': 'mfj', 'step2': False, 'credits': 200000, 'other_income': 1111591, 'deductions': 0, 'extra': 1563}, [0, 1563]), ('partial-repair probe', {'wage': 606158, 'periods': 26, 'status': 'hoh', 'step2': True, 'credits': 0, 'other_income': 1548001, 'deductions': 0, 'extra': 0}, [113103, 113103]), ('partial-repair probe', {'wage': 667888, 'periods': 24, 'status': 'hoh', 'step2': False, 'credits': 200000, 'other_income': 923171, 'deductions': 893525, 'extra': 2500}, [74949, 69116]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 451331, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [54220, 54220]), ('normal control', {'wage': 37554, 'periods': 26, 'status': 'mfj', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 695042, 'extra': 0}, [0, 0]), ('normal control', {'wage': 80276, 'periods': 52, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 10576}, [5149, 10576]), ('normal control', {'wage': 23105, 'periods': 24, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [0, 2500])]]\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":"f53ad341cac637bd6c7c4d2b2fb9e5690c41011af0d6d540093caaf422f2afb1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    p = x['periods']\n    annual = x['wage'] * p + x['other_income']\n    base_std = {'single': 860000, 'mfj': 1290000, 'hoh': 860000}[x['status']]\n    ded = (base_std // 2 if x['step2'] else base_std) + x['deductions']\n    taxable = max(0, annual - ded)\n    unit = {'single': 2, 'mfj': 4, 'hoh': 3}[x['status']]\n    div = 4 if x['step2'] else 2\n    bounds = [700000 * unit // div, 3000000 * unit // div, 9000000 * unit // div]\n    rates = [10, 12, 22]\n    tax = 0\n    for i, lo in enumerate(bounds):\n        hi = bounds[i + 1] if i + 1 < len(bounds) else taxable\n        if taxable > lo:\n            tax += (min(taxable, hi) - lo) * rates[i]\n    tentative = (tax * 2 + 100 * p) // (200 * p)\n    credit_pp = (x['credits'] * 2 + p) // (2 * p)\n    wh = max(0, tentative - credit_pp) + x['extra']\n    return [tentative, wh]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'wage': 4942, 'periods': 12, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 1831505, 'deductions': 0, 'extra': 8860}, [2757, 8860]), ('regression', {'wage': 69636, 'periods': 24, 'status': 'hoh', 'step2': True, 'credits': 877725, 'other_income': 1721162, 'deductions': 1014955, 'extra': 0}, [5927, 0]), ('partial-repair probe', {'wage': 492438, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 400000, 'other_income': 131536, 'deductions': 0, 'extra': 0}, [59948, 26615]), ('partial-repair probe', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 111690, 'periods': 26, 'status': 'mfj', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [823, 823]), ('normal control', {'wage': 67447, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [0, 2500]), ('normal control', {'wage': 1041418, 'periods': 24, 'status': 'hoh', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [156854, 159354]), ('normal control', {'wage': 245742, 'periods': 24, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [19772, 22272])], [('regression', {'wage': 69636, 'periods': 24, 'status': 'hoh', 'step2': True, 'credits': 877725, 'other_income': 1721162, 'deductions': 1014955, 'extra': 0}, [5927, 0]), ('regression', {'wage': 492438, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 400000, 'other_income': 131536, 'deductions': 0, 'extra': 0}, [59948, 26615]), ('partial-repair probe', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('partial-repair probe', {'wage': 37313, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 117737, 'other_income': 1320234, 'deductions': 0, 'extra': 5664}, [1097, 5664]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 196398, 'periods': 12, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [6640, 6640]), ('normal control', {'wage': 64669, 'periods': 24, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [0, 2500]), ('normal control', {'wage': 232685, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 200000, 'other_income': 0, 'deductions': 479252, 'extra': 0}, [18839, 14993]), ('normal control', {'wage': 322003, 'periods': 12, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [19207, 21707])], [('regression', {'wage': 492438, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 400000, 'other_income': 131536, 'deductions': 0, 'extra': 0}, [59948, 26615]), ('regression', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('partial-repair probe', {'wage': 37313, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 117737, 'other_income': 1320234, 'deductions': 0, 'extra': 5664}, [1097, 5664]), ('partial-repair probe', {'wage': 170108, 'periods': 12, 'status': 'single', 'step2': True, 'credits': 200000, 'other_income': 167672, 'deductions': 0, 'extra': 0}, [12373, 0]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 285367, 'periods': 52, 'status': 'hoh', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 1182238, 'extra': 2500}, [41104, 43604]), ('normal control', {'wage': 179669, 'periods': 52, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [17076, 17076]), ('normal control', {'wage': 124748, 'periods': 26, 'status': 'mfj', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [7302, 7302]), ('normal control', {'wage': 90292, 'periods': 52, 'status': 'hoh', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [7968, 10468])], [('regression', {'wage': 79014, 'periods': 24, 'status': 'mfj', 'step2': False, 'credits': 400000, 'other_income': 1864011, 'deductions': 0, 'extra': 0}, [4460, 0]), ('regression', {'wage': 93316, 'periods': 12, 'status': 'mfj', 'step2': False, 'credits': 200000, 'other_income': 1111591, 'deductions': 0, 'extra': 1563}, [0, 1563]), ('partial-repair probe', {'wage': 244499, 'periods': 26, 'status': 'hoh', 'step2': False, 'credits': 305778, 'other_income': 170107, 'deductions': 0, 'extra': 0}, [18656, 6895]), ('partial-repair probe', {'wage': 290758, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 1100573, 'deductions': 944056, 'extra': 0}, [26644, 26644]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 250357, 'periods': 52, 'status': 'single', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [31632, 34132]), ('normal control', {'wage': 142479, 'periods': 52, 'status': 'hoh', 'step2': True, 'credits': 551126, 'other_income': 0, 'deductions': 0, 'extra': 3806}, [14670, 7877]), ('normal control', {'wage': 251742, 'periods': 52, 'status': 'hoh', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 392790, 'extra': 0}, [23568, 23568]), ('normal control', {'wage': 76761, 'periods': 52, 'status': 'hoh', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [4003, 2500])], [('regression', {'wage': 37313, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 117737, 'other_income': 1320234, 'deductions': 0, 'extra': 5664}, [1097, 5664]), ('regression', {'wage': 93316, 'periods': 12, 'status': 'mfj', 'step2': False, 'credits': 200000, 'other_income': 1111591, 'deductions': 0, 'extra': 1563}, [0, 1563]), ('partial-repair probe', {'wage': 606158, 'periods': 26, 'status': 'hoh', 'step2': True, 'credits': 0, 'other_income': 1548001, 'deductions': 0, 'extra': 0}, [113103, 113103]), ('partial-repair probe', {'wage': 667888, 'periods': 24, 'status': 'hoh', 'step2': False, 'credits': 200000, 'other_income': 923171, 'deductions': 893525, 'extra': 2500}, [74949, 69116]), ('boundary control', {'wage': 0, 'periods': 26, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 5000}, [0, 5000]), ('normal control', {'wage': 451331, 'periods': 52, 'status': 'mfj', 'step2': False, 'credits': 0, 'other_income': 0, 'deductions': 0, 'extra': 0}, [54220, 54220]), ('normal control', {'wage': 37554, 'periods': 26, 'status': 'mfj', 'step2': True, 'credits': 0, 'other_income': 0, 'deductions': 695042, 'extra': 0}, [0, 0]), ('normal control', {'wage': 80276, 'periods': 52, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 10576}, [5149, 10576]), ('normal control', {'wage': 23105, 'periods': 24, 'status': 'single', 'step2': False, 'credits': 400000, 'other_income': 0, 'deductions': 0, 'extra': 2500}, [0, 2500])]]\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-w4-step-adjustments-other-income-annualization","generated_at":"2026-09-29T14:46:31.179842+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Modern W-4 withholding combines annual adjustments with per-period ones, and the order of flooring and adding extra withholding matters.","repair":"Restore the contract rule at the other income annualization step: use `annual = x['wage'] * p + x['other_income']`.","root_cause":"Step 4(a) other income, already an annual figure, is multiplied by the number of pay periods.","sha256":"3b2d45264f6d433f136dd01e0b7dc851553683bac5f3eb554c8b3a468ed29ff1","title":"W-4 step adjustment withholding: other income annualization · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.365,"exit_code":1,"observations":[{"actual":[0,8860],"check":"regression 0","expected":[2757,8860],"passed":false},{"actual":[0,0],"check":"regression 1","expected":[5927,0],"passed":false},{"actual":[57737,24404],"check":"partial-repair probe 2","expected":[59948,26615],"passed":false},{"actual":[0,0],"check":"partial-repair probe 3","expected":[4460,0],"passed":false},{"actual":[0,5000],"check":"boundary control 4","expected":[0,5000],"passed":true},{"actual":[823,823],"check":"normal control 5","expected":[823,823],"passed":true},{"actual":[0,2500],"check":"normal control 6","expected":[0,2500],"passed":true},{"actual":[156854,159354],"check":"normal control 7","expected":[156854,159354],"passed":true},{"actual":[19772,22272],"check":"normal control 8","expected":[19772,22272],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [0, 8860], \"expected\": [2757, 8860], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [0, 0], \"expected\": [5927, 0], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [57737, 24404], \"expected\": [59948, 26615], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [0, 0], \"expected\": [4460, 0], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [0, 5000], \"expected\": [0, 5000], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [823, 823], \"expected\": [823, 823], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [0, 2500], \"expected\": [0, 2500], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [156854, 159354], \"expected\": [156854, 159354], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [19772, 22272], \"expected\": [19772, 22272], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.666,"exit_code":1,"observations":[{"actual":[302418,277945],"check":"regression 0","expected":[2757,8860],"passed":false},{"actual":[348543,311971],"check":"regression 1","expected":[5927,0],"passed":false},{"actual":[86474,53141],"check":"partial-repair probe 2","expected":[59948,26615],"passed":false},{"actual":[329807,313140],"check":"partial-repair probe 3","expected":[4460,0],"passed":false},{"actual":[0,5000],"check":"boundary control 4","expected":[0,5000],"passed":true},{"actual":[823,823],"check":"normal control 5","expected":[823,823],"passed":true},{"actual":[0,2500],"check":"normal control 6","expected":[0,2500],"passed":true},{"actual":[156854,159354],"check":"normal control 7","expected":[156854,159354],"passed":true},{"actual":[19772,22272],"check":"normal control 8","expected":[19772,22272],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [302418, 277945], \"expected\": [2757, 8860], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [348543, 311971], \"expected\": [5927, 0], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [86474, 53141], \"expected\": [59948, 26615], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [329807, 313140], \"expected\": [4460, 0], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [0, 5000], \"expected\": [0, 5000], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [823, 823], \"expected\": [823, 823], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [0, 2500], \"expected\": [0, 2500], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [156854, 159354], \"expected\": [156854, 159354], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [19772, 22272], \"expected\": [19772, 22272], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.94,"exit_code":0,"observations":[{"actual":[2757,8860],"check":"regression 0","expected":[2757,8860],"passed":true},{"actual":[5927,0],"check":"regression 1","expected":[5927,0],"passed":true},{"actual":[59948,26615],"check":"partial-repair probe 2","expected":[59948,26615],"passed":true},{"actual":[4460,0],"check":"partial-repair probe 3","expected":[4460,0],"passed":true},{"actual":[0,5000],"check":"boundary control 4","expected":[0,5000],"passed":true},{"actual":[823,823],"check":"normal control 5","expected":[823,823],"passed":true},{"actual":[0,2500],"check":"normal control 6","expected":[0,2500],"passed":true},{"actual":[156854,159354],"check":"normal control 7","expected":[156854,159354],"passed":true},{"actual":[19772,22272],"check":"normal control 8","expected":[19772,22272],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [2757, 8860], \"expected\": [2757, 8860], \"passed\": true}, {\"check\": \"regression 1\", \"actual\": [5927, 0], \"expected\": [5927, 0], \"passed\": true}, {\"check\": \"partial-repair probe 2\", \"actual\": [59948, 26615], \"expected\": [59948, 26615], \"passed\": true}, {\"check\": \"partial-repair probe 3\", \"actual\": [4460, 0], \"expected\": [4460, 0], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [0, 5000], \"expected\": [0, 5000], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [823, 823], \"expected\": [823, 823], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [0, 2500], \"expected\": [0, 2500], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [156854, 159354], \"expected\": [156854, 159354], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [19772, 22272], \"expected\": [19772, 22272], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}