FAILURE MAP
← Case archive

FA-63161 / Insurance premium rating / Open access

Workers compensation payroll audit premium: Unknown class codes are skipped · case 01

Payroll reported under an unfiled class code disappears from the audit.

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

ROOT CAUSE

The unknown class is silently ignored.

THE FAILURE

The unknown class is silently ignored.

Unsuccessful approach: Remapping to the first class misrates the payroll instead of flagging it.

Case contract

Input rates {class: cents per $100 of payroll}, employees [[class, payroll cents incl. overtime, overtime cents, officer]], officer_min, officer_max. Unknown class -> 'unknown class <code>'. Remove the overtime premium portion (one third of overtime pay), then clamp officer payroll to [officer_min, officer_max]. Sum payroll by class; class premium = payroll*rate/10000 rounded half-up per class; return the total.

Why this case matters

Audited payroll premium is where overtime exclusions and officer limits routinely go wrong.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(x):
    by={}
    for cls,pay,ot,officer in x['employees']:
        if cls not in x['rates']: continue
        base=pay-Fraction(ot,3)
        if officer: base=max(x['officer_min'],min(x['officer_max'],base))
        by[cls]=by.get(cls,0)+base
    tot=0
    for cls in sorted(by):
        tot+=math.floor(by[cls]*x['rates'][cls]/10000+Fraction(1,2))
    return tot
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['construction crew with overtime', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['5403', 3806909, 440206, False], ['5403', 5169784, 475047, False], ['5403', 4327308, 875628, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1724345], ['high-paid officer capped', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['8810', 20000001, 0, True], ['8810', 7473841, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 42842], ['officer with overtime near cap', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['8742', 12200001, 900000, True], ['5183', 2895447, 604577, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 221988], ['part-time officer raised to minimum', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 8392399, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 54684], ['mixed classes', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['5403', 4370481, 231136, False], ['8742', 6099309, 257334, False], ['5183', 8272641, 294990, False], ['8810', 4489688, 191785, False], ['8742', 8245285, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1161066], ['unknown class code', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['9999', 7459474, 453667, False], ['8810', 4658471, 375443, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['5183', 612208, 50444, False], ['5183', 642893, 43214, False], ['5183', 509283, 67193, False], ['5183', 482245, 69768, False], ['5183', 387181, 38625, False], ['5183', 624757, 46096, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 192991], ['no employees', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['5403', 2704921, 47898, False], ['5403', 1854859, 1323, False], ['5403', 2209353, 699, False], ['5403', 1645713, 34941, False], ['8742', 1964735, 0, False], ['8742', 1444407, 0, False], ['8742', 1185321, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1160109]], [['construction crew with overtime', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['5403', 5589785, 749739, False], ['5403', 3004512, 755944, False], ['5403', 8028563, 494683, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2176408], ['high-paid officer capped', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['8810', 20000002, 0, True], ['8810', 4938763, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 38959], ['officer with overtime near cap', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['8742', 12200002, 900000, True], ['5183', 7556209, 751524, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 504229], ['part-time officer raised to minimum', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 3240624, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 29955], ['mixed classes', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['8742', 2948197, 551768, False], ['5403', 2964789, 498187, False], ['8810', 6667557, 0, False], ['8810', 2940792, 0, False], ['8810', 7643712, 449698, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 434350], ['unknown class code', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['9999', 2603447, 0, False], ['8810', 6041352, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['5183', 597562, 61292, False], ['5183', 587325, 8597, False], ['5183', 364731, 61505, False], ['5183', 500399, 11567, False], ['5183', 326057, 33389, False], ['5183', 634518, 31090, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 180016], ['no employees', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['5403', 2905651, 11823, False], ['5403', 2371235, 56064, False], ['5403', 2934717, 85428, False], ['5403', 2781211, 64023, False], ['8742', 1361139, 0, False], ['8742', 2833115, 0, False], ['8742', 1273671, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1515784]], [['construction crew with overtime', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['5403', 4509048, 724931, False], ['5403', 6366252, 824599, False], ['5403', 8964442, 347528, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2633333], ['high-paid officer capped', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['8810', 20000003, 0, True], ['8810', 2634381, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 35123], ['officer with overtime near cap', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['8742', 12200003, 900000, True], ['5183', 7287070, 735091, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 488093], ['part-time officer raised to minimum', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 4603792, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 36498], ['mixed classes', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['8810', 8750822, 0, False], ['8810', 6128102, 0, False], ['5183', 6246828, 0, False], ['5403', 5909616, 322654, False], ['8810', 6168033, 540676, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1227849], ['unknown class code', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['9999', 7327480, 551873, False], ['8810', 3024985, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['5183', 329254, 7253, False], ['5183', 626764, 42759, False], ['5183', 659916, 20264, False], ['5183', 519469, 35559, False], ['5183', 389886, 75669, False], ['5183', 507542, 41718, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 181056], ['no employees', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['5403', 2659221, 68400, False], ['5403', 2971143, 68046, False], ['5403', 2774867, 10245, False], ['5403', 2815711, 38499, False], ['8742', 2701865, 0, False], ['8742', 1164649, 0, False], ['8742', 1162777, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1554069]], [['construction crew with overtime', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['5403', 5006217, 551722, False], ['5403', 3676711, 858245, False], ['5403', 7410036, 662511, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2122415], ['high-paid officer capped', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['8810', 20000004, 0, True], ['8810', 5669566, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 44174], ['officer with overtime near cap', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['8742', 12200004, 900000, True], ['5183', 4588140, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 337914], ['part-time officer raised to minimum', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 6091797, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 43641], ['mixed classes', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['5403', 8534301, 165838, False], ['8742', 5684815, 239232, False], ['5403', 8412792, 134991, False], ['8742', 4205248, 0, False], ['8742', 4460925, 281462, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2389543], ['unknown class code', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['9999', 4685853, 0, False], ['8810', 8884824, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['5183', 528372, 84144, False], ['5183', 611261, 67360, False], ['5183', 530047, 86400, False], ['5183', 594062, 70397, False], ['5183', 692753, 26987, False], ['5183', 474056, 25708, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 202585], ['no employees', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['5403', 2422889, 9399, False], ['5403', 2602627, 61761, False], ['5403', 2502883, 72387, False], ['5403', 1907625, 52560, False], ['8742', 2723881, 0, False], ['8742', 2789151, 0, False], ['8742', 1671629, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1325762]], [['construction crew with overtime', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['5403', 4325810, 386365, False], ['5403', 8069112, 702120, False], ['5403', 8542896, 764368, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2814348], ['high-paid officer capped', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['8810', 20000005, 0, True], ['8810', 3023598, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 39061], ['officer with overtime near cap', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['8742', 12200005, 900000, True], ['5183', 6746427, 347672, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 462909], ['part-time officer raised to minimum', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 2883302, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 28240], ['mixed classes', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['5183', 6265553, 0, False], ['5403', 8393440, 217802, False], ['5403', 6148670, 0, False], ['5183', 3719409, 873745, False], ['8742', 6249488, 662920, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2626219], ['unknown class code', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['9999', 2588874, 0, False], ['8810', 4808227, 215758, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['5183', 607059, 78097, False], ['5183', 557045, 41904, False], ['5183', 398784, 78900, False], ['5183', 578083, 69965, False], ['5183', 306975, 36499, False], ['5183', 592062, 59356, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 178608], ['no employees', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['5403', 2366515, 69267, False], ['5403', 2032839, 11376, False], ['5403', 1111359, 84174, False], ['5403', 1758487, 71022, False], ['8742', 1374745, 0, False], ['8742', 2478437, 0, False], ['8742', 1307151, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1020666]]]
for label, args, expected in fixtures[N-1]:
    check(label, 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
construction crew with overtime17243451724345Passed
high-paid officer capped4284242842Passed
officer with overtime near cap221988221988Passed
part-time officer raised to minimum5468454684Passed
mixed classes11610661161066Passed
unknown class code9973unknown class 9999Failed
many small payrolls in one class192991192991Passed
no employees00Passed
odd payrolls in two classes11601091160109Passed

SHA-256 / f9b53d5113a1bbda465f65813cd51d897686699e5cdbec807ab65cf47a05064b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(x):
    by={}
    for cls,pay,ot,officer in x['employees']:
        if cls not in x['rates']: cls=sorted(x['rates'])[0]
        base=pay-Fraction(ot,3)
        if officer: base=max(x['officer_min'],min(x['officer_max'],base))
        by[cls]=by.get(cls,0)+base
    tot=0
    for cls in sorted(by):
        tot+=math.floor(by[cls]*x['rates'][cls]/10000+Fraction(1,2))
    return tot
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['construction crew with overtime', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['5403', 3806909, 440206, False], ['5403', 5169784, 475047, False], ['5403', 4327308, 875628, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1724345], ['high-paid officer capped', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['8810', 20000001, 0, True], ['8810', 7473841, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 42842], ['officer with overtime near cap', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['8742', 12200001, 900000, True], ['5183', 2895447, 604577, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 221988], ['part-time officer raised to minimum', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 8392399, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 54684], ['mixed classes', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['5403', 4370481, 231136, False], ['8742', 6099309, 257334, False], ['5183', 8272641, 294990, False], ['8810', 4489688, 191785, False], ['8742', 8245285, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1161066], ['unknown class code', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['9999', 7459474, 453667, False], ['8810', 4658471, 375443, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['5183', 612208, 50444, False], ['5183', 642893, 43214, False], ['5183', 509283, 67193, False], ['5183', 482245, 69768, False], ['5183', 387181, 38625, False], ['5183', 624757, 46096, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 192991], ['no employees', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 22, '5403': 1357, '8742': 48, '5183': 612}, 'employees': [['5403', 2704921, 47898, False], ['5403', 1854859, 1323, False], ['5403', 2209353, 699, False], ['5403', 1645713, 34941, False], ['8742', 1964735, 0, False], ['8742', 1444407, 0, False], ['8742', 1185321, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1160109]], [['construction crew with overtime', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['5403', 5589785, 749739, False], ['5403', 3004512, 755944, False], ['5403', 8028563, 494683, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2176408], ['high-paid officer capped', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['8810', 20000002, 0, True], ['8810', 4938763, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 38959], ['officer with overtime near cap', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['8742', 12200002, 900000, True], ['5183', 7556209, 751524, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 504229], ['part-time officer raised to minimum', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 3240624, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 29955], ['mixed classes', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['8742', 2948197, 551768, False], ['5403', 2964789, 498187, False], ['8810', 6667557, 0, False], ['8810', 2940792, 0, False], ['8810', 7643712, 449698, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 434350], ['unknown class code', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['9999', 2603447, 0, False], ['8810', 6041352, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['5183', 597562, 61292, False], ['5183', 587325, 8597, False], ['5183', 364731, 61505, False], ['5183', 500399, 11567, False], ['5183', 326057, 33389, False], ['5183', 634518, 31090, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 180016], ['no employees', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 23, '5403': 1364, '8742': 48, '5183': 612}, 'employees': [['5403', 2905651, 11823, False], ['5403', 2371235, 56064, False], ['5403', 2934717, 85428, False], ['5403', 2781211, 64023, False], ['8742', 1361139, 0, False], ['8742', 2833115, 0, False], ['8742', 1273671, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1515784]], [['construction crew with overtime', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['5403', 4509048, 724931, False], ['5403', 6366252, 824599, False], ['5403', 8964442, 347528, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2633333], ['high-paid officer capped', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['8810', 20000003, 0, True], ['8810', 2634381, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 35123], ['officer with overtime near cap', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['8742', 12200003, 900000, True], ['5183', 7287070, 735091, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 488093], ['part-time officer raised to minimum', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 4603792, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 36498], ['mixed classes', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['8810', 8750822, 0, False], ['8810', 6128102, 0, False], ['5183', 6246828, 0, False], ['5403', 5909616, 322654, False], ['8810', 6168033, 540676, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1227849], ['unknown class code', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['9999', 7327480, 551873, False], ['8810', 3024985, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['5183', 329254, 7253, False], ['5183', 626764, 42759, False], ['5183', 659916, 20264, False], ['5183', 519469, 35559, False], ['5183', 389886, 75669, False], ['5183', 507542, 41718, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 181056], ['no employees', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 24, '5403': 1371, '8742': 48, '5183': 612}, 'employees': [['5403', 2659221, 68400, False], ['5403', 2971143, 68046, False], ['5403', 2774867, 10245, False], ['5403', 2815711, 38499, False], ['8742', 2701865, 0, False], ['8742', 1164649, 0, False], ['8742', 1162777, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1554069]], [['construction crew with overtime', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['5403', 5006217, 551722, False], ['5403', 3676711, 858245, False], ['5403', 7410036, 662511, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2122415], ['high-paid officer capped', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['8810', 20000004, 0, True], ['8810', 5669566, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 44174], ['officer with overtime near cap', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['8742', 12200004, 900000, True], ['5183', 4588140, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 337914], ['part-time officer raised to minimum', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 6091797, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 43641], ['mixed classes', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['5403', 8534301, 165838, False], ['8742', 5684815, 239232, False], ['5403', 8412792, 134991, False], ['8742', 4205248, 0, False], ['8742', 4460925, 281462, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2389543], ['unknown class code', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['9999', 4685853, 0, False], ['8810', 8884824, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['5183', 528372, 84144, False], ['5183', 611261, 67360, False], ['5183', 530047, 86400, False], ['5183', 594062, 70397, False], ['5183', 692753, 26987, False], ['5183', 474056, 25708, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 202585], ['no employees', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 25, '5403': 1378, '8742': 48, '5183': 612}, 'employees': [['5403', 2422889, 9399, False], ['5403', 2602627, 61761, False], ['5403', 2502883, 72387, False], ['5403', 1907625, 52560, False], ['8742', 2723881, 0, False], ['8742', 2789151, 0, False], ['8742', 1671629, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1325762]], [['construction crew with overtime', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['5403', 4325810, 386365, False], ['5403', 8069112, 702120, False], ['5403', 8542896, 764368, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2814348], ['high-paid officer capped', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['8810', 20000005, 0, True], ['8810', 3023598, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 39061], ['officer with overtime near cap', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['8742', 12200005, 900000, True], ['5183', 6746427, 347672, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 462909], ['part-time officer raised to minimum', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['8742', 1200000, 0, True], ['8742', 2883302, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 28240], ['mixed classes', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['5183', 6265553, 0, False], ['5403', 8393440, 217802, False], ['5403', 6148670, 0, False], ['5183', 3719409, 873745, False], ['8742', 6249488, 662920, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 2626219], ['unknown class code', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['9999', 2588874, 0, False], ['8810', 4808227, 215758, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 'unknown class 9999'], ['many small payrolls in one class', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['5183', 607059, 78097, False], ['5183', 557045, 41904, False], ['5183', 398784, 78900, False], ['5183', 578083, 69965, False], ['5183', 306975, 36499, False], ['5183', 592062, 59356, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 178608], ['no employees', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [], 'officer_min': 3000000, 'officer_max': 12000000}, 0], ['odd payrolls in two classes', {'rates': {'8810': 26, '5403': 1385, '8742': 48, '5183': 612}, 'employees': [['5403', 2366515, 69267, False], ['5403', 2032839, 11376, False], ['5403', 1111359, 84174, False], ['5403', 1758487, 71022, False], ['8742', 1374745, 0, False], ['8742', 2478437, 0, False], ['8742', 1307151, 0, False]], 'officer_min': 3000000, 'officer_max': 12000000}, 1020666]]]
for label, args, expected in fixtures[N-1]:
    check(label, 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
construction crew with overtime17243451724345Passed
high-paid officer capped4284242842Passed
officer with overtime near cap221988221988Passed
part-time officer raised to minimum5468454684Passed
mixed classes11610661161066Passed
unknown class code457238unknown class 9999Failed
many small payrolls in one class192991192991Passed
no employees00Passed
odd payrolls in two classes11601091160109Passed

SHA-256 / f1bd0a98f6f8dd450d81eb72824c260de8d8d2843398020bbb9d0274bf165aaf

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

A deterministic bounded teaching model of a stipulated toy rating contract. Amounts are integer cents and factors exact rationals; it makes no claim of conformance with any filed rating plan, bureau manual or jurisdiction. 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:47:11.573615+00:00.

Case digest / 050c2b1f7717caabb998e0f75925a0eca38418ddb5a03340c0736960ce5d60fc