FA-58981 / Payroll withholding rules / Open access
Tip credit and minimum-wage makeup: negative credit floor · case 01
Employees paid a cash rate above minimum wage get negative makeup and inflated wages.
ROOT CAUSE
A negative credit (cash rate above minimum wage) is not floored at zero.
VERIFIED REPAIR
Restore the contract rule at the negative credit floor step: use `credit_rate = max(0,`.
Unsuccessful approach: The attempt takes the absolute value, turning a surplus cash rate into a positive credit claim.
Case contract
Input weekly {hours, cash_rate, tips, min_wage (even cents), tip_credit_max}. Tip credit per hour = max(0, min(min_wage - cash_rate, tip_credit_max)). Hours over 40 are paid at 1.5*min_wage minus the same credit. Credit actually taken = min(tips, hours*credit); the unmet credit is paid as makeup. Return [cash_wages, makeup].
Why this case matters
Tip credits are capped by tips actually received and do not grow on overtime hours.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
h = x['hours']
mw = x['min_wage']
cash = x['cash_rate']
reg = min(h, 40)
ot = max(0, h - 40)
credit_rate = (min(mw - cash, x['tip_credit_max']))
credit_total = min(x['tips'], h * credit_rate)
makeup = h * credit_rate - credit_total
cash_wages = reg * (mw - credit_rate) + ot * (mw * 3 // 2 - credit_rate) + makeup
return [cash_wages, makeup]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'hours': 23, 'cash_rate': 776, 'tips': 1403, 'min_wage': 726, 'tip_credit_max': 800}, [16698, 0]), ('regression', {'hours': 47, 'cash_rate': 1650, 'tips': 42376, 'min_wage': 1600, 'tip_credit_max': 300}, [80800, 0]), ('partial-repair probe', {'hours': 9, 'cash_rate': 1050, 'tips': 1770, 'min_wage': 1000, 'tip_credit_max': 800}, [9000, 0]), ('partial-repair probe', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('normal control', {'hours': 47, 'cash_rate': 1200, 'tips': 1983, 'min_wage': 1200, 'tip_credit_max': 300}, [60600, 0]), ('normal control', {'hours': 42, 'cash_rate': 300, 'tips': 0, 'min_wage': 1600, 'tip_credit_max': 800}, [68800, 33600]), ('normal control', {'hours': 21, 'cash_rate': 500, 'tips': 46641, 'min_wage': 1200, 'tip_credit_max': 512}, [14448, 0]), ('normal control', {'hours': 27, 'cash_rate': 726, 'tips': 397, 'min_wage': 726, 'tip_credit_max': 300}, [19602, 0])], [('regression', {'hours': 47, 'cash_rate': 1650, 'tips': 42376, 'min_wage': 1600, 'tip_credit_max': 300}, [80800, 0]), ('regression', {'hours': 9, 'cash_rate': 1050, 'tips': 1770, 'min_wage': 1000, 'tip_credit_max': 800}, [9000, 0]), ('partial-repair probe', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('partial-repair probe', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('normal control', {'hours': 58, 'cash_rate': 300, 'tips': 43606, 'min_wage': 1200, 'tip_credit_max': 300}, [63000, 0]), ('normal control', {'hours': 52, 'cash_rate': 213, 'tips': 42918, 'min_wage': 1200, 'tip_credit_max': 300}, [54000, 0]), ('normal control', {'hours': 40, 'cash_rate': 1600, 'tips': 1562, 'min_wage': 1600, 'tip_credit_max': 300}, [64000, 0]), ('normal control', {'hours': 40, 'cash_rate': 213, 'tips': 0, 'min_wage': 1000, 'tip_credit_max': 300}, [40000, 12000])], [('regression', {'hours': 9, 'cash_rate': 1050, 'tips': 1770, 'min_wage': 1000, 'tip_credit_max': 800}, [9000, 0]), ('regression', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('partial-repair probe', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('partial-repair probe', {'hours': 57, 'cash_rate': 776, 'tips': 0, 'min_wage': 726, 'tip_credit_max': 300}, [47553, 0]), ('normal control', {'hours': 19, 'cash_rate': 300, 'tips': 3831, 'min_wage': 726, 'tip_credit_max': 512}, [9963, 4263]), ('normal control', {'hours': 56, 'cash_rate': 213, 'tips': 464, 'min_wage': 1000, 'tip_credit_max': 800}, [63536, 43608]), ('normal control', {'hours': 22, 'cash_rate': 1200, 'tips': 48563, 'min_wage': 1200, 'tip_credit_max': 300}, [26400, 0]), ('normal control', {'hours': 52, 'cash_rate': 300, 'tips': 13052, 'min_wage': 1000, 'tip_credit_max': 800}, [44948, 23348])], [('regression', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('regression', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('partial-repair probe', {'hours': 32, 'cash_rate': 776, 'tips': 13592, 'min_wage': 726, 'tip_credit_max': 800}, [23232, 0]), ('partial-repair probe', {'hours': 60, 'cash_rate': 776, 'tips': 36208, 'min_wage': 726, 'tip_credit_max': 512}, [50820, 0]), ('normal control', {'hours': 13, 'cash_rate': 300, 'tips': 3600, 'min_wage': 1600, 'tip_credit_max': 512}, [17200, 3056]), ('normal control', {'hours': 46, 'cash_rate': 213, 'tips': 3880, 'min_wage': 1200, 'tip_credit_max': 300}, [54920, 9920]), ('normal control', {'hours': 60, 'cash_rate': 300, 'tips': 25281, 'min_wage': 1200, 'tip_credit_max': 300}, [66000, 0]), ('normal control', {'hours': 15, 'cash_rate': 300, 'tips': 777, 'min_wage': 726, 'tip_credit_max': 800}, [10113, 5613])], [('regression', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('regression', {'hours': 57, 'cash_rate': 776, 'tips': 0, 'min_wage': 726, 'tip_credit_max': 300}, [47553, 0]), ('partial-repair probe', {'hours': 47, 'cash_rate': 1650, 'tips': 0, 'min_wage': 1600, 'tip_credit_max': 800}, [80800, 0]), ('partial-repair probe', {'hours': 35, 'cash_rate': 776, 'tips': 4941, 'min_wage': 726, 'tip_credit_max': 300}, [25410, 0]), ('normal control', {'hours': 12, 'cash_rate': 213, 'tips': 0, 'min_wage': 726, 'tip_credit_max': 512}, [8712, 6144]), ('normal control', {'hours': 43, 'cash_rate': 1600, 'tips': 32479, 'min_wage': 1600, 'tip_credit_max': 300}, [71200, 0]), ('normal control', {'hours': 36, 'cash_rate': 500, 'tips': 27434, 'min_wage': 1000, 'tip_credit_max': 300}, [25200, 0]), ('normal control', {'hours': 53, 'cash_rate': 300, 'tips': 45712, 'min_wage': 1600, 'tip_credit_max': 512}, [68064, 0])]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
check("%s %d" % (label, i), solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [17848, 0] | [16698, 0] | Failed |
| regression 1 | [83150, 0] | [80800, 0] | Failed |
| partial-repair probe 2 | [9450, 0] | [9000, 0] | Failed |
| partial-repair probe 3 | [38850, 0] | [37000, 0] | Failed |
| normal control 4 | [60600, 0] | [60600, 0] | Passed |
| normal control 5 | [68800, 33600] | [68800, 33600] | Passed |
| normal control 6 | [14448, 0] | [14448, 0] | Passed |
| normal control 7 | [19602, 0] | [19602, 0] | Passed |
SHA-256 / ae5ccb8d2b6b74d0489d5b426d97faa06c9b81dddf50602c3bc365f28da61f23
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
h = x['hours']
mw = x['min_wage']
cash = x['cash_rate']
reg = min(h, 40)
ot = max(0, h - 40)
credit_rate = abs(min(mw - cash, x['tip_credit_max']))
credit_total = min(x['tips'], h * credit_rate)
makeup = h * credit_rate - credit_total
cash_wages = reg * (mw - credit_rate) + ot * (mw * 3 // 2 - credit_rate) + makeup
return [cash_wages, makeup]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'hours': 23, 'cash_rate': 776, 'tips': 1403, 'min_wage': 726, 'tip_credit_max': 800}, [16698, 0]), ('regression', {'hours': 47, 'cash_rate': 1650, 'tips': 42376, 'min_wage': 1600, 'tip_credit_max': 300}, [80800, 0]), ('partial-repair probe', {'hours': 9, 'cash_rate': 1050, 'tips': 1770, 'min_wage': 1000, 'tip_credit_max': 800}, [9000, 0]), ('partial-repair probe', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('normal control', {'hours': 47, 'cash_rate': 1200, 'tips': 1983, 'min_wage': 1200, 'tip_credit_max': 300}, [60600, 0]), ('normal control', {'hours': 42, 'cash_rate': 300, 'tips': 0, 'min_wage': 1600, 'tip_credit_max': 800}, [68800, 33600]), ('normal control', {'hours': 21, 'cash_rate': 500, 'tips': 46641, 'min_wage': 1200, 'tip_credit_max': 512}, [14448, 0]), ('normal control', {'hours': 27, 'cash_rate': 726, 'tips': 397, 'min_wage': 726, 'tip_credit_max': 300}, [19602, 0])], [('regression', {'hours': 47, 'cash_rate': 1650, 'tips': 42376, 'min_wage': 1600, 'tip_credit_max': 300}, [80800, 0]), ('regression', {'hours': 9, 'cash_rate': 1050, 'tips': 1770, 'min_wage': 1000, 'tip_credit_max': 800}, [9000, 0]), ('partial-repair probe', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('partial-repair probe', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('normal control', {'hours': 58, 'cash_rate': 300, 'tips': 43606, 'min_wage': 1200, 'tip_credit_max': 300}, [63000, 0]), ('normal control', {'hours': 52, 'cash_rate': 213, 'tips': 42918, 'min_wage': 1200, 'tip_credit_max': 300}, [54000, 0]), ('normal control', {'hours': 40, 'cash_rate': 1600, 'tips': 1562, 'min_wage': 1600, 'tip_credit_max': 300}, [64000, 0]), ('normal control', {'hours': 40, 'cash_rate': 213, 'tips': 0, 'min_wage': 1000, 'tip_credit_max': 300}, [40000, 12000])], [('regression', {'hours': 9, 'cash_rate': 1050, 'tips': 1770, 'min_wage': 1000, 'tip_credit_max': 800}, [9000, 0]), ('regression', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('partial-repair probe', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('partial-repair probe', {'hours': 57, 'cash_rate': 776, 'tips': 0, 'min_wage': 726, 'tip_credit_max': 300}, [47553, 0]), ('normal control', {'hours': 19, 'cash_rate': 300, 'tips': 3831, 'min_wage': 726, 'tip_credit_max': 512}, [9963, 4263]), ('normal control', {'hours': 56, 'cash_rate': 213, 'tips': 464, 'min_wage': 1000, 'tip_credit_max': 800}, [63536, 43608]), ('normal control', {'hours': 22, 'cash_rate': 1200, 'tips': 48563, 'min_wage': 1200, 'tip_credit_max': 300}, [26400, 0]), ('normal control', {'hours': 52, 'cash_rate': 300, 'tips': 13052, 'min_wage': 1000, 'tip_credit_max': 800}, [44948, 23348])], [('regression', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('regression', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('partial-repair probe', {'hours': 32, 'cash_rate': 776, 'tips': 13592, 'min_wage': 726, 'tip_credit_max': 800}, [23232, 0]), ('partial-repair probe', {'hours': 60, 'cash_rate': 776, 'tips': 36208, 'min_wage': 726, 'tip_credit_max': 512}, [50820, 0]), ('normal control', {'hours': 13, 'cash_rate': 300, 'tips': 3600, 'min_wage': 1600, 'tip_credit_max': 512}, [17200, 3056]), ('normal control', {'hours': 46, 'cash_rate': 213, 'tips': 3880, 'min_wage': 1200, 'tip_credit_max': 300}, [54920, 9920]), ('normal control', {'hours': 60, 'cash_rate': 300, 'tips': 25281, 'min_wage': 1200, 'tip_credit_max': 300}, [66000, 0]), ('normal control', {'hours': 15, 'cash_rate': 300, 'tips': 777, 'min_wage': 726, 'tip_credit_max': 800}, [10113, 5613])], [('regression', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('regression', {'hours': 57, 'cash_rate': 776, 'tips': 0, 'min_wage': 726, 'tip_credit_max': 300}, [47553, 0]), ('partial-repair probe', {'hours': 47, 'cash_rate': 1650, 'tips': 0, 'min_wage': 1600, 'tip_credit_max': 800}, [80800, 0]), ('partial-repair probe', {'hours': 35, 'cash_rate': 776, 'tips': 4941, 'min_wage': 726, 'tip_credit_max': 300}, [25410, 0]), ('normal control', {'hours': 12, 'cash_rate': 213, 'tips': 0, 'min_wage': 726, 'tip_credit_max': 512}, [8712, 6144]), ('normal control', {'hours': 43, 'cash_rate': 1600, 'tips': 32479, 'min_wage': 1600, 'tip_credit_max': 300}, [71200, 0]), ('normal control', {'hours': 36, 'cash_rate': 500, 'tips': 27434, 'min_wage': 1000, 'tip_credit_max': 300}, [25200, 0]), ('normal control', {'hours': 53, 'cash_rate': 300, 'tips': 45712, 'min_wage': 1600, 'tip_credit_max': 512}, [68064, 0])]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
check("%s %d" % (label, i), solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [15548, 0] | [16698, 0] | Failed |
| regression 1 | [78450, 0] | [80800, 0] | Failed |
| partial-repair probe 2 | [8550, 0] | [9000, 0] | Failed |
| partial-repair probe 3 | [35220, 70] | [37000, 0] | Failed |
| normal control 4 | [60600, 0] | [60600, 0] | Passed |
| normal control 5 | [68800, 33600] | [68800, 33600] | Passed |
| normal control 6 | [14448, 0] | [14448, 0] | Passed |
| normal control 7 | [19602, 0] | [19602, 0] | Passed |
SHA-256 / b396895550738031d1da9f5aaa85680263fe7db02f507602373f65342f2561ee
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
h = x['hours']
mw = x['min_wage']
cash = x['cash_rate']
reg = min(h, 40)
ot = max(0, h - 40)
credit_rate = max(0, min(mw - cash, x['tip_credit_max']))
credit_total = min(x['tips'], h * credit_rate)
makeup = h * credit_rate - credit_total
cash_wages = reg * (mw - credit_rate) + ot * (mw * 3 // 2 - credit_rate) + makeup
return [cash_wages, makeup]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'hours': 23, 'cash_rate': 776, 'tips': 1403, 'min_wage': 726, 'tip_credit_max': 800}, [16698, 0]), ('regression', {'hours': 47, 'cash_rate': 1650, 'tips': 42376, 'min_wage': 1600, 'tip_credit_max': 300}, [80800, 0]), ('partial-repair probe', {'hours': 9, 'cash_rate': 1050, 'tips': 1770, 'min_wage': 1000, 'tip_credit_max': 800}, [9000, 0]), ('partial-repair probe', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('normal control', {'hours': 47, 'cash_rate': 1200, 'tips': 1983, 'min_wage': 1200, 'tip_credit_max': 300}, [60600, 0]), ('normal control', {'hours': 42, 'cash_rate': 300, 'tips': 0, 'min_wage': 1600, 'tip_credit_max': 800}, [68800, 33600]), ('normal control', {'hours': 21, 'cash_rate': 500, 'tips': 46641, 'min_wage': 1200, 'tip_credit_max': 512}, [14448, 0]), ('normal control', {'hours': 27, 'cash_rate': 726, 'tips': 397, 'min_wage': 726, 'tip_credit_max': 300}, [19602, 0])], [('regression', {'hours': 47, 'cash_rate': 1650, 'tips': 42376, 'min_wage': 1600, 'tip_credit_max': 300}, [80800, 0]), ('regression', {'hours': 9, 'cash_rate': 1050, 'tips': 1770, 'min_wage': 1000, 'tip_credit_max': 800}, [9000, 0]), ('partial-repair probe', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('partial-repair probe', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('normal control', {'hours': 58, 'cash_rate': 300, 'tips': 43606, 'min_wage': 1200, 'tip_credit_max': 300}, [63000, 0]), ('normal control', {'hours': 52, 'cash_rate': 213, 'tips': 42918, 'min_wage': 1200, 'tip_credit_max': 300}, [54000, 0]), ('normal control', {'hours': 40, 'cash_rate': 1600, 'tips': 1562, 'min_wage': 1600, 'tip_credit_max': 300}, [64000, 0]), ('normal control', {'hours': 40, 'cash_rate': 213, 'tips': 0, 'min_wage': 1000, 'tip_credit_max': 300}, [40000, 12000])], [('regression', {'hours': 9, 'cash_rate': 1050, 'tips': 1770, 'min_wage': 1000, 'tip_credit_max': 800}, [9000, 0]), ('regression', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('partial-repair probe', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('partial-repair probe', {'hours': 57, 'cash_rate': 776, 'tips': 0, 'min_wage': 726, 'tip_credit_max': 300}, [47553, 0]), ('normal control', {'hours': 19, 'cash_rate': 300, 'tips': 3831, 'min_wage': 726, 'tip_credit_max': 512}, [9963, 4263]), ('normal control', {'hours': 56, 'cash_rate': 213, 'tips': 464, 'min_wage': 1000, 'tip_credit_max': 800}, [63536, 43608]), ('normal control', {'hours': 22, 'cash_rate': 1200, 'tips': 48563, 'min_wage': 1200, 'tip_credit_max': 300}, [26400, 0]), ('normal control', {'hours': 52, 'cash_rate': 300, 'tips': 13052, 'min_wage': 1000, 'tip_credit_max': 800}, [44948, 23348])], [('regression', {'hours': 37, 'cash_rate': 1050, 'tips': 1780, 'min_wage': 1000, 'tip_credit_max': 300}, [37000, 0]), ('regression', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('partial-repair probe', {'hours': 32, 'cash_rate': 776, 'tips': 13592, 'min_wage': 726, 'tip_credit_max': 800}, [23232, 0]), ('partial-repair probe', {'hours': 60, 'cash_rate': 776, 'tips': 36208, 'min_wage': 726, 'tip_credit_max': 512}, [50820, 0]), ('normal control', {'hours': 13, 'cash_rate': 300, 'tips': 3600, 'min_wage': 1600, 'tip_credit_max': 512}, [17200, 3056]), ('normal control', {'hours': 46, 'cash_rate': 213, 'tips': 3880, 'min_wage': 1200, 'tip_credit_max': 300}, [54920, 9920]), ('normal control', {'hours': 60, 'cash_rate': 300, 'tips': 25281, 'min_wage': 1200, 'tip_credit_max': 300}, [66000, 0]), ('normal control', {'hours': 15, 'cash_rate': 300, 'tips': 777, 'min_wage': 726, 'tip_credit_max': 800}, [10113, 5613])], [('regression', {'hours': 4, 'cash_rate': 1250, 'tips': 3576, 'min_wage': 1200, 'tip_credit_max': 300}, [4800, 0]), ('regression', {'hours': 57, 'cash_rate': 776, 'tips': 0, 'min_wage': 726, 'tip_credit_max': 300}, [47553, 0]), ('partial-repair probe', {'hours': 47, 'cash_rate': 1650, 'tips': 0, 'min_wage': 1600, 'tip_credit_max': 800}, [80800, 0]), ('partial-repair probe', {'hours': 35, 'cash_rate': 776, 'tips': 4941, 'min_wage': 726, 'tip_credit_max': 300}, [25410, 0]), ('normal control', {'hours': 12, 'cash_rate': 213, 'tips': 0, 'min_wage': 726, 'tip_credit_max': 512}, [8712, 6144]), ('normal control', {'hours': 43, 'cash_rate': 1600, 'tips': 32479, 'min_wage': 1600, 'tip_credit_max': 300}, [71200, 0]), ('normal control', {'hours': 36, 'cash_rate': 500, 'tips': 27434, 'min_wage': 1000, 'tip_credit_max': 300}, [25200, 0]), ('normal control', {'hours': 53, 'cash_rate': 300, 'tips': 45712, 'min_wage': 1600, 'tip_credit_max': 512}, [68064, 0])]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
check("%s %d" % (label, i), solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [16698, 0] | [16698, 0] | Passed |
| regression 1 | [80800, 0] | [80800, 0] | Passed |
| partial-repair probe 2 | [9000, 0] | [9000, 0] | Passed |
| partial-repair probe 3 | [37000, 0] | [37000, 0] | Passed |
| normal control 4 | [60600, 0] | [60600, 0] | Passed |
| normal control 5 | [68800, 33600] | [68800, 33600] | Passed |
| normal control 6 | [14448, 0] | [14448, 0] | Passed |
| normal control 7 | [19602, 0] | [19602, 0] | Passed |
SHA-256 / 972ad33171ae216e6ab5b99bad76248b2e3c00ecc2cc7d7f23893f71ff59ef2b
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:31.843061+00:00.
Case digest / 84f3a722efe804feba405bce6870f9014d877770655b8058b6056ab59c08c538