FAILURE MAP
← Case archive

FA-59161 / Payroll withholding rules / Open access

Aggregate-method supplemental withholding: aggregate wage base · case 01

Bonuses for higher earners are withheld at the bottom bracket.

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

ROOT CAUSE

The table is applied to the supplemental amount alone instead of to combined regular and supplemental wages.

VERIFIED REPAIR

Restore the contract rule at the aggregate wage base step: use `f(x['regular'] + x['supp'])`.

Unsuccessful approach: The attempt adds separate table results, which understates tax because each part starts at the lowest bracket.

Case contract

Input {regular, supp, regular_wh or None, table: ascending [[threshold, base, pct]]}. f(w) uses the last row with threshold <= w: base + (w - threshold)*pct/100 half-up. Supplemental withholding = max(0, f(regular + supp) - already), where already is regular_wh when given, otherwise f(regular) (supplemental paid separately from the regular run). Return cents.

Why this case matters

The aggregate method withholds on combined wages, then credits what the regular payroll already withheld.

1 / The failure

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

N = 1
observations = []
def solve(x):
    def f(w):
        base, thr, pct = 0, 0, 0
        for t, b, p in x['table']:
            if w >= t:
                thr, base, pct = t, b, p
        return base + ((w - thr) * pct + 50) // 100
    if x['regular_wh'] is None:
        already = f(x['regular'])
    else:
        already = x['regular_wh']
    return max(0, f(x['supp']) - already)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'regular': 196542, 'supp': 546874, 'table': [[0, 0, 0], [31780, 0, 10], [158572, 12679, 12], [237601, 22162, 22], [369467, 51173, 24]], 'regular_wh': None}, 123686), ('regression', {'regular': 166905, 'supp': 563237, 'table': [[0, 0, 0], [97424, 0, 10], [210021, 11260, 12], [309042, 23143, 22], [367427, 35988, 24]], 'regular_wh': None}, 116092), ('partial-repair probe', {'regular': 271363, 'supp': 388264, 'table': [[0, 0, 0], [56082, 0, 10], [86741, 3066, 12], [182099, 14509, 22], [317188, 44229, 24]], 'regular_wh': None}, 92267), ('partial-repair probe', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('normal control', {'regular': 22582, 'supp': 82724, 'table': [[0, 0, 0], [67793, 0, 10], [153868, 8608, 12], [184592, 12295, 22], [250677, 26834, 24]], 'regular_wh': 22068}, 0), ('normal control', {'regular': 67092, 'supp': 9466, 'table': [[0, 0, 0], [50546, 0, 10], [199313, 14877, 12], [277080, 24209, 22], [385100, 47973, 24]], 'regular_wh': 49707}, 0), ('normal control', {'regular': 30801, 'supp': 257466, 'table': [[0, 0, 0], [111822, 0, 10], [184134, 7231, 12], [244754, 14505, 22], [338743, 35183, 24]], 'regular_wh': 42625}, 0), ('normal control', {'regular': 20111, 'supp': 385805, 'table': [[0, 0, 0], [51986, 0, 10], [154643, 10266, 12], [295889, 27216, 22], [388072, 47496, 24]], 'regular_wh': 55889}, 0)], [('regression', {'regular': 166905, 'supp': 563237, 'table': [[0, 0, 0], [97424, 0, 10], [210021, 11260, 12], [309042, 23143, 22], [367427, 35988, 24]], 'regular_wh': None}, 116092), ('regression', {'regular': 271363, 'supp': 388264, 'table': [[0, 0, 0], [56082, 0, 10], [86741, 3066, 12], [182099, 14509, 22], [317188, 44229, 24]], 'regular_wh': None}, 92267), ('partial-repair probe', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('partial-repair probe', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('normal control', {'regular': 198698, 'supp': 84372, 'table': [[0, 0, 0], [83710, 0, 10], [226350, 14264, 12], [313036, 24666, 22], [391064, 41832, 24]], 'regular_wh': 26245}, 0), ('normal control', {'regular': 135091, 'supp': 157159, 'table': [[0, 0, 0], [130429, 0, 10], [214124, 8370, 12], [294779, 18049, 22], [366965, 33930, 24]], 'regular_wh': 43721}, 0), ('normal control', {'regular': 94853, 'supp': 60097, 'table': [[0, 0, 0], [62588, 0, 10], [126165, 6358, 12], [235383, 19464, 22], [258093, 24460, 24]], 'regular_wh': 58530}, 0), ('normal control', {'regular': 55477, 'supp': 44488, 'table': [[0, 0, 0], [134444, 0, 10], [280554, 14611, 12], [387222, 27411, 22], [433994, 37701, 24]], 'regular_wh': None}, 0)], [('regression', {'regular': 271363, 'supp': 388264, 'table': [[0, 0, 0], [56082, 0, 10], [86741, 3066, 12], [182099, 14509, 22], [317188, 44229, 24]], 'regular_wh': None}, 92267), ('regression', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('partial-repair probe', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('partial-repair probe', {'regular': 317198, 'supp': 215674, 'table': [[0, 0, 0], [114323, 0, 10], [242963, 12864, 12], [288842, 18369, 22], [360034, 34031, 24]], 'regular_wh': 7312}, 68200), ('normal control', {'regular': 77959, 'supp': 44287, 'table': [[0, 0, 0], [124150, 0, 10], [200944, 7679, 12], [315763, 21457, 22], [451952, 51419, 24]], 'regular_wh': None}, 0), ('normal control', {'regular': 169865, 'supp': 75000, 'table': [[0, 0, 0], [32869, 0, 10], [165492, 13262, 12], [243606, 22636, 22], [271011, 28665, 24]], 'regular_wh': 36934}, 0), ('normal control', {'regular': 9834, 'supp': 87443, 'table': [[0, 0, 0], [124156, 0, 10], [272938, 14878, 12], [371532, 26709, 22], [471263, 48650, 24]], 'regular_wh': 46082}, 0), ('normal control', {'regular': 44274, 'supp': 22886, 'table': [[0, 0, 0], [112535, 0, 10], [136016, 2348, 12], [203294, 10421, 22], [309227, 33726, 24]], 'regular_wh': None}, 0)], [('regression', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('regression', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('partial-repair probe', {'regular': 91078, 'supp': 50965, 'table': [[0, 0, 0], [129383, 0, 10], [180861, 5148, 12], [251715, 13650, 22], [346731, 34554, 24]], 'regular_wh': None}, 1266), ('partial-repair probe', {'regular': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('normal control', {'regular': 293550, 'supp': 25846, 'table': [[0, 0, 0], [146191, 0, 10], [277616, 13143, 12], [347997, 21589, 22], [379622, 28547, 24]], 'regular_wh': 40354}, 0), ('normal control', {'regular': 171082, 'supp': 204341, 'table': [[0, 0, 0], [143285, 0, 10], [292338, 14905, 12], [432871, 31769, 22], [453332, 36270, 24]], 'regular_wh': 34006}, 0), ('normal control', {'regular': 145126, 'supp': 28672, 'table': [[0, 0, 0], [120990, 0, 10], [261744, 14075, 12], [287275, 17139, 22], [332402, 27067, 24]], 'regular_wh': 54798}, 0), ('normal control', {'regular': 8818, 'supp': 228060, 'table': [[0, 0, 0], [61673, 0, 10], [171328, 10966, 12], [254562, 20954, 22], [326349, 36747, 24]], 'regular_wh': 47945}, 0)], [('regression', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('regression', {'regular': 317198, 'supp': 215674, 'table': [[0, 0, 0], [114323, 0, 10], [242963, 12864, 12], [288842, 18369, 22], [360034, 34031, 24]], 'regular_wh': 7312}, 68200), ('partial-repair probe', {'regular': 371035, 'supp': 231573, 'table': [[0, 0, 0], [62708, 0, 10], [162966, 10026, 12], [294122, 25765, 22], [404634, 50078, 24]], 'regular_wh': None}, 54906), ('partial-repair probe', {'regular': 218340, 'supp': 389621, 'table': [[0, 0, 0], [59946, 0, 10], [144504, 8456, 12], [240644, 19993, 22], [365163, 47387, 24]], 'regular_wh': 27085}, 78574), ('normal control', {'regular': 211299, 'supp': 48284, 'table': [[0, 0, 0], [140084, 0, 10], [215949, 7587, 12], [307021, 18516, 22], [381788, 34965, 24]], 'regular_wh': 43784}, 0), ('normal control', {'regular': 26438, 'supp': 82868, 'table': [[0, 0, 0], [138028, 0, 10], [262847, 12482, 12], [392504, 28041, 22], [489674, 49418, 24]], 'regular_wh': 54584}, 0), ('normal control', {'regular': 212155, 'supp': 105110, 'table': [[0, 0, 0], [68326, 0, 10], [154783, 8646, 12], [282018, 23914, 22], [355366, 40051, 24]], 'regular_wh': 54670}, 0), ('normal control', {'regular': 132639, 'supp': 119147, 'table': [[0, 0, 0], [23555, 0, 10], [67791, 4424, 12], [101023, 8412, 22], [133510, 15559, 24]], 'regular_wh': 54926}, 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 076516123686Failed
regression 176034116092Failed
partial-repair probe 22714092267Failed
partial-repair probe 31237985498Failed
normal control 400Passed
normal control 500Passed
normal control 600Passed
normal control 700Passed

SHA-256 / aaad0f4a359966283272b17a9a6e8c0125c08874176dc5ea9ff20cd1e7d1667f

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    def f(w):
        base, thr, pct = 0, 0, 0
        for t, b, p in x['table']:
            if w >= t:
                thr, base, pct = t, b, p
        return base + ((w - thr) * pct + 50) // 100
    if x['regular_wh'] is None:
        already = f(x['regular'])
    else:
        already = x['regular_wh']
    return max(0, (f(x['regular']) + f(x['supp'])) - already)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'regular': 196542, 'supp': 546874, 'table': [[0, 0, 0], [31780, 0, 10], [158572, 12679, 12], [237601, 22162, 22], [369467, 51173, 24]], 'regular_wh': None}, 123686), ('regression', {'regular': 166905, 'supp': 563237, 'table': [[0, 0, 0], [97424, 0, 10], [210021, 11260, 12], [309042, 23143, 22], [367427, 35988, 24]], 'regular_wh': None}, 116092), ('partial-repair probe', {'regular': 271363, 'supp': 388264, 'table': [[0, 0, 0], [56082, 0, 10], [86741, 3066, 12], [182099, 14509, 22], [317188, 44229, 24]], 'regular_wh': None}, 92267), ('partial-repair probe', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('normal control', {'regular': 22582, 'supp': 82724, 'table': [[0, 0, 0], [67793, 0, 10], [153868, 8608, 12], [184592, 12295, 22], [250677, 26834, 24]], 'regular_wh': 22068}, 0), ('normal control', {'regular': 67092, 'supp': 9466, 'table': [[0, 0, 0], [50546, 0, 10], [199313, 14877, 12], [277080, 24209, 22], [385100, 47973, 24]], 'regular_wh': 49707}, 0), ('normal control', {'regular': 30801, 'supp': 257466, 'table': [[0, 0, 0], [111822, 0, 10], [184134, 7231, 12], [244754, 14505, 22], [338743, 35183, 24]], 'regular_wh': 42625}, 0), ('normal control', {'regular': 20111, 'supp': 385805, 'table': [[0, 0, 0], [51986, 0, 10], [154643, 10266, 12], [295889, 27216, 22], [388072, 47496, 24]], 'regular_wh': 55889}, 0)], [('regression', {'regular': 166905, 'supp': 563237, 'table': [[0, 0, 0], [97424, 0, 10], [210021, 11260, 12], [309042, 23143, 22], [367427, 35988, 24]], 'regular_wh': None}, 116092), ('regression', {'regular': 271363, 'supp': 388264, 'table': [[0, 0, 0], [56082, 0, 10], [86741, 3066, 12], [182099, 14509, 22], [317188, 44229, 24]], 'regular_wh': None}, 92267), ('partial-repair probe', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('partial-repair probe', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('normal control', {'regular': 198698, 'supp': 84372, 'table': [[0, 0, 0], [83710, 0, 10], [226350, 14264, 12], [313036, 24666, 22], [391064, 41832, 24]], 'regular_wh': 26245}, 0), ('normal control', {'regular': 135091, 'supp': 157159, 'table': [[0, 0, 0], [130429, 0, 10], [214124, 8370, 12], [294779, 18049, 22], [366965, 33930, 24]], 'regular_wh': 43721}, 0), ('normal control', {'regular': 94853, 'supp': 60097, 'table': [[0, 0, 0], [62588, 0, 10], [126165, 6358, 12], [235383, 19464, 22], [258093, 24460, 24]], 'regular_wh': 58530}, 0), ('normal control', {'regular': 55477, 'supp': 44488, 'table': [[0, 0, 0], [134444, 0, 10], [280554, 14611, 12], [387222, 27411, 22], [433994, 37701, 24]], 'regular_wh': None}, 0)], [('regression', {'regular': 271363, 'supp': 388264, 'table': [[0, 0, 0], [56082, 0, 10], [86741, 3066, 12], [182099, 14509, 22], [317188, 44229, 24]], 'regular_wh': None}, 92267), ('regression', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('partial-repair probe', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('partial-repair probe', {'regular': 317198, 'supp': 215674, 'table': [[0, 0, 0], [114323, 0, 10], [242963, 12864, 12], [288842, 18369, 22], [360034, 34031, 24]], 'regular_wh': 7312}, 68200), ('normal control', {'regular': 77959, 'supp': 44287, 'table': [[0, 0, 0], [124150, 0, 10], [200944, 7679, 12], [315763, 21457, 22], [451952, 51419, 24]], 'regular_wh': None}, 0), ('normal control', {'regular': 169865, 'supp': 75000, 'table': [[0, 0, 0], [32869, 0, 10], [165492, 13262, 12], [243606, 22636, 22], [271011, 28665, 24]], 'regular_wh': 36934}, 0), ('normal control', {'regular': 9834, 'supp': 87443, 'table': [[0, 0, 0], [124156, 0, 10], [272938, 14878, 12], [371532, 26709, 22], [471263, 48650, 24]], 'regular_wh': 46082}, 0), ('normal control', {'regular': 44274, 'supp': 22886, 'table': [[0, 0, 0], [112535, 0, 10], [136016, 2348, 12], [203294, 10421, 22], [309227, 33726, 24]], 'regular_wh': None}, 0)], [('regression', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('regression', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('partial-repair probe', {'regular': 91078, 'supp': 50965, 'table': [[0, 0, 0], [129383, 0, 10], [180861, 5148, 12], [251715, 13650, 22], [346731, 34554, 24]], 'regular_wh': None}, 1266), ('partial-repair probe', {'regular': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('normal control', {'regular': 293550, 'supp': 25846, 'table': [[0, 0, 0], [146191, 0, 10], [277616, 13143, 12], [347997, 21589, 22], [379622, 28547, 24]], 'regular_wh': 40354}, 0), ('normal control', {'regular': 171082, 'supp': 204341, 'table': [[0, 0, 0], [143285, 0, 10], [292338, 14905, 12], [432871, 31769, 22], [453332, 36270, 24]], 'regular_wh': 34006}, 0), ('normal control', {'regular': 145126, 'supp': 28672, 'table': [[0, 0, 0], [120990, 0, 10], [261744, 14075, 12], [287275, 17139, 22], [332402, 27067, 24]], 'regular_wh': 54798}, 0), ('normal control', {'regular': 8818, 'supp': 228060, 'table': [[0, 0, 0], [61673, 0, 10], [171328, 10966, 12], [254562, 20954, 22], [326349, 36747, 24]], 'regular_wh': 47945}, 0)], [('regression', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('regression', {'regular': 317198, 'supp': 215674, 'table': [[0, 0, 0], [114323, 0, 10], [242963, 12864, 12], [288842, 18369, 22], [360034, 34031, 24]], 'regular_wh': 7312}, 68200), ('partial-repair probe', {'regular': 371035, 'supp': 231573, 'table': [[0, 0, 0], [62708, 0, 10], [162966, 10026, 12], [294122, 25765, 22], [404634, 50078, 24]], 'regular_wh': None}, 54906), ('partial-repair probe', {'regular': 218340, 'supp': 389621, 'table': [[0, 0, 0], [59946, 0, 10], [144504, 8456, 12], [240644, 19993, 22], [365163, 47387, 24]], 'regular_wh': 27085}, 78574), ('normal control', {'regular': 211299, 'supp': 48284, 'table': [[0, 0, 0], [140084, 0, 10], [215949, 7587, 12], [307021, 18516, 22], [381788, 34965, 24]], 'regular_wh': 43784}, 0), ('normal control', {'regular': 26438, 'supp': 82868, 'table': [[0, 0, 0], [138028, 0, 10], [262847, 12482, 12], [392504, 28041, 22], [489674, 49418, 24]], 'regular_wh': 54584}, 0), ('normal control', {'regular': 212155, 'supp': 105110, 'table': [[0, 0, 0], [68326, 0, 10], [154783, 8646, 12], [282018, 23914, 22], [355366, 40051, 24]], 'regular_wh': 54670}, 0), ('normal control', {'regular': 132639, 'supp': 119147, 'table': [[0, 0, 0], [23555, 0, 10], [67791, 4424, 12], [101023, 8412, 22], [133510, 15559, 24]], 'regular_wh': 54926}, 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 093751123686Failed
regression 182982116092Failed
partial-repair probe 26128792267Failed
partial-repair probe 33140385498Failed
normal control 400Passed
normal control 500Passed
normal control 600Passed
normal control 700Passed

SHA-256 / 4cdff27abfc8903fd277b1cf52408e0d57a54614366fb1efba0a3fecc86ac08b

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    def f(w):
        base, thr, pct = 0, 0, 0
        for t, b, p in x['table']:
            if w >= t:
                thr, base, pct = t, b, p
        return base + ((w - thr) * pct + 50) // 100
    if x['regular_wh'] is None:
        already = f(x['regular'])
    else:
        already = x['regular_wh']
    return max(0, f(x['regular'] + x['supp']) - already)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'regular': 196542, 'supp': 546874, 'table': [[0, 0, 0], [31780, 0, 10], [158572, 12679, 12], [237601, 22162, 22], [369467, 51173, 24]], 'regular_wh': None}, 123686), ('regression', {'regular': 166905, 'supp': 563237, 'table': [[0, 0, 0], [97424, 0, 10], [210021, 11260, 12], [309042, 23143, 22], [367427, 35988, 24]], 'regular_wh': None}, 116092), ('partial-repair probe', {'regular': 271363, 'supp': 388264, 'table': [[0, 0, 0], [56082, 0, 10], [86741, 3066, 12], [182099, 14509, 22], [317188, 44229, 24]], 'regular_wh': None}, 92267), ('partial-repair probe', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('normal control', {'regular': 22582, 'supp': 82724, 'table': [[0, 0, 0], [67793, 0, 10], [153868, 8608, 12], [184592, 12295, 22], [250677, 26834, 24]], 'regular_wh': 22068}, 0), ('normal control', {'regular': 67092, 'supp': 9466, 'table': [[0, 0, 0], [50546, 0, 10], [199313, 14877, 12], [277080, 24209, 22], [385100, 47973, 24]], 'regular_wh': 49707}, 0), ('normal control', {'regular': 30801, 'supp': 257466, 'table': [[0, 0, 0], [111822, 0, 10], [184134, 7231, 12], [244754, 14505, 22], [338743, 35183, 24]], 'regular_wh': 42625}, 0), ('normal control', {'regular': 20111, 'supp': 385805, 'table': [[0, 0, 0], [51986, 0, 10], [154643, 10266, 12], [295889, 27216, 22], [388072, 47496, 24]], 'regular_wh': 55889}, 0)], [('regression', {'regular': 166905, 'supp': 563237, 'table': [[0, 0, 0], [97424, 0, 10], [210021, 11260, 12], [309042, 23143, 22], [367427, 35988, 24]], 'regular_wh': None}, 116092), ('regression', {'regular': 271363, 'supp': 388264, 'table': [[0, 0, 0], [56082, 0, 10], [86741, 3066, 12], [182099, 14509, 22], [317188, 44229, 24]], 'regular_wh': None}, 92267), ('partial-repair probe', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('partial-repair probe', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('normal control', {'regular': 198698, 'supp': 84372, 'table': [[0, 0, 0], [83710, 0, 10], [226350, 14264, 12], [313036, 24666, 22], [391064, 41832, 24]], 'regular_wh': 26245}, 0), ('normal control', {'regular': 135091, 'supp': 157159, 'table': [[0, 0, 0], [130429, 0, 10], [214124, 8370, 12], [294779, 18049, 22], [366965, 33930, 24]], 'regular_wh': 43721}, 0), ('normal control', {'regular': 94853, 'supp': 60097, 'table': [[0, 0, 0], [62588, 0, 10], [126165, 6358, 12], [235383, 19464, 22], [258093, 24460, 24]], 'regular_wh': 58530}, 0), ('normal control', {'regular': 55477, 'supp': 44488, 'table': [[0, 0, 0], [134444, 0, 10], [280554, 14611, 12], [387222, 27411, 22], [433994, 37701, 24]], 'regular_wh': None}, 0)], [('regression', {'regular': 271363, 'supp': 388264, 'table': [[0, 0, 0], [56082, 0, 10], [86741, 3066, 12], [182099, 14509, 22], [317188, 44229, 24]], 'regular_wh': None}, 92267), ('regression', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('partial-repair probe', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('partial-repair probe', {'regular': 317198, 'supp': 215674, 'table': [[0, 0, 0], [114323, 0, 10], [242963, 12864, 12], [288842, 18369, 22], [360034, 34031, 24]], 'regular_wh': 7312}, 68200), ('normal control', {'regular': 77959, 'supp': 44287, 'table': [[0, 0, 0], [124150, 0, 10], [200944, 7679, 12], [315763, 21457, 22], [451952, 51419, 24]], 'regular_wh': None}, 0), ('normal control', {'regular': 169865, 'supp': 75000, 'table': [[0, 0, 0], [32869, 0, 10], [165492, 13262, 12], [243606, 22636, 22], [271011, 28665, 24]], 'regular_wh': 36934}, 0), ('normal control', {'regular': 9834, 'supp': 87443, 'table': [[0, 0, 0], [124156, 0, 10], [272938, 14878, 12], [371532, 26709, 22], [471263, 48650, 24]], 'regular_wh': 46082}, 0), ('normal control', {'regular': 44274, 'supp': 22886, 'table': [[0, 0, 0], [112535, 0, 10], [136016, 2348, 12], [203294, 10421, 22], [309227, 33726, 24]], 'regular_wh': None}, 0)], [('regression', {'regular': 312338, 'supp': 323072, 'table': [[0, 0, 0], [147945, 0, 10], [183116, 3517, 12], [328149, 20921, 22], [389786, 34481, 24]], 'regular_wh': 7933}, 85498), ('regression', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('partial-repair probe', {'regular': 91078, 'supp': 50965, 'table': [[0, 0, 0], [129383, 0, 10], [180861, 5148, 12], [251715, 13650, 22], [346731, 34554, 24]], 'regular_wh': None}, 1266), ('partial-repair probe', {'regular': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('normal control', {'regular': 293550, 'supp': 25846, 'table': [[0, 0, 0], [146191, 0, 10], [277616, 13143, 12], [347997, 21589, 22], [379622, 28547, 24]], 'regular_wh': 40354}, 0), ('normal control', {'regular': 171082, 'supp': 204341, 'table': [[0, 0, 0], [143285, 0, 10], [292338, 14905, 12], [432871, 31769, 22], [453332, 36270, 24]], 'regular_wh': 34006}, 0), ('normal control', {'regular': 145126, 'supp': 28672, 'table': [[0, 0, 0], [120990, 0, 10], [261744, 14075, 12], [287275, 17139, 22], [332402, 27067, 24]], 'regular_wh': 54798}, 0), ('normal control', {'regular': 8818, 'supp': 228060, 'table': [[0, 0, 0], [61673, 0, 10], [171328, 10966, 12], [254562, 20954, 22], [326349, 36747, 24]], 'regular_wh': 47945}, 0)], [('regression', {'regular': 272166, 'supp': 283715, 'table': [[0, 0, 0], [119972, 0, 10], [188902, 6893, 12], [248092, 13996, 22], [315970, 28929, 24]], 'regular_wh': None}, 67216), ('regression', {'regular': 317198, 'supp': 215674, 'table': [[0, 0, 0], [114323, 0, 10], [242963, 12864, 12], [288842, 18369, 22], [360034, 34031, 24]], 'regular_wh': 7312}, 68200), ('partial-repair probe', {'regular': 371035, 'supp': 231573, 'table': [[0, 0, 0], [62708, 0, 10], [162966, 10026, 12], [294122, 25765, 22], [404634, 50078, 24]], 'regular_wh': None}, 54906), ('partial-repair probe', {'regular': 218340, 'supp': 389621, 'table': [[0, 0, 0], [59946, 0, 10], [144504, 8456, 12], [240644, 19993, 22], [365163, 47387, 24]], 'regular_wh': 27085}, 78574), ('normal control', {'regular': 211299, 'supp': 48284, 'table': [[0, 0, 0], [140084, 0, 10], [215949, 7587, 12], [307021, 18516, 22], [381788, 34965, 24]], 'regular_wh': 43784}, 0), ('normal control', {'regular': 26438, 'supp': 82868, 'table': [[0, 0, 0], [138028, 0, 10], [262847, 12482, 12], [392504, 28041, 22], [489674, 49418, 24]], 'regular_wh': 54584}, 0), ('normal control', {'regular': 212155, 'supp': 105110, 'table': [[0, 0, 0], [68326, 0, 10], [154783, 8646, 12], [282018, 23914, 22], [355366, 40051, 24]], 'regular_wh': 54670}, 0), ('normal control', {'regular': 132639, 'supp': 119147, 'table': [[0, 0, 0], [23555, 0, 10], [67791, 4424, 12], [101023, 8412, 22], [133510, 15559, 24]], 'regular_wh': 54926}, 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 0123686123686Passed
regression 1116092116092Passed
partial-repair probe 29226792267Passed
partial-repair probe 38549885498Passed
normal control 400Passed
normal control 500Passed
normal control 600Passed
normal control 700Passed

SHA-256 / 5b8612e0f75ee91ab41a588aaf41f4b8dfb252dfb3e37f24d8176d3deea49f16

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

Case digest / 349ef3d6c62bf9391f608f2e45e441ae9c7c57eef905268b8f325eae9c0b9815