FA-59166 / Payroll withholding rules / Open access
Applicable minimum wage and youth rate: most protective rate · case 01
Employees in cities with a minimum wage below the state rate are underpaid.
ROOT CAUSE
The most specific jurisdiction wins instead of the highest rate.
VERIFIED REPAIR
Restore the contract rule at the most protective rate step: use `applicable = max(rates)`.
Unsuccessful approach: The attempt takes the maximum but ignores local minimum wages.
Case contract
Input {federal, state|None, local|None, age, days_employed, hours, paid}. Applicable rate is the highest of the defined federal, state and local minimums. A youth rate of 4.25 may replace it when age < 20, days_employed <= 90 and neither a state nor local minimum is defined. Return [rate, max(0, hours*rate - paid)].
Why this case matters
Payroll must pay the most protective minimum wage, and the youth rate exception is narrow.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
rates = [x['federal']] + [r for r in (x['state'], x['local']) if r is not None]
applicable = rates[-1]
if x['age'] < 20 and x['days_employed'] <= 90 and x['state'] is None and x['local'] is None:
applicable = min(applicable, 425)
return [applicable, max(0, x['hours'] * applicable - x['paid'])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'federal': 725, 'state': 1500, 'local': 900, 'age': 19, 'days_employed': 200, 'hours': 32, 'paid': 60214}, [1500, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 17, 'days_employed': 200, 'hours': 12, 'paid': 62529}, [1500, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 21, 'days_employed': 10, 'hours': 36, 'paid': 32014}, [900, 386]), ('partial-repair probe', {'federal': 725, 'state': 700, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 42, 'paid': 43650}, [900, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 17, 'days_employed': 10, 'hours': 44, 'paid': 52557}, [1500, 13443]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 19, 'days_employed': 200, 'hours': 49, 'paid': 66535}, [725, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 19, 'days_employed': 91, 'hours': 13, 'paid': 52409}, [1500, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 91, 'hours': 3, 'paid': 73893}, [1500, 0])], [('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 17, 'days_employed': 200, 'hours': 12, 'paid': 62529}, [1500, 0]), ('regression', {'federal': 725, 'state': 700, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 55516}, [725, 0]), ('partial-repair probe', {'federal': 725, 'state': 700, 'local': 1400, 'age': 20, 'days_employed': 119, 'hours': 50, 'paid': 49362}, [1400, 20638]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 21, 'days_employed': 200, 'hours': 31, 'paid': 26649}, [1700, 26051]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 35, 'days_employed': 91, 'hours': 1, 'paid': 31574}, [1500, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 89, 'hours': 20, 'paid': 19880}, [1500, 10120]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 19, 'days_employed': 100, 'hours': 21, 'paid': 76399}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 20, 'days_employed': 91, 'hours': 50, 'paid': 25834}, [725, 10416])], [('regression', {'federal': 725, 'state': 700, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 55516}, [725, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 19, 'days_employed': 90, 'hours': 35, 'paid': 10142}, [1500, 42358]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 44, 'paid': 29457}, [900, 10143]), ('partial-repair probe', {'federal': 725, 'state': 800, 'local': 1400, 'age': 21, 'days_employed': 89, 'hours': 42, 'paid': 70854}, [1400, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 12908}, [800, 7092]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 90, 'hours': 7, 'paid': 37819}, [1500, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 21, 'days_employed': 200, 'hours': 28, 'paid': 34186}, [800, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 20, 'days_employed': 119, 'hours': 21, 'paid': 78346}, [1500, 0])], [('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 19, 'days_employed': 90, 'hours': 35, 'paid': 10142}, [1500, 42358]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 21, 'days_employed': 100, 'hours': 38, 'paid': 59758}, [1500, 0]), ('partial-repair probe', {'federal': 725, 'state': 800, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 27, 'paid': 8188}, [900, 16112]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 200, 'hours': 2, 'paid': 39319}, [900, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 21, 'days_employed': 90, 'hours': 39, 'paid': 35117}, [800, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 19, 'days_employed': 90, 'hours': 23, 'paid': 23235}, [425, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 19, 'days_employed': 100, 'hours': 13, 'paid': 71642}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 21, 'days_employed': 200, 'hours': 0, 'paid': 36583}, [725, 0])], [('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 21, 'days_employed': 100, 'hours': 38, 'paid': 59758}, [1500, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 20, 'days_employed': 89, 'hours': 13, 'paid': 20235}, [1500, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('partial-repair probe', {'federal': 725, 'state': 800, 'local': 1700, 'age': 17, 'days_employed': 119, 'hours': 36, 'paid': 42057}, [1700, 19143]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 20, 'days_employed': 119, 'hours': 16, 'paid': 1656}, [1500, 22344]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 26, 'paid': 4444}, [1500, 34556]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 20, 'days_employed': 89, 'hours': 38, 'paid': 44401}, [1500, 12599]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 20, 'days_employed': 200, 'hours': 12, 'paid': 33515}, [800, 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 | [900, 0] | [1500, 0] | Failed |
| regression 1 | [1400, 0] | [1500, 0] | Failed |
| partial-repair probe 2 | [900, 386] | [900, 386] | Passed |
| partial-repair probe 3 | [900, 0] | [900, 0] | Passed |
| normal control 4 | [1500, 13443] | [1500, 13443] | Passed |
| normal control 5 | [725, 0] | [725, 0] | Passed |
| normal control 6 | [1500, 0] | [1500, 0] | Passed |
| normal control 7 | [1500, 0] | [1500, 0] | Passed |
SHA-256 / 12bea8512453b48bdc6f759d15323e8988bf1cb7a1f37e464b253cde73fcc79a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
rates = [x['federal']] + [r for r in (x['state'], x['local']) if r is not None]
applicable = max(x['federal'], x['state'] or 0)
if x['age'] < 20 and x['days_employed'] <= 90 and x['state'] is None and x['local'] is None:
applicable = min(applicable, 425)
return [applicable, max(0, x['hours'] * applicable - x['paid'])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'federal': 725, 'state': 1500, 'local': 900, 'age': 19, 'days_employed': 200, 'hours': 32, 'paid': 60214}, [1500, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 17, 'days_employed': 200, 'hours': 12, 'paid': 62529}, [1500, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 21, 'days_employed': 10, 'hours': 36, 'paid': 32014}, [900, 386]), ('partial-repair probe', {'federal': 725, 'state': 700, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 42, 'paid': 43650}, [900, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 17, 'days_employed': 10, 'hours': 44, 'paid': 52557}, [1500, 13443]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 19, 'days_employed': 200, 'hours': 49, 'paid': 66535}, [725, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 19, 'days_employed': 91, 'hours': 13, 'paid': 52409}, [1500, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 91, 'hours': 3, 'paid': 73893}, [1500, 0])], [('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 17, 'days_employed': 200, 'hours': 12, 'paid': 62529}, [1500, 0]), ('regression', {'federal': 725, 'state': 700, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 55516}, [725, 0]), ('partial-repair probe', {'federal': 725, 'state': 700, 'local': 1400, 'age': 20, 'days_employed': 119, 'hours': 50, 'paid': 49362}, [1400, 20638]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 21, 'days_employed': 200, 'hours': 31, 'paid': 26649}, [1700, 26051]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 35, 'days_employed': 91, 'hours': 1, 'paid': 31574}, [1500, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 89, 'hours': 20, 'paid': 19880}, [1500, 10120]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 19, 'days_employed': 100, 'hours': 21, 'paid': 76399}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 20, 'days_employed': 91, 'hours': 50, 'paid': 25834}, [725, 10416])], [('regression', {'federal': 725, 'state': 700, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 55516}, [725, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 19, 'days_employed': 90, 'hours': 35, 'paid': 10142}, [1500, 42358]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 44, 'paid': 29457}, [900, 10143]), ('partial-repair probe', {'federal': 725, 'state': 800, 'local': 1400, 'age': 21, 'days_employed': 89, 'hours': 42, 'paid': 70854}, [1400, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 12908}, [800, 7092]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 90, 'hours': 7, 'paid': 37819}, [1500, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 21, 'days_employed': 200, 'hours': 28, 'paid': 34186}, [800, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 20, 'days_employed': 119, 'hours': 21, 'paid': 78346}, [1500, 0])], [('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 19, 'days_employed': 90, 'hours': 35, 'paid': 10142}, [1500, 42358]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 21, 'days_employed': 100, 'hours': 38, 'paid': 59758}, [1500, 0]), ('partial-repair probe', {'federal': 725, 'state': 800, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 27, 'paid': 8188}, [900, 16112]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 200, 'hours': 2, 'paid': 39319}, [900, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 21, 'days_employed': 90, 'hours': 39, 'paid': 35117}, [800, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 19, 'days_employed': 90, 'hours': 23, 'paid': 23235}, [425, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 19, 'days_employed': 100, 'hours': 13, 'paid': 71642}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 21, 'days_employed': 200, 'hours': 0, 'paid': 36583}, [725, 0])], [('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 21, 'days_employed': 100, 'hours': 38, 'paid': 59758}, [1500, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 20, 'days_employed': 89, 'hours': 13, 'paid': 20235}, [1500, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('partial-repair probe', {'federal': 725, 'state': 800, 'local': 1700, 'age': 17, 'days_employed': 119, 'hours': 36, 'paid': 42057}, [1700, 19143]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 20, 'days_employed': 119, 'hours': 16, 'paid': 1656}, [1500, 22344]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 26, 'paid': 4444}, [1500, 34556]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 20, 'days_employed': 89, 'hours': 38, 'paid': 44401}, [1500, 12599]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 20, 'days_employed': 200, 'hours': 12, 'paid': 33515}, [800, 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 | [1500, 0] | [1500, 0] | Passed |
| regression 1 | [1500, 0] | [1500, 0] | Passed |
| partial-repair probe 2 | [725, 0] | [900, 386] | Failed |
| partial-repair probe 3 | [725, 0] | [900, 0] | Failed |
| normal control 4 | [1500, 13443] | [1500, 13443] | Passed |
| normal control 5 | [725, 0] | [725, 0] | Passed |
| normal control 6 | [1500, 0] | [1500, 0] | Passed |
| normal control 7 | [1500, 0] | [1500, 0] | Passed |
SHA-256 / 7b670d711fbc5d936b1d2e7962478253fcc800a0d0bcc1e5d885b450bb6c3764
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
rates = [x['federal']] + [r for r in (x['state'], x['local']) if r is not None]
applicable = max(rates)
if x['age'] < 20 and x['days_employed'] <= 90 and x['state'] is None and x['local'] is None:
applicable = min(applicable, 425)
return [applicable, max(0, x['hours'] * applicable - x['paid'])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'federal': 725, 'state': 1500, 'local': 900, 'age': 19, 'days_employed': 200, 'hours': 32, 'paid': 60214}, [1500, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 17, 'days_employed': 200, 'hours': 12, 'paid': 62529}, [1500, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 21, 'days_employed': 10, 'hours': 36, 'paid': 32014}, [900, 386]), ('partial-repair probe', {'federal': 725, 'state': 700, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 42, 'paid': 43650}, [900, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 17, 'days_employed': 10, 'hours': 44, 'paid': 52557}, [1500, 13443]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 19, 'days_employed': 200, 'hours': 49, 'paid': 66535}, [725, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 19, 'days_employed': 91, 'hours': 13, 'paid': 52409}, [1500, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 91, 'hours': 3, 'paid': 73893}, [1500, 0])], [('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 17, 'days_employed': 200, 'hours': 12, 'paid': 62529}, [1500, 0]), ('regression', {'federal': 725, 'state': 700, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 55516}, [725, 0]), ('partial-repair probe', {'federal': 725, 'state': 700, 'local': 1400, 'age': 20, 'days_employed': 119, 'hours': 50, 'paid': 49362}, [1400, 20638]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 21, 'days_employed': 200, 'hours': 31, 'paid': 26649}, [1700, 26051]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 35, 'days_employed': 91, 'hours': 1, 'paid': 31574}, [1500, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 89, 'hours': 20, 'paid': 19880}, [1500, 10120]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 19, 'days_employed': 100, 'hours': 21, 'paid': 76399}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 20, 'days_employed': 91, 'hours': 50, 'paid': 25834}, [725, 10416])], [('regression', {'federal': 725, 'state': 700, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 55516}, [725, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 19, 'days_employed': 90, 'hours': 35, 'paid': 10142}, [1500, 42358]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 44, 'paid': 29457}, [900, 10143]), ('partial-repair probe', {'federal': 725, 'state': 800, 'local': 1400, 'age': 21, 'days_employed': 89, 'hours': 42, 'paid': 70854}, [1400, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 12908}, [800, 7092]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 90, 'hours': 7, 'paid': 37819}, [1500, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 21, 'days_employed': 200, 'hours': 28, 'paid': 34186}, [800, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 20, 'days_employed': 119, 'hours': 21, 'paid': 78346}, [1500, 0])], [('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 19, 'days_employed': 90, 'hours': 35, 'paid': 10142}, [1500, 42358]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 21, 'days_employed': 100, 'hours': 38, 'paid': 59758}, [1500, 0]), ('partial-repair probe', {'federal': 725, 'state': 800, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 27, 'paid': 8188}, [900, 16112]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 200, 'hours': 2, 'paid': 39319}, [900, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 21, 'days_employed': 90, 'hours': 39, 'paid': 35117}, [800, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 19, 'days_employed': 90, 'hours': 23, 'paid': 23235}, [425, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 19, 'days_employed': 100, 'hours': 13, 'paid': 71642}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 21, 'days_employed': 200, 'hours': 0, 'paid': 36583}, [725, 0])], [('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 21, 'days_employed': 100, 'hours': 38, 'paid': 59758}, [1500, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 20, 'days_employed': 89, 'hours': 13, 'paid': 20235}, [1500, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('partial-repair probe', {'federal': 725, 'state': 800, 'local': 1700, 'age': 17, 'days_employed': 119, 'hours': 36, 'paid': 42057}, [1700, 19143]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 20, 'days_employed': 119, 'hours': 16, 'paid': 1656}, [1500, 22344]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 26, 'paid': 4444}, [1500, 34556]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 20, 'days_employed': 89, 'hours': 38, 'paid': 44401}, [1500, 12599]), ('normal control', {'federal': 725, 'state': 800, 'local': None, 'age': 20, 'days_employed': 200, 'hours': 12, 'paid': 33515}, [800, 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 | [1500, 0] | [1500, 0] | Passed |
| regression 1 | [1500, 0] | [1500, 0] | Passed |
| partial-repair probe 2 | [900, 386] | [900, 386] | Passed |
| partial-repair probe 3 | [900, 0] | [900, 0] | Passed |
| normal control 4 | [1500, 13443] | [1500, 13443] | Passed |
| normal control 5 | [725, 0] | [725, 0] | Passed |
| normal control 6 | [1500, 0] | [1500, 0] | Passed |
| normal control 7 | [1500, 0] | [1500, 0] | Passed |
SHA-256 / 414f76dcfb8955767bfb4b9e0c16069c6f44e44915d55638d34ac7271408a834
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.622958+00:00.
Case digest / c678b649ad4fe462d3e1f448e5c2f4316ce01b41b6397860a4ae85de59bb8deb