FAILURE MAP
← Case archive

FA-59156 / Payroll withholding rules / Open access

Aggregate-method supplemental withholding: standalone supplemental credit · case 01

Bonuses paid in a separate run are withheld as if regular wages had no withholding.

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

ROOT CAUSE

Nothing is credited for regular wages when the supplemental payment is processed on its own.

VERIFIED REPAIR

Restore the contract rule at the standalone supplemental credit step: use `already = f(x['regular'])`.

Unsuccessful approach: The attempt credits the table amount on the supplemental payment itself instead of on the regular wages.

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 = 0
    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': 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': 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': 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': 91078, 'supp': 50965, 'table': [[0, 0, 0], [129383, 0, 10], [180861, 5148, 12], [251715, 13650, 22], [346731, 34554, 24]], 'regular_wh': None}, 1266)], [('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': 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': 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': 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': 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': 230312, 'supp': 412759, 'table': [[0, 0, 0], [87909, 0, 10], [234168, 14626, 12], [277117, 19780, 22], [325269, 30373, 24]], 'regular_wh': 53200}, 53445), ('normal control', {'regular': 301375, 'supp': 257327, 'table': [[0, 0, 0], [104655, 0, 10], [206771, 10212, 12], [296267, 20952, 22], [346695, 32046, 24]], 'regular_wh': 42656}, 40272)], [('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': 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': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('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), ('normal control', {'regular': 138799, 'supp': 242337, 'table': [[0, 0, 0], [67403, 0, 10], [179799, 11240, 12], [251397, 19832, 22], [387828, 49847, 24]], 'regular_wh': 45497}, 2878), ('normal control', {'regular': 282406, 'supp': 568743, 'table': [[0, 0, 0], [126319, 0, 10], [211110, 8479, 12], [332602, 23058, 22], [357109, 28450, 24]], 'regular_wh': 51500}, 95520), ('normal control', {'regular': 133684, 'supp': 525347, 'table': [[0, 0, 0], [48514, 0, 10], [163334, 11482, 12], [185105, 14095, 22], [247313, 27781, 24]], 'regular_wh': 48804}, 77789), ('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)], [('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': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('partial-repair probe', {'regular': 139761, 'supp': 580903, 'table': [[0, 0, 0], [33224, 0, 10], [124697, 9147, 12], [177909, 15532, 22], [324717, 47830, 24]], 'regular_wh': None}, 131902), ('partial-repair probe', {'regular': 311741, 'supp': 533113, 'table': [[0, 0, 0], [137329, 0, 10], [282729, 14540, 12], [396442, 28186, 22], [532518, 58123, 24]], 'regular_wh': None}, 115063), ('normal control', {'regular': 141294, 'supp': 528346, 'table': [[0, 0, 0], [34928, 0, 10], [149354, 11443, 12], [262856, 25063, 22], [303394, 33981, 24]], 'regular_wh': 22556}, 99324), ('normal control', {'regular': 262089, 'supp': 507017, 'table': [[0, 0, 0], [142148, 0, 10], [247062, 10491, 12], [290368, 15688, 22], [364013, 31890, 24]], 'regular_wh': 29086}, 100026), ('normal control', {'regular': 355740, 'supp': 87796, 'table': [[0, 0, 0], [94277, 0, 10], [205651, 11137, 12], [258997, 17539, 22], [340618, 35496, 24]], 'regular_wh': 55813}, 4383), ('normal control', {'regular': 323732, 'supp': 553358, 'table': [[0, 0, 0], [66794, 0, 10], [163528, 9673, 12], [276538, 23234, 22], [416110, 53940, 24]], 'regular_wh': 21793}, 142782)], [('regression', {'regular': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('regression', {'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': 376443, 'supp': 593003, 'table': [[0, 0, 0], [149063, 0, 10], [179956, 3089, 12], [266122, 13429, 22], [344153, 30596, 24]], 'regular_wh': None}, 142320), ('partial-repair probe', {'regular': 348176, 'supp': 89132, 'table': [[0, 0, 0], [125841, 0, 10], [173895, 4805, 12], [222871, 10682, 22], [276667, 22517, 24]], 'regular_wh': None}, 21392), ('normal control', {'regular': 59789, 'supp': 391548, 'table': [[0, 0, 0], [60034, 0, 10], [122955, 6292, 12], [182142, 13394, 22], [295884, 38417, 24]], 'regular_wh': 40024}, 35702), ('normal control', {'regular': 64778, 'supp': 350120, 'table': [[0, 0, 0], [120719, 0, 10], [254321, 13360, 12], [305181, 19463, 22], [397517, 39777, 24]], 'regular_wh': 1848}, 42100), ('normal control', {'regular': 296225, 'supp': 35317, 'table': [[0, 0, 0], [24453, 0, 10], [69024, 4457, 12], [182891, 18121, 22], [264483, 36071, 24]], 'regular_wh': 33671}, 18494), ('normal control', {'regular': 163455, 'supp': 219806, 'table': [[0, 0, 0], [78088, 0, 10], [102393, 2431, 12], [151813, 8361, 22], [232276, 26063, 24]], 'regular_wh': 55407}, 6892)]]
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 0140921123686Failed
regression 1123040116092Failed
partial-repair probe 212641492267Failed
partial-repair probe 38650867216Failed
normal control 48549885498Passed
normal control 500Passed
normal control 66820068200Passed
normal control 712661266Passed

SHA-256 / 7598ef397ed0ba97d6355e5633b08540b0782cd4deec7b224d64948ca39971b3

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['supp'])
    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': 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': 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': 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': 91078, 'supp': 50965, 'table': [[0, 0, 0], [129383, 0, 10], [180861, 5148, 12], [251715, 13650, 22], [346731, 34554, 24]], 'regular_wh': None}, 1266)], [('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': 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': 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': 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': 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': 230312, 'supp': 412759, 'table': [[0, 0, 0], [87909, 0, 10], [234168, 14626, 12], [277117, 19780, 22], [325269, 30373, 24]], 'regular_wh': 53200}, 53445), ('normal control', {'regular': 301375, 'supp': 257327, 'table': [[0, 0, 0], [104655, 0, 10], [206771, 10212, 12], [296267, 20952, 22], [346695, 32046, 24]], 'regular_wh': 42656}, 40272)], [('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': 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': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('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), ('normal control', {'regular': 138799, 'supp': 242337, 'table': [[0, 0, 0], [67403, 0, 10], [179799, 11240, 12], [251397, 19832, 22], [387828, 49847, 24]], 'regular_wh': 45497}, 2878), ('normal control', {'regular': 282406, 'supp': 568743, 'table': [[0, 0, 0], [126319, 0, 10], [211110, 8479, 12], [332602, 23058, 22], [357109, 28450, 24]], 'regular_wh': 51500}, 95520), ('normal control', {'regular': 133684, 'supp': 525347, 'table': [[0, 0, 0], [48514, 0, 10], [163334, 11482, 12], [185105, 14095, 22], [247313, 27781, 24]], 'regular_wh': 48804}, 77789), ('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)], [('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': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('partial-repair probe', {'regular': 139761, 'supp': 580903, 'table': [[0, 0, 0], [33224, 0, 10], [124697, 9147, 12], [177909, 15532, 22], [324717, 47830, 24]], 'regular_wh': None}, 131902), ('partial-repair probe', {'regular': 311741, 'supp': 533113, 'table': [[0, 0, 0], [137329, 0, 10], [282729, 14540, 12], [396442, 28186, 22], [532518, 58123, 24]], 'regular_wh': None}, 115063), ('normal control', {'regular': 141294, 'supp': 528346, 'table': [[0, 0, 0], [34928, 0, 10], [149354, 11443, 12], [262856, 25063, 22], [303394, 33981, 24]], 'regular_wh': 22556}, 99324), ('normal control', {'regular': 262089, 'supp': 507017, 'table': [[0, 0, 0], [142148, 0, 10], [247062, 10491, 12], [290368, 15688, 22], [364013, 31890, 24]], 'regular_wh': 29086}, 100026), ('normal control', {'regular': 355740, 'supp': 87796, 'table': [[0, 0, 0], [94277, 0, 10], [205651, 11137, 12], [258997, 17539, 22], [340618, 35496, 24]], 'regular_wh': 55813}, 4383), ('normal control', {'regular': 323732, 'supp': 553358, 'table': [[0, 0, 0], [66794, 0, 10], [163528, 9673, 12], [276538, 23234, 22], [416110, 53940, 24]], 'regular_wh': 21793}, 142782)], [('regression', {'regular': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('regression', {'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': 376443, 'supp': 593003, 'table': [[0, 0, 0], [149063, 0, 10], [179956, 3089, 12], [266122, 13429, 22], [344153, 30596, 24]], 'regular_wh': None}, 142320), ('partial-repair probe', {'regular': 348176, 'supp': 89132, 'table': [[0, 0, 0], [125841, 0, 10], [173895, 4805, 12], [222871, 10682, 22], [276667, 22517, 24]], 'regular_wh': None}, 21392), ('normal control', {'regular': 59789, 'supp': 391548, 'table': [[0, 0, 0], [60034, 0, 10], [122955, 6292, 12], [182142, 13394, 22], [295884, 38417, 24]], 'regular_wh': 40024}, 35702), ('normal control', {'regular': 64778, 'supp': 350120, 'table': [[0, 0, 0], [120719, 0, 10], [254321, 13360, 12], [305181, 19463, 22], [397517, 39777, 24]], 'regular_wh': 1848}, 42100), ('normal control', {'regular': 296225, 'supp': 35317, 'table': [[0, 0, 0], [24453, 0, 10], [69024, 4457, 12], [182891, 18121, 22], [264483, 36071, 24]], 'regular_wh': 33671}, 18494), ('normal control', {'regular': 163455, 'supp': 219806, 'table': [[0, 0, 0], [78088, 0, 10], [102393, 2431, 12], [151813, 8361, 22], [232276, 26063, 24]], 'regular_wh': 55407}, 6892)]]
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 047170123686Failed
regression 140058116092Failed
partial-repair probe 26512792267Failed
partial-repair probe 36467567216Failed
normal control 48549885498Passed
normal control 500Passed
normal control 66820068200Passed
normal control 712661266Passed

SHA-256 / 592ef6ee13bb6922bf9716a1280d8bd4f242361894d0c11d06bb7f40483b400d

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': 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': 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': 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': 91078, 'supp': 50965, 'table': [[0, 0, 0], [129383, 0, 10], [180861, 5148, 12], [251715, 13650, 22], [346731, 34554, 24]], 'regular_wh': None}, 1266)], [('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': 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': 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': 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': 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': 230312, 'supp': 412759, 'table': [[0, 0, 0], [87909, 0, 10], [234168, 14626, 12], [277117, 19780, 22], [325269, 30373, 24]], 'regular_wh': 53200}, 53445), ('normal control', {'regular': 301375, 'supp': 257327, 'table': [[0, 0, 0], [104655, 0, 10], [206771, 10212, 12], [296267, 20952, 22], [346695, 32046, 24]], 'regular_wh': 42656}, 40272)], [('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': 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': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('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), ('normal control', {'regular': 138799, 'supp': 242337, 'table': [[0, 0, 0], [67403, 0, 10], [179799, 11240, 12], [251397, 19832, 22], [387828, 49847, 24]], 'regular_wh': 45497}, 2878), ('normal control', {'regular': 282406, 'supp': 568743, 'table': [[0, 0, 0], [126319, 0, 10], [211110, 8479, 12], [332602, 23058, 22], [357109, 28450, 24]], 'regular_wh': 51500}, 95520), ('normal control', {'regular': 133684, 'supp': 525347, 'table': [[0, 0, 0], [48514, 0, 10], [163334, 11482, 12], [185105, 14095, 22], [247313, 27781, 24]], 'regular_wh': 48804}, 77789), ('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)], [('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': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('partial-repair probe', {'regular': 139761, 'supp': 580903, 'table': [[0, 0, 0], [33224, 0, 10], [124697, 9147, 12], [177909, 15532, 22], [324717, 47830, 24]], 'regular_wh': None}, 131902), ('partial-repair probe', {'regular': 311741, 'supp': 533113, 'table': [[0, 0, 0], [137329, 0, 10], [282729, 14540, 12], [396442, 28186, 22], [532518, 58123, 24]], 'regular_wh': None}, 115063), ('normal control', {'regular': 141294, 'supp': 528346, 'table': [[0, 0, 0], [34928, 0, 10], [149354, 11443, 12], [262856, 25063, 22], [303394, 33981, 24]], 'regular_wh': 22556}, 99324), ('normal control', {'regular': 262089, 'supp': 507017, 'table': [[0, 0, 0], [142148, 0, 10], [247062, 10491, 12], [290368, 15688, 22], [364013, 31890, 24]], 'regular_wh': 29086}, 100026), ('normal control', {'regular': 355740, 'supp': 87796, 'table': [[0, 0, 0], [94277, 0, 10], [205651, 11137, 12], [258997, 17539, 22], [340618, 35496, 24]], 'regular_wh': 55813}, 4383), ('normal control', {'regular': 323732, 'supp': 553358, 'table': [[0, 0, 0], [66794, 0, 10], [163528, 9673, 12], [276538, 23234, 22], [416110, 53940, 24]], 'regular_wh': 21793}, 142782)], [('regression', {'regular': 332685, 'supp': 265440, 'table': [[0, 0, 0], [82800, 0, 10], [155250, 7245, 12], [280472, 22272, 22], [368552, 41650, 24]], 'regular_wh': None}, 62989), ('regression', {'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': 376443, 'supp': 593003, 'table': [[0, 0, 0], [149063, 0, 10], [179956, 3089, 12], [266122, 13429, 22], [344153, 30596, 24]], 'regular_wh': None}, 142320), ('partial-repair probe', {'regular': 348176, 'supp': 89132, 'table': [[0, 0, 0], [125841, 0, 10], [173895, 4805, 12], [222871, 10682, 22], [276667, 22517, 24]], 'regular_wh': None}, 21392), ('normal control', {'regular': 59789, 'supp': 391548, 'table': [[0, 0, 0], [60034, 0, 10], [122955, 6292, 12], [182142, 13394, 22], [295884, 38417, 24]], 'regular_wh': 40024}, 35702), ('normal control', {'regular': 64778, 'supp': 350120, 'table': [[0, 0, 0], [120719, 0, 10], [254321, 13360, 12], [305181, 19463, 22], [397517, 39777, 24]], 'regular_wh': 1848}, 42100), ('normal control', {'regular': 296225, 'supp': 35317, 'table': [[0, 0, 0], [24453, 0, 10], [69024, 4457, 12], [182891, 18121, 22], [264483, 36071, 24]], 'regular_wh': 33671}, 18494), ('normal control', {'regular': 163455, 'supp': 219806, 'table': [[0, 0, 0], [78088, 0, 10], [102393, 2431, 12], [151813, 8361, 22], [232276, 26063, 24]], 'regular_wh': 55407}, 6892)]]
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 36721667216Passed
normal control 48549885498Passed
normal control 500Passed
normal control 66820068200Passed
normal control 712661266Passed

SHA-256 / 991d92a4c2f621e00dac8e74d8f68e1111639ba14010b1cbb84484b67523b56f

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

Case digest / d6f8a8d2a11f62763a5ee337bcaccf87c45d98bc50945c7ad94e8ea8e3653224