FAILURE MAP
← Case archive

FA-58846 / Payroll withholding rules / Open access

Social security wage-base withholding: reported tips inclusion · case 01

Tipped employees are under-withheld because reported tips never reach social security wages.

Verified by executionVariant 1 · 10 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Reported tips are left out of the FICA wage kinds even though the contract makes them social security wages.

VERIFIED REPAIR

Restore the contract rule at the reported tips inclusion step: use `('reg', 'ot', 'bonus', 'tips')`.

Unsuccessful approach: The attempt adds tips but drops bonuses from the FICA wage kinds, trading one omission for another.

Case contract

Input {ytd, lines:[[kind, cents]], base, exempt}. Social security wages are reg+ot+bonus+tips minus sec125 (401k deferrals do not reduce them), floored at 0. Exempt employees owe nothing ([0,0]). Taxable = min(wages, max(0, base-ytd)); tax = 6.2% rounded half-up to the cent. Return [taxable, tax].

Why this case matters

Employee social security withholding must stop exactly at the annual wage base and use the FICA wage definition, not the income-tax one.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    lines = x['lines']
    fica = 0
    for kind, amt in lines:
        if kind in ('reg', 'ot', 'bonus'):
            fica += amt
        elif kind == 'sec125':
            fica -= amt
    fica = max(0, fica)
    if x['exempt']:
        return [0, 0]
    room = max(0, x['base'] - x['ytd'])
    taxable = min(fica, room)
    tax = (taxable * 62 + 500) // 1000
    return [taxable, tax]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'ytd': 4027320, 'lines': [['tips', 88262], ['bonus', 963], ['sec125', 1621], ['ot', 9375]], 'base': 17610000, 'exempt': False}, [96979, 6013]), ('regression', {'ytd': 8981578, 'lines': [['sec125', 35], ['ot', 4702], ['sec125', 74887], ['tips', 226998]], 'base': 17610000, 'exempt': False}, [156778, 9720]), ('partial-repair probe', {'ytd': 17543362, 'lines': [['401k', 1330], ['ot', 1995], ['bonus', 366]], 'base': 17610000, 'exempt': False}, [2361, 146]), ('partial-repair probe', {'ytd': 789375, 'lines': [['tips', 9625], ['bonus', 237249]], 'base': 1000000, 'exempt': False}, [210625, 13059]), ('boundary control', {'ytd': 16860000, 'lines': [['reg', 100000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 16800000, 'lines': [['reg', 100000], ['401k', 5000]], 'base': 16860000, 'exempt': False}, [60000, 3720]), ('normal control', {'ytd': 16856079, 'lines': [['ot', 1416], ['401k', 15045]], 'base': 16860000, 'exempt': False}, [1416, 88]), ('normal control', {'ytd': 1002361, 'lines': [['bonus', 5955]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 16598376, 'lines': [['401k', 17815], ['sec125', 6865]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17473948, 'lines': [['sec125', 1367], ['sec125', 805]], 'base': 17610000, 'exempt': True}, [0, 0])], [('regression', {'ytd': 2968857, 'lines': [['bonus', 3045], ['tips', 1485], ['sec125', 92408], ['bonus', 349913]], 'base': 17610000, 'exempt': False}, [262035, 16246]), ('regression', {'ytd': 6205542, 'lines': [['ot', 2254], ['reg', 6550], ['tips', 10665], ['sec125', 2193]], 'base': 17610000, 'exempt': False}, [17276, 1071]), ('partial-repair probe', {'ytd': 789375, 'lines': [['tips', 9625], ['bonus', 237249]], 'base': 1000000, 'exempt': False}, [210625, 13059]), ('partial-repair probe', {'ytd': 16573248, 'lines': [['401k', 19585], ['sec125', 2886], ['bonus', 129728]], 'base': 16860000, 'exempt': False}, [126842, 7864]), ('boundary control', {'ytd': 0, 'lines': [['sec125', 10000], ['reg', 5000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 0, 'lines': [['reg', 12345]], 'base': 16860000, 'exempt': True}, [0, 0]), ('normal control', {'ytd': 16862120, 'lines': [['401k', 4852]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17429873, 'lines': [['reg', 14135], ['sec125', 260961], ['ot', 187839]], 'base': 17610000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17365173, 'lines': [['401k', 1322]], 'base': 17610000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 1004946, 'lines': [['bonus', 48], ['ot', 3255]], 'base': 1000000, 'exempt': False}, [0, 0])], [('regression', {'ytd': 791897, 'lines': [['ot', 782], ['bonus', 1775], ['tips', 72393]], 'base': 1000000, 'exempt': False}, [74950, 4647]), ('regression', {'ytd': 4027320, 'lines': [['tips', 88262], ['bonus', 963], ['sec125', 1621], ['ot', 9375]], 'base': 17610000, 'exempt': False}, [96979, 6013]), ('partial-repair probe', {'ytd': 12285212, 'lines': [['reg', 19765], ['bonus', 19865], ['bonus', 153], ['ot', 16705]], 'base': 17610000, 'exempt': False}, [56488, 3502]), ('partial-repair probe', {'ytd': 781798, 'lines': [['bonus', 12386]], 'base': 1000000, 'exempt': False}, [12386, 768]), ('boundary control', {'ytd': 16860000, 'lines': [['reg', 100000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 16800000, 'lines': [['reg', 100000], ['401k', 5000]], 'base': 16860000, 'exempt': False}, [60000, 3720]), ('normal control', {'ytd': 16863463, 'lines': [['sec125', 37799], ['reg', 9785]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17613197, 'lines': [['sec125', 92109], ['ot', 11145], ['401k', 6145], ['tips', 1513]], 'base': 17610000, 'exempt': True}, [0, 0]), ('normal control', {'ytd': 1000562, 'lines': [['ot', 19155], ['sec125', 716], ['bonus', 9555], ['ot', 607]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 888135, 'lines': [['reg', 4773]], 'base': 1000000, 'exempt': False}, [4773, 296])], [('regression', {'ytd': 828471, 'lines': [['bonus', 3156], ['tips', 132170]], 'base': 1000000, 'exempt': False}, [135326, 8390]), ('regression', {'ytd': 459688, 'lines': [['tips', 299844], ['reg', 213642]], 'base': 1000000, 'exempt': False}, [513486, 31836]), ('partial-repair probe', {'ytd': 17609450, 'lines': [['bonus', 11635], ['401k', 226117]], 'base': 17610000, 'exempt': False}, [550, 34]), ('partial-repair probe', {'ytd': 16757967, 'lines': [['401k', 11535], ['bonus', 2388]], 'base': 16860000, 'exempt': False}, [2388, 148]), ('boundary control', {'ytd': 0, 'lines': [['sec125', 10000], ['reg', 5000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 0, 'lines': [['reg', 12345]], 'base': 16860000, 'exempt': True}, [0, 0]), ('normal control', {'ytd': 1007445, 'lines': [['reg', 945], ['ot', 220313], ['reg', 6015], ['reg', 18815]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 16860733, 'lines': [['401k', 16515], ['bonus', 563], ['ot', 10025]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 1003495, 'lines': [['tips', 16185], ['bonus', 19575]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17386310, 'lines': [['401k', 2353]], 'base': 17610000, 'exempt': False}, [0, 0])], [('regression', {'ytd': 9953521, 'lines': [['bonus', 1245], ['bonus', 15305], ['tips', 6455]], 'base': 16860000, 'exempt': False}, [23005, 1426]), ('regression', {'ytd': 13755339, 'lines': [['tips', 7370], ['sec125', 287]], 'base': 17610000, 'exempt': False}, [7083, 439]), ('partial-repair probe', {'ytd': 10332861, 'lines': [['sec125', 379506], ['ot', 376781], ['reg', 3822], ['bonus', 3325]], 'base': 16860000, 'exempt': False}, [4422, 274]), ('partial-repair probe', {'ytd': 819956, 'lines': [['bonus', 149379], ['sec125', 14535]], 'base': 1000000, 'exempt': False}, [134844, 8360]), ('boundary control', {'ytd': 16860000, 'lines': [['reg', 100000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 16800000, 'lines': [['reg', 100000], ['401k', 5000]], 'base': 16860000, 'exempt': False}, [60000, 3720]), ('normal control', {'ytd': 16860000, 'lines': [['reg', 7465], ['reg', 3855], ['401k', 4387], ['bonus', 5805]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17612007, 'lines': [['reg', 4615], ['ot', 12255]], 'base': 17610000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 1000000, 'lines': [['tips', 285990], ['bonus', 1566], ['401k', 16295]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 16863311, 'lines': [['tips', 19505]], 'base': 16860000, 'exempt': True}, [0, 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 fixtureActualExpectedOutcome
regression 0[8717, 540][96979, 6013]Failed
regression 1[0, 0][156778, 9720]Failed
partial-repair probe 2[2361, 146][2361, 146]Passed
partial-repair probe 3[210625, 13059][210625, 13059]Passed
boundary control 4[0, 0][0, 0]Passed
boundary control 5[60000, 3720][60000, 3720]Passed
normal control 6[1416, 88][1416, 88]Passed
normal control 7[0, 0][0, 0]Passed
normal control 8[0, 0][0, 0]Passed
normal control 9[0, 0][0, 0]Passed

SHA-256 / 93eea61aaccc865a98a099094d34968af8a7e4c61fca7288388979a6c15de391

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    lines = x['lines']
    fica = 0
    for kind, amt in lines:
        if kind in ('reg', 'ot', 'tips'):
            fica += amt
        elif kind == 'sec125':
            fica -= amt
    fica = max(0, fica)
    if x['exempt']:
        return [0, 0]
    room = max(0, x['base'] - x['ytd'])
    taxable = min(fica, room)
    tax = (taxable * 62 + 500) // 1000
    return [taxable, tax]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'ytd': 4027320, 'lines': [['tips', 88262], ['bonus', 963], ['sec125', 1621], ['ot', 9375]], 'base': 17610000, 'exempt': False}, [96979, 6013]), ('regression', {'ytd': 8981578, 'lines': [['sec125', 35], ['ot', 4702], ['sec125', 74887], ['tips', 226998]], 'base': 17610000, 'exempt': False}, [156778, 9720]), ('partial-repair probe', {'ytd': 17543362, 'lines': [['401k', 1330], ['ot', 1995], ['bonus', 366]], 'base': 17610000, 'exempt': False}, [2361, 146]), ('partial-repair probe', {'ytd': 789375, 'lines': [['tips', 9625], ['bonus', 237249]], 'base': 1000000, 'exempt': False}, [210625, 13059]), ('boundary control', {'ytd': 16860000, 'lines': [['reg', 100000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 16800000, 'lines': [['reg', 100000], ['401k', 5000]], 'base': 16860000, 'exempt': False}, [60000, 3720]), ('normal control', {'ytd': 16856079, 'lines': [['ot', 1416], ['401k', 15045]], 'base': 16860000, 'exempt': False}, [1416, 88]), ('normal control', {'ytd': 1002361, 'lines': [['bonus', 5955]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 16598376, 'lines': [['401k', 17815], ['sec125', 6865]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17473948, 'lines': [['sec125', 1367], ['sec125', 805]], 'base': 17610000, 'exempt': True}, [0, 0])], [('regression', {'ytd': 2968857, 'lines': [['bonus', 3045], ['tips', 1485], ['sec125', 92408], ['bonus', 349913]], 'base': 17610000, 'exempt': False}, [262035, 16246]), ('regression', {'ytd': 6205542, 'lines': [['ot', 2254], ['reg', 6550], ['tips', 10665], ['sec125', 2193]], 'base': 17610000, 'exempt': False}, [17276, 1071]), ('partial-repair probe', {'ytd': 789375, 'lines': [['tips', 9625], ['bonus', 237249]], 'base': 1000000, 'exempt': False}, [210625, 13059]), ('partial-repair probe', {'ytd': 16573248, 'lines': [['401k', 19585], ['sec125', 2886], ['bonus', 129728]], 'base': 16860000, 'exempt': False}, [126842, 7864]), ('boundary control', {'ytd': 0, 'lines': [['sec125', 10000], ['reg', 5000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 0, 'lines': [['reg', 12345]], 'base': 16860000, 'exempt': True}, [0, 0]), ('normal control', {'ytd': 16862120, 'lines': [['401k', 4852]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17429873, 'lines': [['reg', 14135], ['sec125', 260961], ['ot', 187839]], 'base': 17610000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17365173, 'lines': [['401k', 1322]], 'base': 17610000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 1004946, 'lines': [['bonus', 48], ['ot', 3255]], 'base': 1000000, 'exempt': False}, [0, 0])], [('regression', {'ytd': 791897, 'lines': [['ot', 782], ['bonus', 1775], ['tips', 72393]], 'base': 1000000, 'exempt': False}, [74950, 4647]), ('regression', {'ytd': 4027320, 'lines': [['tips', 88262], ['bonus', 963], ['sec125', 1621], ['ot', 9375]], 'base': 17610000, 'exempt': False}, [96979, 6013]), ('partial-repair probe', {'ytd': 12285212, 'lines': [['reg', 19765], ['bonus', 19865], ['bonus', 153], ['ot', 16705]], 'base': 17610000, 'exempt': False}, [56488, 3502]), ('partial-repair probe', {'ytd': 781798, 'lines': [['bonus', 12386]], 'base': 1000000, 'exempt': False}, [12386, 768]), ('boundary control', {'ytd': 16860000, 'lines': [['reg', 100000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 16800000, 'lines': [['reg', 100000], ['401k', 5000]], 'base': 16860000, 'exempt': False}, [60000, 3720]), ('normal control', {'ytd': 16863463, 'lines': [['sec125', 37799], ['reg', 9785]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17613197, 'lines': [['sec125', 92109], ['ot', 11145], ['401k', 6145], ['tips', 1513]], 'base': 17610000, 'exempt': True}, [0, 0]), ('normal control', {'ytd': 1000562, 'lines': [['ot', 19155], ['sec125', 716], ['bonus', 9555], ['ot', 607]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 888135, 'lines': [['reg', 4773]], 'base': 1000000, 'exempt': False}, [4773, 296])], [('regression', {'ytd': 828471, 'lines': [['bonus', 3156], ['tips', 132170]], 'base': 1000000, 'exempt': False}, [135326, 8390]), ('regression', {'ytd': 459688, 'lines': [['tips', 299844], ['reg', 213642]], 'base': 1000000, 'exempt': False}, [513486, 31836]), ('partial-repair probe', {'ytd': 17609450, 'lines': [['bonus', 11635], ['401k', 226117]], 'base': 17610000, 'exempt': False}, [550, 34]), ('partial-repair probe', {'ytd': 16757967, 'lines': [['401k', 11535], ['bonus', 2388]], 'base': 16860000, 'exempt': False}, [2388, 148]), ('boundary control', {'ytd': 0, 'lines': [['sec125', 10000], ['reg', 5000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 0, 'lines': [['reg', 12345]], 'base': 16860000, 'exempt': True}, [0, 0]), ('normal control', {'ytd': 1007445, 'lines': [['reg', 945], ['ot', 220313], ['reg', 6015], ['reg', 18815]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 16860733, 'lines': [['401k', 16515], ['bonus', 563], ['ot', 10025]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 1003495, 'lines': [['tips', 16185], ['bonus', 19575]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17386310, 'lines': [['401k', 2353]], 'base': 17610000, 'exempt': False}, [0, 0])], [('regression', {'ytd': 9953521, 'lines': [['bonus', 1245], ['bonus', 15305], ['tips', 6455]], 'base': 16860000, 'exempt': False}, [23005, 1426]), ('regression', {'ytd': 13755339, 'lines': [['tips', 7370], ['sec125', 287]], 'base': 17610000, 'exempt': False}, [7083, 439]), ('partial-repair probe', {'ytd': 10332861, 'lines': [['sec125', 379506], ['ot', 376781], ['reg', 3822], ['bonus', 3325]], 'base': 16860000, 'exempt': False}, [4422, 274]), ('partial-repair probe', {'ytd': 819956, 'lines': [['bonus', 149379], ['sec125', 14535]], 'base': 1000000, 'exempt': False}, [134844, 8360]), ('boundary control', {'ytd': 16860000, 'lines': [['reg', 100000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 16800000, 'lines': [['reg', 100000], ['401k', 5000]], 'base': 16860000, 'exempt': False}, [60000, 3720]), ('normal control', {'ytd': 16860000, 'lines': [['reg', 7465], ['reg', 3855], ['401k', 4387], ['bonus', 5805]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17612007, 'lines': [['reg', 4615], ['ot', 12255]], 'base': 17610000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 1000000, 'lines': [['tips', 285990], ['bonus', 1566], ['401k', 16295]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 16863311, 'lines': [['tips', 19505]], 'base': 16860000, 'exempt': True}, [0, 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 fixtureActualExpectedOutcome
regression 0[96016, 5953][96979, 6013]Failed
regression 1[156778, 9720][156778, 9720]Passed
partial-repair probe 2[1995, 124][2361, 146]Failed
partial-repair probe 3[9625, 597][210625, 13059]Failed
boundary control 4[0, 0][0, 0]Passed
boundary control 5[60000, 3720][60000, 3720]Passed
normal control 6[1416, 88][1416, 88]Passed
normal control 7[0, 0][0, 0]Passed
normal control 8[0, 0][0, 0]Passed
normal control 9[0, 0][0, 0]Passed

SHA-256 / b1a3be7d34de5820acc65d9c05f21f721ae129b9bbdd350ff2f6bc67ff448cc8

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    lines = x['lines']
    fica = 0
    for kind, amt in lines:
        if kind in ('reg', 'ot', 'bonus', 'tips'):
            fica += amt
        elif kind == 'sec125':
            fica -= amt
    fica = max(0, fica)
    if x['exempt']:
        return [0, 0]
    room = max(0, x['base'] - x['ytd'])
    taxable = min(fica, room)
    tax = (taxable * 62 + 500) // 1000
    return [taxable, tax]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'ytd': 4027320, 'lines': [['tips', 88262], ['bonus', 963], ['sec125', 1621], ['ot', 9375]], 'base': 17610000, 'exempt': False}, [96979, 6013]), ('regression', {'ytd': 8981578, 'lines': [['sec125', 35], ['ot', 4702], ['sec125', 74887], ['tips', 226998]], 'base': 17610000, 'exempt': False}, [156778, 9720]), ('partial-repair probe', {'ytd': 17543362, 'lines': [['401k', 1330], ['ot', 1995], ['bonus', 366]], 'base': 17610000, 'exempt': False}, [2361, 146]), ('partial-repair probe', {'ytd': 789375, 'lines': [['tips', 9625], ['bonus', 237249]], 'base': 1000000, 'exempt': False}, [210625, 13059]), ('boundary control', {'ytd': 16860000, 'lines': [['reg', 100000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 16800000, 'lines': [['reg', 100000], ['401k', 5000]], 'base': 16860000, 'exempt': False}, [60000, 3720]), ('normal control', {'ytd': 16856079, 'lines': [['ot', 1416], ['401k', 15045]], 'base': 16860000, 'exempt': False}, [1416, 88]), ('normal control', {'ytd': 1002361, 'lines': [['bonus', 5955]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 16598376, 'lines': [['401k', 17815], ['sec125', 6865]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17473948, 'lines': [['sec125', 1367], ['sec125', 805]], 'base': 17610000, 'exempt': True}, [0, 0])], [('regression', {'ytd': 2968857, 'lines': [['bonus', 3045], ['tips', 1485], ['sec125', 92408], ['bonus', 349913]], 'base': 17610000, 'exempt': False}, [262035, 16246]), ('regression', {'ytd': 6205542, 'lines': [['ot', 2254], ['reg', 6550], ['tips', 10665], ['sec125', 2193]], 'base': 17610000, 'exempt': False}, [17276, 1071]), ('partial-repair probe', {'ytd': 789375, 'lines': [['tips', 9625], ['bonus', 237249]], 'base': 1000000, 'exempt': False}, [210625, 13059]), ('partial-repair probe', {'ytd': 16573248, 'lines': [['401k', 19585], ['sec125', 2886], ['bonus', 129728]], 'base': 16860000, 'exempt': False}, [126842, 7864]), ('boundary control', {'ytd': 0, 'lines': [['sec125', 10000], ['reg', 5000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 0, 'lines': [['reg', 12345]], 'base': 16860000, 'exempt': True}, [0, 0]), ('normal control', {'ytd': 16862120, 'lines': [['401k', 4852]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17429873, 'lines': [['reg', 14135], ['sec125', 260961], ['ot', 187839]], 'base': 17610000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17365173, 'lines': [['401k', 1322]], 'base': 17610000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 1004946, 'lines': [['bonus', 48], ['ot', 3255]], 'base': 1000000, 'exempt': False}, [0, 0])], [('regression', {'ytd': 791897, 'lines': [['ot', 782], ['bonus', 1775], ['tips', 72393]], 'base': 1000000, 'exempt': False}, [74950, 4647]), ('regression', {'ytd': 4027320, 'lines': [['tips', 88262], ['bonus', 963], ['sec125', 1621], ['ot', 9375]], 'base': 17610000, 'exempt': False}, [96979, 6013]), ('partial-repair probe', {'ytd': 12285212, 'lines': [['reg', 19765], ['bonus', 19865], ['bonus', 153], ['ot', 16705]], 'base': 17610000, 'exempt': False}, [56488, 3502]), ('partial-repair probe', {'ytd': 781798, 'lines': [['bonus', 12386]], 'base': 1000000, 'exempt': False}, [12386, 768]), ('boundary control', {'ytd': 16860000, 'lines': [['reg', 100000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 16800000, 'lines': [['reg', 100000], ['401k', 5000]], 'base': 16860000, 'exempt': False}, [60000, 3720]), ('normal control', {'ytd': 16863463, 'lines': [['sec125', 37799], ['reg', 9785]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17613197, 'lines': [['sec125', 92109], ['ot', 11145], ['401k', 6145], ['tips', 1513]], 'base': 17610000, 'exempt': True}, [0, 0]), ('normal control', {'ytd': 1000562, 'lines': [['ot', 19155], ['sec125', 716], ['bonus', 9555], ['ot', 607]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 888135, 'lines': [['reg', 4773]], 'base': 1000000, 'exempt': False}, [4773, 296])], [('regression', {'ytd': 828471, 'lines': [['bonus', 3156], ['tips', 132170]], 'base': 1000000, 'exempt': False}, [135326, 8390]), ('regression', {'ytd': 459688, 'lines': [['tips', 299844], ['reg', 213642]], 'base': 1000000, 'exempt': False}, [513486, 31836]), ('partial-repair probe', {'ytd': 17609450, 'lines': [['bonus', 11635], ['401k', 226117]], 'base': 17610000, 'exempt': False}, [550, 34]), ('partial-repair probe', {'ytd': 16757967, 'lines': [['401k', 11535], ['bonus', 2388]], 'base': 16860000, 'exempt': False}, [2388, 148]), ('boundary control', {'ytd': 0, 'lines': [['sec125', 10000], ['reg', 5000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 0, 'lines': [['reg', 12345]], 'base': 16860000, 'exempt': True}, [0, 0]), ('normal control', {'ytd': 1007445, 'lines': [['reg', 945], ['ot', 220313], ['reg', 6015], ['reg', 18815]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 16860733, 'lines': [['401k', 16515], ['bonus', 563], ['ot', 10025]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 1003495, 'lines': [['tips', 16185], ['bonus', 19575]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17386310, 'lines': [['401k', 2353]], 'base': 17610000, 'exempt': False}, [0, 0])], [('regression', {'ytd': 9953521, 'lines': [['bonus', 1245], ['bonus', 15305], ['tips', 6455]], 'base': 16860000, 'exempt': False}, [23005, 1426]), ('regression', {'ytd': 13755339, 'lines': [['tips', 7370], ['sec125', 287]], 'base': 17610000, 'exempt': False}, [7083, 439]), ('partial-repair probe', {'ytd': 10332861, 'lines': [['sec125', 379506], ['ot', 376781], ['reg', 3822], ['bonus', 3325]], 'base': 16860000, 'exempt': False}, [4422, 274]), ('partial-repair probe', {'ytd': 819956, 'lines': [['bonus', 149379], ['sec125', 14535]], 'base': 1000000, 'exempt': False}, [134844, 8360]), ('boundary control', {'ytd': 16860000, 'lines': [['reg', 100000]], 'base': 16860000, 'exempt': False}, [0, 0]), ('boundary control', {'ytd': 16800000, 'lines': [['reg', 100000], ['401k', 5000]], 'base': 16860000, 'exempt': False}, [60000, 3720]), ('normal control', {'ytd': 16860000, 'lines': [['reg', 7465], ['reg', 3855], ['401k', 4387], ['bonus', 5805]], 'base': 16860000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 17612007, 'lines': [['reg', 4615], ['ot', 12255]], 'base': 17610000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 1000000, 'lines': [['tips', 285990], ['bonus', 1566], ['401k', 16295]], 'base': 1000000, 'exempt': False}, [0, 0]), ('normal control', {'ytd': 16863311, 'lines': [['tips', 19505]], 'base': 16860000, 'exempt': True}, [0, 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 fixtureActualExpectedOutcome
regression 0[96979, 6013][96979, 6013]Passed
regression 1[156778, 9720][156778, 9720]Passed
partial-repair probe 2[2361, 146][2361, 146]Passed
partial-repair probe 3[210625, 13059][210625, 13059]Passed
boundary control 4[0, 0][0, 0]Passed
boundary control 5[60000, 3720][60000, 3720]Passed
normal control 6[1416, 88][1416, 88]Passed
normal control 7[0, 0][0, 0]Passed
normal control 8[0, 0][0, 0]Passed
normal control 9[0, 0][0, 0]Passed

SHA-256 / 02b27a9f64ff0f2b8f332106aceae9cfaccdf1b0041333439717d17ca4a706cd

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:30.672028+00:00.

Case digest / 97749b9d50e48efed37be1f3ebe882435fff185e57f7798c30b5ee3e6a72e97d