FA-59041 / Payroll withholding rules / Open access
401(k) deferral limit with catch-up: deferral percentage base · case 01
Deferrals are smaller than the election because they are computed on net pay.
ROOT CAUSE
The elected percentage is applied to net available pay instead of gross compensation.
VERIFIED REPAIR
Restore the contract rule at the deferral percentage base step: use `want = (x['gross'] * x['pct'] + 50) // 100`.
Unsuccessful approach: The attempt uses gross pay but truncates, a cent short on fractional elections.
Case contract
Input {gross, pct, ytd, birth_year, year, net_available}. Requested deferral = gross*pct/100 half-up. Annual cap 23,000.00 plus 7,500.00 catch-up when the employee turns 50 or older during the year. Deferral = min(request, max(0, cap - ytd), net_available). Return [deferral, remaining room after it].
Why this case matters
Deferral limits apply to the calendar year of the age milestone and cannot exceed pay available after taxes.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
want = (x['net_available'] * x['pct'] + 50) // 100
age = x['year'] - x['birth_year']
cap = 2300000 + (750000 if age >= 50 else 0)
room = max(0, cap - x['ytd'])
d = min(want, room)
d = min(d, x['net_available'])
return [d, room - d]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'gross': 1618397, 'pct': 3, 'ytd': 2121789, 'birth_year': 1961, 'year': 2025, 'net_available': 1350724}, [48552, 879659]), ('regression', {'gross': 50757, 'pct': 3, 'ytd': 2246489, 'birth_year': 2005, 'year': 2025, 'net_available': 492828}, [1523, 51988]), ('partial-repair probe', {'gross': 1114570, 'pct': 15, 'ytd': 2028957, 'birth_year': 1995, 'year': 2025, 'net_available': 1264377}, [167186, 103857]), ('partial-repair probe', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('normal control', {'gross': 1457089, 'pct': 0, 'ytd': 2996561, 'birth_year': 1976, 'year': 2025, 'net_available': 161315}, [0, 0]), ('normal control', {'gross': 742708, 'pct': 50, 'ytd': 2300000, 'birth_year': 1987, 'year': 2025, 'net_available': 358846}, [0, 0]), ('normal control', {'gross': 1338450, 'pct': 0, 'ytd': 895056, 'birth_year': 1965, 'year': 2025, 'net_available': 341182}, [0, 2154944]), ('normal control', {'gross': 1413796, 'pct': 0, 'ytd': 2267407, 'birth_year': 1974, 'year': 2024, 'net_available': 1155850}, [0, 782593])], [('regression', {'gross': 50757, 'pct': 3, 'ytd': 2246489, 'birth_year': 2005, 'year': 2025, 'net_available': 492828}, [1523, 51988]), ('regression', {'gross': 1114570, 'pct': 15, 'ytd': 2028957, 'birth_year': 1995, 'year': 2025, 'net_available': 1264377}, [167186, 103857]), ('partial-repair probe', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('partial-repair probe', {'gross': 320598, 'pct': 3, 'ytd': 257717, 'birth_year': 1973, 'year': 2024, 'net_available': 164909}, [9618, 2782665]), ('normal control', {'gross': 243481, 'pct': 10, 'ytd': 2857536, 'birth_year': 1999, 'year': 2024, 'net_available': 109046}, [0, 0]), ('normal control', {'gross': 1755234, 'pct': 75, 'ytd': 2857725, 'birth_year': 1965, 'year': 2025, 'net_available': 1444455}, [192275, 0]), ('normal control', {'gross': 1255430, 'pct': 0, 'ytd': 322436, 'birth_year': 1964, 'year': 2024, 'net_available': 213657}, [0, 2727564]), ('normal control', {'gross': 466414, 'pct': 33, 'ytd': 2300000, 'birth_year': 1994, 'year': 2025, 'net_available': 1301026}, [0, 0])], [('regression', {'gross': 1114570, 'pct': 15, 'ytd': 2028957, 'birth_year': 1995, 'year': 2025, 'net_available': 1264377}, [167186, 103857]), ('regression', {'gross': 721708, 'pct': 75, 'ytd': 453300, 'birth_year': 1975, 'year': 2024, 'net_available': 60633}, [60633, 1786067]), ('partial-repair probe', {'gross': 320598, 'pct': 3, 'ytd': 257717, 'birth_year': 1973, 'year': 2024, 'net_available': 164909}, [9618, 2782665]), ('partial-repair probe', {'gross': 73922, 'pct': 90, 'ytd': 2171484, 'birth_year': 1974, 'year': 2025, 'net_available': 651545}, [66530, 811986]), ('normal control', {'gross': 153394, 'pct': 50, 'ytd': 2232880, 'birth_year': 1994, 'year': 2024, 'net_available': 220513}, [67120, 0]), ('normal control', {'gross': 1415766, 'pct': 0, 'ytd': 2300000, 'birth_year': 1973, 'year': 2024, 'net_available': 1433510}, [0, 750000]), ('normal control', {'gross': 1325390, 'pct': 15, 'ytd': 3004038, 'birth_year': 1973, 'year': 2024, 'net_available': 1230228}, [45962, 0]), ('normal control', {'gross': 1693660, 'pct': 15, 'ytd': 2977024, 'birth_year': 1988, 'year': 2025, 'net_available': 9919}, [0, 0])], [('regression', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('regression', {'gross': 721708, 'pct': 75, 'ytd': 453300, 'birth_year': 1975, 'year': 2024, 'net_available': 60633}, [60633, 1786067]), ('partial-repair probe', {'gross': 1771224, 'pct': 15, 'ytd': 2300000, 'birth_year': 1973, 'year': 2024, 'net_available': 756642}, [265684, 484316]), ('partial-repair probe', {'gross': 66663, 'pct': 50, 'ytd': 852939, 'birth_year': 1983, 'year': 2025, 'net_available': 643352}, [33332, 1413729]), ('normal control', {'gross': 1791193, 'pct': 75, 'ytd': 2946558, 'birth_year': 1964, 'year': 2024, 'net_available': 587430}, [103442, 0]), ('normal control', {'gross': 1886269, 'pct': 0, 'ytd': 3022556, 'birth_year': 1974, 'year': 2025, 'net_available': 531609}, [0, 27444]), ('normal control', {'gross': 901600, 'pct': 0, 'ytd': 2179894, 'birth_year': 1975, 'year': 2024, 'net_available': 1421448}, [0, 120106]), ('normal control', {'gross': 1505848, 'pct': 6, 'ytd': 2895487, 'birth_year': 1975, 'year': 2024, 'net_available': 685023}, [0, 0])], [('regression', {'gross': 320598, 'pct': 3, 'ytd': 257717, 'birth_year': 1973, 'year': 2024, 'net_available': 164909}, [9618, 2782665]), ('regression', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('partial-repair probe', {'gross': 1552698, 'pct': 3, 'ytd': 926873, 'birth_year': 1974, 'year': 2024, 'net_available': 1490831}, [46581, 2076546]), ('partial-repair probe', {'gross': 160130, 'pct': 6, 'ytd': 2300000, 'birth_year': 1974, 'year': 2025, 'net_available': 888833}, [9608, 740392]), ('normal control', {'gross': 1731857, 'pct': 75, 'ytd': 2300000, 'birth_year': 1975, 'year': 2025, 'net_available': 1370216}, [750000, 0]), ('normal control', {'gross': 159714, 'pct': 50, 'ytd': 2300000, 'birth_year': 1996, 'year': 2024, 'net_available': 855993}, [0, 0]), ('normal control', {'gross': 1366584, 'pct': 0, 'ytd': 2421747, 'birth_year': 1974, 'year': 2024, 'net_available': 331646}, [0, 628253]), ('normal control', {'gross': 1043587, 'pct': 10, 'ytd': 2279748, 'birth_year': 1994, 'year': 2024, 'net_available': 991524}, [20252, 0])]]
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 | [40522, 887689] | [48552, 879659] | Failed |
| regression 1 | [14785, 38726] | [1523, 51988] | Failed |
| partial-repair probe 2 | [189657, 81386] | [167186, 103857] | Failed |
| partial-repair probe 3 | [36834, 715572] | [5852, 746554] | Failed |
| normal control 4 | [0, 0] | [0, 0] | Passed |
| normal control 5 | [0, 0] | [0, 0] | Passed |
| normal control 6 | [0, 2154944] | [0, 2154944] | Passed |
| normal control 7 | [0, 782593] | [0, 782593] | Passed |
SHA-256 / 060ffdb0ab026af0a1c1d22f9a03d52ab837bd5d720dd803833768b12c302724
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
want = x['gross'] * x['pct'] // 100
age = x['year'] - x['birth_year']
cap = 2300000 + (750000 if age >= 50 else 0)
room = max(0, cap - x['ytd'])
d = min(want, room)
d = min(d, x['net_available'])
return [d, room - d]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'gross': 1618397, 'pct': 3, 'ytd': 2121789, 'birth_year': 1961, 'year': 2025, 'net_available': 1350724}, [48552, 879659]), ('regression', {'gross': 50757, 'pct': 3, 'ytd': 2246489, 'birth_year': 2005, 'year': 2025, 'net_available': 492828}, [1523, 51988]), ('partial-repair probe', {'gross': 1114570, 'pct': 15, 'ytd': 2028957, 'birth_year': 1995, 'year': 2025, 'net_available': 1264377}, [167186, 103857]), ('partial-repair probe', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('normal control', {'gross': 1457089, 'pct': 0, 'ytd': 2996561, 'birth_year': 1976, 'year': 2025, 'net_available': 161315}, [0, 0]), ('normal control', {'gross': 742708, 'pct': 50, 'ytd': 2300000, 'birth_year': 1987, 'year': 2025, 'net_available': 358846}, [0, 0]), ('normal control', {'gross': 1338450, 'pct': 0, 'ytd': 895056, 'birth_year': 1965, 'year': 2025, 'net_available': 341182}, [0, 2154944]), ('normal control', {'gross': 1413796, 'pct': 0, 'ytd': 2267407, 'birth_year': 1974, 'year': 2024, 'net_available': 1155850}, [0, 782593])], [('regression', {'gross': 50757, 'pct': 3, 'ytd': 2246489, 'birth_year': 2005, 'year': 2025, 'net_available': 492828}, [1523, 51988]), ('regression', {'gross': 1114570, 'pct': 15, 'ytd': 2028957, 'birth_year': 1995, 'year': 2025, 'net_available': 1264377}, [167186, 103857]), ('partial-repair probe', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('partial-repair probe', {'gross': 320598, 'pct': 3, 'ytd': 257717, 'birth_year': 1973, 'year': 2024, 'net_available': 164909}, [9618, 2782665]), ('normal control', {'gross': 243481, 'pct': 10, 'ytd': 2857536, 'birth_year': 1999, 'year': 2024, 'net_available': 109046}, [0, 0]), ('normal control', {'gross': 1755234, 'pct': 75, 'ytd': 2857725, 'birth_year': 1965, 'year': 2025, 'net_available': 1444455}, [192275, 0]), ('normal control', {'gross': 1255430, 'pct': 0, 'ytd': 322436, 'birth_year': 1964, 'year': 2024, 'net_available': 213657}, [0, 2727564]), ('normal control', {'gross': 466414, 'pct': 33, 'ytd': 2300000, 'birth_year': 1994, 'year': 2025, 'net_available': 1301026}, [0, 0])], [('regression', {'gross': 1114570, 'pct': 15, 'ytd': 2028957, 'birth_year': 1995, 'year': 2025, 'net_available': 1264377}, [167186, 103857]), ('regression', {'gross': 721708, 'pct': 75, 'ytd': 453300, 'birth_year': 1975, 'year': 2024, 'net_available': 60633}, [60633, 1786067]), ('partial-repair probe', {'gross': 320598, 'pct': 3, 'ytd': 257717, 'birth_year': 1973, 'year': 2024, 'net_available': 164909}, [9618, 2782665]), ('partial-repair probe', {'gross': 73922, 'pct': 90, 'ytd': 2171484, 'birth_year': 1974, 'year': 2025, 'net_available': 651545}, [66530, 811986]), ('normal control', {'gross': 153394, 'pct': 50, 'ytd': 2232880, 'birth_year': 1994, 'year': 2024, 'net_available': 220513}, [67120, 0]), ('normal control', {'gross': 1415766, 'pct': 0, 'ytd': 2300000, 'birth_year': 1973, 'year': 2024, 'net_available': 1433510}, [0, 750000]), ('normal control', {'gross': 1325390, 'pct': 15, 'ytd': 3004038, 'birth_year': 1973, 'year': 2024, 'net_available': 1230228}, [45962, 0]), ('normal control', {'gross': 1693660, 'pct': 15, 'ytd': 2977024, 'birth_year': 1988, 'year': 2025, 'net_available': 9919}, [0, 0])], [('regression', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('regression', {'gross': 721708, 'pct': 75, 'ytd': 453300, 'birth_year': 1975, 'year': 2024, 'net_available': 60633}, [60633, 1786067]), ('partial-repair probe', {'gross': 1771224, 'pct': 15, 'ytd': 2300000, 'birth_year': 1973, 'year': 2024, 'net_available': 756642}, [265684, 484316]), ('partial-repair probe', {'gross': 66663, 'pct': 50, 'ytd': 852939, 'birth_year': 1983, 'year': 2025, 'net_available': 643352}, [33332, 1413729]), ('normal control', {'gross': 1791193, 'pct': 75, 'ytd': 2946558, 'birth_year': 1964, 'year': 2024, 'net_available': 587430}, [103442, 0]), ('normal control', {'gross': 1886269, 'pct': 0, 'ytd': 3022556, 'birth_year': 1974, 'year': 2025, 'net_available': 531609}, [0, 27444]), ('normal control', {'gross': 901600, 'pct': 0, 'ytd': 2179894, 'birth_year': 1975, 'year': 2024, 'net_available': 1421448}, [0, 120106]), ('normal control', {'gross': 1505848, 'pct': 6, 'ytd': 2895487, 'birth_year': 1975, 'year': 2024, 'net_available': 685023}, [0, 0])], [('regression', {'gross': 320598, 'pct': 3, 'ytd': 257717, 'birth_year': 1973, 'year': 2024, 'net_available': 164909}, [9618, 2782665]), ('regression', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('partial-repair probe', {'gross': 1552698, 'pct': 3, 'ytd': 926873, 'birth_year': 1974, 'year': 2024, 'net_available': 1490831}, [46581, 2076546]), ('partial-repair probe', {'gross': 160130, 'pct': 6, 'ytd': 2300000, 'birth_year': 1974, 'year': 2025, 'net_available': 888833}, [9608, 740392]), ('normal control', {'gross': 1731857, 'pct': 75, 'ytd': 2300000, 'birth_year': 1975, 'year': 2025, 'net_available': 1370216}, [750000, 0]), ('normal control', {'gross': 159714, 'pct': 50, 'ytd': 2300000, 'birth_year': 1996, 'year': 2024, 'net_available': 855993}, [0, 0]), ('normal control', {'gross': 1366584, 'pct': 0, 'ytd': 2421747, 'birth_year': 1974, 'year': 2024, 'net_available': 331646}, [0, 628253]), ('normal control', {'gross': 1043587, 'pct': 10, 'ytd': 2279748, 'birth_year': 1994, 'year': 2024, 'net_available': 991524}, [20252, 0])]]
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 | [48551, 879660] | [48552, 879659] | Failed |
| regression 1 | [1522, 51989] | [1523, 51988] | Failed |
| partial-repair probe 2 | [167185, 103858] | [167186, 103857] | Failed |
| partial-repair probe 3 | [5851, 746555] | [5852, 746554] | Failed |
| normal control 4 | [0, 0] | [0, 0] | Passed |
| normal control 5 | [0, 0] | [0, 0] | Passed |
| normal control 6 | [0, 2154944] | [0, 2154944] | Passed |
| normal control 7 | [0, 782593] | [0, 782593] | Passed |
SHA-256 / b2c1b4ee6876afb6c3b307393ce350b7014e77a83f7173395bb8d048d97319e5
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
want = (x['gross'] * x['pct'] + 50) // 100
age = x['year'] - x['birth_year']
cap = 2300000 + (750000 if age >= 50 else 0)
room = max(0, cap - x['ytd'])
d = min(want, room)
d = min(d, x['net_available'])
return [d, room - d]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'gross': 1618397, 'pct': 3, 'ytd': 2121789, 'birth_year': 1961, 'year': 2025, 'net_available': 1350724}, [48552, 879659]), ('regression', {'gross': 50757, 'pct': 3, 'ytd': 2246489, 'birth_year': 2005, 'year': 2025, 'net_available': 492828}, [1523, 51988]), ('partial-repair probe', {'gross': 1114570, 'pct': 15, 'ytd': 2028957, 'birth_year': 1995, 'year': 2025, 'net_available': 1264377}, [167186, 103857]), ('partial-repair probe', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('normal control', {'gross': 1457089, 'pct': 0, 'ytd': 2996561, 'birth_year': 1976, 'year': 2025, 'net_available': 161315}, [0, 0]), ('normal control', {'gross': 742708, 'pct': 50, 'ytd': 2300000, 'birth_year': 1987, 'year': 2025, 'net_available': 358846}, [0, 0]), ('normal control', {'gross': 1338450, 'pct': 0, 'ytd': 895056, 'birth_year': 1965, 'year': 2025, 'net_available': 341182}, [0, 2154944]), ('normal control', {'gross': 1413796, 'pct': 0, 'ytd': 2267407, 'birth_year': 1974, 'year': 2024, 'net_available': 1155850}, [0, 782593])], [('regression', {'gross': 50757, 'pct': 3, 'ytd': 2246489, 'birth_year': 2005, 'year': 2025, 'net_available': 492828}, [1523, 51988]), ('regression', {'gross': 1114570, 'pct': 15, 'ytd': 2028957, 'birth_year': 1995, 'year': 2025, 'net_available': 1264377}, [167186, 103857]), ('partial-repair probe', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('partial-repair probe', {'gross': 320598, 'pct': 3, 'ytd': 257717, 'birth_year': 1973, 'year': 2024, 'net_available': 164909}, [9618, 2782665]), ('normal control', {'gross': 243481, 'pct': 10, 'ytd': 2857536, 'birth_year': 1999, 'year': 2024, 'net_available': 109046}, [0, 0]), ('normal control', {'gross': 1755234, 'pct': 75, 'ytd': 2857725, 'birth_year': 1965, 'year': 2025, 'net_available': 1444455}, [192275, 0]), ('normal control', {'gross': 1255430, 'pct': 0, 'ytd': 322436, 'birth_year': 1964, 'year': 2024, 'net_available': 213657}, [0, 2727564]), ('normal control', {'gross': 466414, 'pct': 33, 'ytd': 2300000, 'birth_year': 1994, 'year': 2025, 'net_available': 1301026}, [0, 0])], [('regression', {'gross': 1114570, 'pct': 15, 'ytd': 2028957, 'birth_year': 1995, 'year': 2025, 'net_available': 1264377}, [167186, 103857]), ('regression', {'gross': 721708, 'pct': 75, 'ytd': 453300, 'birth_year': 1975, 'year': 2024, 'net_available': 60633}, [60633, 1786067]), ('partial-repair probe', {'gross': 320598, 'pct': 3, 'ytd': 257717, 'birth_year': 1973, 'year': 2024, 'net_available': 164909}, [9618, 2782665]), ('partial-repair probe', {'gross': 73922, 'pct': 90, 'ytd': 2171484, 'birth_year': 1974, 'year': 2025, 'net_available': 651545}, [66530, 811986]), ('normal control', {'gross': 153394, 'pct': 50, 'ytd': 2232880, 'birth_year': 1994, 'year': 2024, 'net_available': 220513}, [67120, 0]), ('normal control', {'gross': 1415766, 'pct': 0, 'ytd': 2300000, 'birth_year': 1973, 'year': 2024, 'net_available': 1433510}, [0, 750000]), ('normal control', {'gross': 1325390, 'pct': 15, 'ytd': 3004038, 'birth_year': 1973, 'year': 2024, 'net_available': 1230228}, [45962, 0]), ('normal control', {'gross': 1693660, 'pct': 15, 'ytd': 2977024, 'birth_year': 1988, 'year': 2025, 'net_available': 9919}, [0, 0])], [('regression', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('regression', {'gross': 721708, 'pct': 75, 'ytd': 453300, 'birth_year': 1975, 'year': 2024, 'net_available': 60633}, [60633, 1786067]), ('partial-repair probe', {'gross': 1771224, 'pct': 15, 'ytd': 2300000, 'birth_year': 1973, 'year': 2024, 'net_available': 756642}, [265684, 484316]), ('partial-repair probe', {'gross': 66663, 'pct': 50, 'ytd': 852939, 'birth_year': 1983, 'year': 2025, 'net_available': 643352}, [33332, 1413729]), ('normal control', {'gross': 1791193, 'pct': 75, 'ytd': 2946558, 'birth_year': 1964, 'year': 2024, 'net_available': 587430}, [103442, 0]), ('normal control', {'gross': 1886269, 'pct': 0, 'ytd': 3022556, 'birth_year': 1974, 'year': 2025, 'net_available': 531609}, [0, 27444]), ('normal control', {'gross': 901600, 'pct': 0, 'ytd': 2179894, 'birth_year': 1975, 'year': 2024, 'net_available': 1421448}, [0, 120106]), ('normal control', {'gross': 1505848, 'pct': 6, 'ytd': 2895487, 'birth_year': 1975, 'year': 2024, 'net_available': 685023}, [0, 0])], [('regression', {'gross': 320598, 'pct': 3, 'ytd': 257717, 'birth_year': 1973, 'year': 2024, 'net_available': 164909}, [9618, 2782665]), ('regression', {'gross': 195058, 'pct': 3, 'ytd': 2297594, 'birth_year': 1965, 'year': 2025, 'net_available': 1227790}, [5852, 746554]), ('partial-repair probe', {'gross': 1552698, 'pct': 3, 'ytd': 926873, 'birth_year': 1974, 'year': 2024, 'net_available': 1490831}, [46581, 2076546]), ('partial-repair probe', {'gross': 160130, 'pct': 6, 'ytd': 2300000, 'birth_year': 1974, 'year': 2025, 'net_available': 888833}, [9608, 740392]), ('normal control', {'gross': 1731857, 'pct': 75, 'ytd': 2300000, 'birth_year': 1975, 'year': 2025, 'net_available': 1370216}, [750000, 0]), ('normal control', {'gross': 159714, 'pct': 50, 'ytd': 2300000, 'birth_year': 1996, 'year': 2024, 'net_available': 855993}, [0, 0]), ('normal control', {'gross': 1366584, 'pct': 0, 'ytd': 2421747, 'birth_year': 1974, 'year': 2024, 'net_available': 331646}, [0, 628253]), ('normal control', {'gross': 1043587, 'pct': 10, 'ytd': 2279748, 'birth_year': 1994, 'year': 2024, 'net_available': 991524}, [20252, 0])]]
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 | [48552, 879659] | [48552, 879659] | Passed |
| regression 1 | [1523, 51988] | [1523, 51988] | Passed |
| partial-repair probe 2 | [167186, 103857] | [167186, 103857] | Passed |
| partial-repair probe 3 | [5852, 746554] | [5852, 746554] | Passed |
| normal control 4 | [0, 0] | [0, 0] | Passed |
| normal control 5 | [0, 0] | [0, 0] | Passed |
| normal control 6 | [0, 2154944] | [0, 2154944] | Passed |
| normal control 7 | [0, 782593] | [0, 782593] | Passed |
SHA-256 / 53e885be1a77477a64c403a648f956a8583aacb99d8eda485d999de8f533aa9a
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:32.435597+00:00.
Case digest / 92ec2bb40cb56c5e1aa3eea4b47b8ed4ddd7b45e5185e680a88467fb4fa5af0e