FA-59336 / Payroll withholding rules / Open access
Whole-dollar income tax withholding option: rounding scope · case 01
Total tax withheld does not equal income tax plus FICA.
ROOT CAUSE
The whole-dollar rounding is applied to the total including FICA.
VERIFIED REPAIR
Restore the contract rule at the rounding scope step: use `return [fit, fit + x['fica']]`.
Unsuccessful approach: The attempt rounds FICA itself, which must never be rounded.
Case contract
Input {fit, extra, whole_dollar, fica}. Income tax withholding = fit + extra; when whole_dollar is elected, that sum is rounded to the nearest dollar (half-up). FICA is never rounded. Return [income_tax, income_tax + fica].
Why this case matters
Whole-dollar rounding is optional for income tax only and must be applied after all income tax components.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
fit = x['fit'] + x['extra']
if x['whole_dollar']:
fit = (fit + 50) // 100 * 100
return [fit, (fit + x['fica'] + 50) // 100 * 100]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'fit': 90104, 'extra': 2500, 'whole_dollar': True, 'fica': 8194}, [92600, 100794]), ('regression', {'fit': 69591, 'extra': 0, 'whole_dollar': False, 'fica': 14775}, [69591, 84366]), ('partial-repair probe', {'fit': 9156, 'extra': 2251, 'whole_dollar': True, 'fica': 25269}, [11400, 36669]), ('partial-repair probe', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000]), ('normal control', {'fit': 34256, 'extra': 2500, 'whole_dollar': True, 'fica': 23300}, [36800, 60100]), ('normal control', {'fit': 144149, 'extra': 3470, 'whole_dollar': True, 'fica': 14100}, [147600, 161700])], [('regression', {'fit': 69591, 'extra': 0, 'whole_dollar': False, 'fica': 14775}, [69591, 84366]), ('regression', {'fit': 9156, 'extra': 2251, 'whole_dollar': True, 'fica': 25269}, [11400, 36669]), ('partial-repair probe', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('partial-repair probe', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('normal control', {'fit': 7112, 'extra': 0, 'whole_dollar': True, 'fica': 24200}, [7100, 31300]), ('normal control', {'fit': 162693, 'extra': 0, 'whole_dollar': True, 'fica': 20000}, [162700, 182700]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000])], [('regression', {'fit': 9156, 'extra': 2251, 'whole_dollar': True, 'fica': 25269}, [11400, 36669]), ('regression', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('partial-repair probe', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('partial-repair probe', {'fit': 88332, 'extra': 0, 'whole_dollar': True, 'fica': 8166}, [88300, 96466]), ('normal control', {'fit': 34256, 'extra': 2500, 'whole_dollar': True, 'fica': 23300}, [36800, 60100]), ('normal control', {'fit': 144149, 'extra': 3470, 'whole_dollar': True, 'fica': 14100}, [147600, 161700]), ('normal control', {'fit': 7112, 'extra': 0, 'whole_dollar': True, 'fica': 24200}, [7100, 31300]), ('normal control', {'fit': 162693, 'extra': 0, 'whole_dollar': True, 'fica': 20000}, [162700, 182700])], [('regression', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('regression', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('partial-repair probe', {'fit': 87258, 'extra': 0, 'whole_dollar': False, 'fica': 46798}, [87258, 134056]), ('partial-repair probe', {'fit': 132638, 'extra': 2500, 'whole_dollar': True, 'fica': 46802}, [135100, 181902]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000]), ('normal control', {'fit': 34256, 'extra': 2500, 'whole_dollar': True, 'fica': 23300}, [36800, 60100]), ('normal control', {'fit': 144149, 'extra': 3470, 'whole_dollar': True, 'fica': 14100}, [147600, 161700])], [('regression', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('regression', {'fit': 88332, 'extra': 0, 'whole_dollar': True, 'fica': 8166}, [88300, 96466]), ('partial-repair probe', {'fit': 8185, 'extra': 1110, 'whole_dollar': True, 'fica': 28304}, [9300, 37604]), ('partial-repair probe', {'fit': 39742, 'extra': 2500, 'whole_dollar': True, 'fica': 2719}, [42200, 44919]), ('normal control', {'fit': 7112, 'extra': 0, 'whole_dollar': True, 'fica': 24200}, [7100, 31300]), ('normal control', {'fit': 162693, 'extra': 0, 'whole_dollar': True, 'fica': 20000}, [162700, 182700]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000])]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
check("%s %d" % (label, i), solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [92600, 100800] | [92600, 100794] | Failed |
| regression 1 | [69591, 84400] | [69591, 84366] | Failed |
| partial-repair probe 2 | [11400, 36700] | [11400, 36669] | Failed |
| partial-repair probe 3 | [158465, 203100] | [158465, 203080] | Failed |
| normal control 4 | [66200, 105600] | [66200, 105600] | Passed |
| normal control 5 | [83700, 111000] | [83700, 111000] | Passed |
| normal control 6 | [36800, 60100] | [36800, 60100] | Passed |
| normal control 7 | [147600, 161700] | [147600, 161700] | Passed |
SHA-256 / e41b0fb97c3400e4b029d7a2ac6be30cad5da8ec9ba37efafd0df27cd7ec1f07
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
fit = x['fit'] + x['extra']
if x['whole_dollar']:
fit = (fit + 50) // 100 * 100
return [fit, fit + (x['fica'] + 50) // 100 * 100]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'fit': 90104, 'extra': 2500, 'whole_dollar': True, 'fica': 8194}, [92600, 100794]), ('regression', {'fit': 69591, 'extra': 0, 'whole_dollar': False, 'fica': 14775}, [69591, 84366]), ('partial-repair probe', {'fit': 9156, 'extra': 2251, 'whole_dollar': True, 'fica': 25269}, [11400, 36669]), ('partial-repair probe', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000]), ('normal control', {'fit': 34256, 'extra': 2500, 'whole_dollar': True, 'fica': 23300}, [36800, 60100]), ('normal control', {'fit': 144149, 'extra': 3470, 'whole_dollar': True, 'fica': 14100}, [147600, 161700])], [('regression', {'fit': 69591, 'extra': 0, 'whole_dollar': False, 'fica': 14775}, [69591, 84366]), ('regression', {'fit': 9156, 'extra': 2251, 'whole_dollar': True, 'fica': 25269}, [11400, 36669]), ('partial-repair probe', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('partial-repair probe', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('normal control', {'fit': 7112, 'extra': 0, 'whole_dollar': True, 'fica': 24200}, [7100, 31300]), ('normal control', {'fit': 162693, 'extra': 0, 'whole_dollar': True, 'fica': 20000}, [162700, 182700]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000])], [('regression', {'fit': 9156, 'extra': 2251, 'whole_dollar': True, 'fica': 25269}, [11400, 36669]), ('regression', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('partial-repair probe', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('partial-repair probe', {'fit': 88332, 'extra': 0, 'whole_dollar': True, 'fica': 8166}, [88300, 96466]), ('normal control', {'fit': 34256, 'extra': 2500, 'whole_dollar': True, 'fica': 23300}, [36800, 60100]), ('normal control', {'fit': 144149, 'extra': 3470, 'whole_dollar': True, 'fica': 14100}, [147600, 161700]), ('normal control', {'fit': 7112, 'extra': 0, 'whole_dollar': True, 'fica': 24200}, [7100, 31300]), ('normal control', {'fit': 162693, 'extra': 0, 'whole_dollar': True, 'fica': 20000}, [162700, 182700])], [('regression', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('regression', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('partial-repair probe', {'fit': 87258, 'extra': 0, 'whole_dollar': False, 'fica': 46798}, [87258, 134056]), ('partial-repair probe', {'fit': 132638, 'extra': 2500, 'whole_dollar': True, 'fica': 46802}, [135100, 181902]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000]), ('normal control', {'fit': 34256, 'extra': 2500, 'whole_dollar': True, 'fica': 23300}, [36800, 60100]), ('normal control', {'fit': 144149, 'extra': 3470, 'whole_dollar': True, 'fica': 14100}, [147600, 161700])], [('regression', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('regression', {'fit': 88332, 'extra': 0, 'whole_dollar': True, 'fica': 8166}, [88300, 96466]), ('partial-repair probe', {'fit': 8185, 'extra': 1110, 'whole_dollar': True, 'fica': 28304}, [9300, 37604]), ('partial-repair probe', {'fit': 39742, 'extra': 2500, 'whole_dollar': True, 'fica': 2719}, [42200, 44919]), ('normal control', {'fit': 7112, 'extra': 0, 'whole_dollar': True, 'fica': 24200}, [7100, 31300]), ('normal control', {'fit': 162693, 'extra': 0, 'whole_dollar': True, 'fica': 20000}, [162700, 182700]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000])]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
check("%s %d" % (label, i), solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [92600, 100800] | [92600, 100794] | Failed |
| regression 1 | [69591, 84391] | [69591, 84366] | Failed |
| partial-repair probe 2 | [11400, 36700] | [11400, 36669] | Failed |
| partial-repair probe 3 | [158465, 203065] | [158465, 203080] | Failed |
| normal control 4 | [66200, 105600] | [66200, 105600] | Passed |
| normal control 5 | [83700, 111000] | [83700, 111000] | Passed |
| normal control 6 | [36800, 60100] | [36800, 60100] | Passed |
| normal control 7 | [147600, 161700] | [147600, 161700] | Passed |
SHA-256 / 5f93440a8a95a4868802a1a1eb71a70afd26b86c91d967db8b51227586f1de1e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
fit = x['fit'] + x['extra']
if x['whole_dollar']:
fit = (fit + 50) // 100 * 100
return [fit, fit + x['fica']]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'fit': 90104, 'extra': 2500, 'whole_dollar': True, 'fica': 8194}, [92600, 100794]), ('regression', {'fit': 69591, 'extra': 0, 'whole_dollar': False, 'fica': 14775}, [69591, 84366]), ('partial-repair probe', {'fit': 9156, 'extra': 2251, 'whole_dollar': True, 'fica': 25269}, [11400, 36669]), ('partial-repair probe', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000]), ('normal control', {'fit': 34256, 'extra': 2500, 'whole_dollar': True, 'fica': 23300}, [36800, 60100]), ('normal control', {'fit': 144149, 'extra': 3470, 'whole_dollar': True, 'fica': 14100}, [147600, 161700])], [('regression', {'fit': 69591, 'extra': 0, 'whole_dollar': False, 'fica': 14775}, [69591, 84366]), ('regression', {'fit': 9156, 'extra': 2251, 'whole_dollar': True, 'fica': 25269}, [11400, 36669]), ('partial-repair probe', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('partial-repair probe', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('normal control', {'fit': 7112, 'extra': 0, 'whole_dollar': True, 'fica': 24200}, [7100, 31300]), ('normal control', {'fit': 162693, 'extra': 0, 'whole_dollar': True, 'fica': 20000}, [162700, 182700]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000])], [('regression', {'fit': 9156, 'extra': 2251, 'whole_dollar': True, 'fica': 25269}, [11400, 36669]), ('regression', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('partial-repair probe', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('partial-repair probe', {'fit': 88332, 'extra': 0, 'whole_dollar': True, 'fica': 8166}, [88300, 96466]), ('normal control', {'fit': 34256, 'extra': 2500, 'whole_dollar': True, 'fica': 23300}, [36800, 60100]), ('normal control', {'fit': 144149, 'extra': 3470, 'whole_dollar': True, 'fica': 14100}, [147600, 161700]), ('normal control', {'fit': 7112, 'extra': 0, 'whole_dollar': True, 'fica': 24200}, [7100, 31300]), ('normal control', {'fit': 162693, 'extra': 0, 'whole_dollar': True, 'fica': 20000}, [162700, 182700])], [('regression', {'fit': 154831, 'extra': 3634, 'whole_dollar': False, 'fica': 44615}, [158465, 203080]), ('regression', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('partial-repair probe', {'fit': 87258, 'extra': 0, 'whole_dollar': False, 'fica': 46798}, [87258, 134056]), ('partial-repair probe', {'fit': 132638, 'extra': 2500, 'whole_dollar': True, 'fica': 46802}, [135100, 181902]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000]), ('normal control', {'fit': 34256, 'extra': 2500, 'whole_dollar': True, 'fica': 23300}, [36800, 60100]), ('normal control', {'fit': 144149, 'extra': 3470, 'whole_dollar': True, 'fica': 14100}, [147600, 161700])], [('regression', {'fit': 77351, 'extra': 0, 'whole_dollar': False, 'fica': 12610}, [77351, 89961]), ('regression', {'fit': 88332, 'extra': 0, 'whole_dollar': True, 'fica': 8166}, [88300, 96466]), ('partial-repair probe', {'fit': 8185, 'extra': 1110, 'whole_dollar': True, 'fica': 28304}, [9300, 37604]), ('partial-repair probe', {'fit': 39742, 'extra': 2500, 'whole_dollar': True, 'fica': 2719}, [42200, 44919]), ('normal control', {'fit': 7112, 'extra': 0, 'whole_dollar': True, 'fica': 24200}, [7100, 31300]), ('normal control', {'fit': 162693, 'extra': 0, 'whole_dollar': True, 'fica': 20000}, [162700, 182700]), ('normal control', {'fit': 62879, 'extra': 3308, 'whole_dollar': True, 'fica': 39400}, [66200, 105600]), ('normal control', {'fit': 83687, 'extra': 0, 'whole_dollar': True, 'fica': 27300}, [83700, 111000])]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
check("%s %d" % (label, i), solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [92600, 100794] | [92600, 100794] | Passed |
| regression 1 | [69591, 84366] | [69591, 84366] | Passed |
| partial-repair probe 2 | [11400, 36669] | [11400, 36669] | Passed |
| partial-repair probe 3 | [158465, 203080] | [158465, 203080] | Passed |
| normal control 4 | [66200, 105600] | [66200, 105600] | Passed |
| normal control 5 | [83700, 111000] | [83700, 111000] | Passed |
| normal control 6 | [36800, 60100] | [36800, 60100] | Passed |
| normal control 7 | [147600, 161700] | [147600, 161700] | Passed |
SHA-256 / 9e016ffbd9b34e760cfbd79b3bc635b078126d6abc290a5f778143cbc380e90e
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:46:35.388400+00:00.
Case digest / 996fb0f359a0e31999639f99cdaacdfedc35d8274a29f8227270e59f37ce9eaa