FA-59176 / Payroll withholding rules / Open access
Applicable minimum wage and youth rate: youth rate preemption · case 01
Young workers in states with their own minimum wage are paid the youth rate.
ROOT CAUSE
The youth rate is applied without checking whether a state or local minimum exists.
VERIFIED REPAIR
Restore the contract rule at the youth rate preemption step: use `and x['state'] is None and x['local'] is None`.
Unsuccessful approach: The attempt checks for a state minimum but still applies the youth rate under local ordinances.
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 = max(rates)
if x['age'] < 20 and x['days_employed'] <= 90 :
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': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': None, 'age': 17, 'days_employed': 10, 'hours': 44, 'paid': 52557}, [1500, 13443]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 17, 'days_employed': 90, 'hours': 18, 'paid': 17771}, [1700, 12829]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 1, 'paid': 51150}, [900, 0]), ('normal control', {'federal': 725, 'state': None, 'local': 900, 'age': 21, 'days_employed': 10, 'hours': 36, 'paid': 32014}, [900, 386]), ('normal control', {'federal': 725, 'state': 1500, 'local': 900, 'age': 19, 'days_employed': 200, 'hours': 32, 'paid': 60214}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 19, 'days_employed': 200, 'hours': 49, 'paid': 66535}, [725, 0]), ('normal control', {'federal': 725, 'state': 700, 'local': 1400, 'age': 20, 'days_employed': 119, 'hours': 50, 'paid': 49362}, [1400, 20638])], [('regression', {'federal': 725, 'state': None, 'local': 1700, 'age': 17, 'days_employed': 90, 'hours': 18, 'paid': 17771}, [1700, 12829]), ('regression', {'federal': 725, 'state': 700, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 42, 'paid': 43650}, [900, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 1, 'paid': 51150}, [900, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 89, 'hours': 27, 'paid': 71203}, [1400, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 17, 'days_employed': 200, 'hours': 12, 'paid': 62529}, [1500, 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': None, 'local': 1700, 'age': 21, 'days_employed': 200, 'hours': 31, 'paid': 26649}, [1700, 26051]), ('normal control', {'federal': 725, 'state': 700, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 55516}, [725, 0])], [('regression', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 1, 'paid': 51150}, [900, 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': 17, 'days_employed': 10, 'hours': 4, 'paid': 8906}, [900, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 17, 'days_employed': 89, 'hours': 9, 'paid': 34655}, [1700, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 91, 'hours': 3, 'paid': 73893}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 44, 'paid': 29457}, [900, 10143]), ('normal control', {'federal': 725, 'state': 800, 'local': 1400, 'age': 21, 'days_employed': 89, 'hours': 42, 'paid': 70854}, [1400, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 27, 'paid': 8188}, [900, 16112])], [('regression', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 89, 'hours': 27, 'paid': 71203}, [1400, 0]), ('regression', {'federal': 725, 'state': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 90, 'hours': 17, 'paid': 63085}, [1400, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 90, 'hours': 37, 'paid': 49772}, [1400, 2028]), ('normal control', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 200, 'hours': 2, 'paid': 39319}, [900, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 21, 'days_employed': 100, 'hours': 38, 'paid': 59758}, [1500, 0]), ('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])], [('regression', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 10, 'hours': 4, 'paid': 8906}, [900, 0]), ('regression', {'federal': 725, 'state': 800, 'local': 1700, 'age': 19, 'days_employed': 10, 'hours': 35, 'paid': 45995}, [1700, 13505]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 19, 'days_employed': 89, 'hours': 11, 'paid': 62799}, [1400, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 20, 'days_employed': 89, 'hours': 13, 'paid': 20235}, [1500, 0]), ('normal control', {'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': 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])]]
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 | [425, 0] | [1700, 0] | Failed |
| regression 1 | [425, 0] | [1500, 13443] | Failed |
| partial-repair probe 2 | [425, 0] | [1700, 12829] | Failed |
| partial-repair probe 3 | [425, 0] | [900, 0] | Failed |
| normal control 4 | [900, 386] | [900, 386] | Passed |
| normal control 5 | [1500, 0] | [1500, 0] | Passed |
| normal control 6 | [725, 0] | [725, 0] | Passed |
| normal control 7 | [1400, 20638] | [1400, 20638] | Passed |
SHA-256 / e07c60244cd936ca89c900e64df8ca6f7a932012fe54d5d65d2d858ba2450c91
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(rates)
if x['age'] < 20 and x['days_employed'] <= 90 and x['state'] 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': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': None, 'age': 17, 'days_employed': 10, 'hours': 44, 'paid': 52557}, [1500, 13443]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 17, 'days_employed': 90, 'hours': 18, 'paid': 17771}, [1700, 12829]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 1, 'paid': 51150}, [900, 0]), ('normal control', {'federal': 725, 'state': None, 'local': 900, 'age': 21, 'days_employed': 10, 'hours': 36, 'paid': 32014}, [900, 386]), ('normal control', {'federal': 725, 'state': 1500, 'local': 900, 'age': 19, 'days_employed': 200, 'hours': 32, 'paid': 60214}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 19, 'days_employed': 200, 'hours': 49, 'paid': 66535}, [725, 0]), ('normal control', {'federal': 725, 'state': 700, 'local': 1400, 'age': 20, 'days_employed': 119, 'hours': 50, 'paid': 49362}, [1400, 20638])], [('regression', {'federal': 725, 'state': None, 'local': 1700, 'age': 17, 'days_employed': 90, 'hours': 18, 'paid': 17771}, [1700, 12829]), ('regression', {'federal': 725, 'state': 700, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 42, 'paid': 43650}, [900, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 1, 'paid': 51150}, [900, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 89, 'hours': 27, 'paid': 71203}, [1400, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 17, 'days_employed': 200, 'hours': 12, 'paid': 62529}, [1500, 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': None, 'local': 1700, 'age': 21, 'days_employed': 200, 'hours': 31, 'paid': 26649}, [1700, 26051]), ('normal control', {'federal': 725, 'state': 700, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 55516}, [725, 0])], [('regression', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 1, 'paid': 51150}, [900, 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': 17, 'days_employed': 10, 'hours': 4, 'paid': 8906}, [900, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 17, 'days_employed': 89, 'hours': 9, 'paid': 34655}, [1700, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 91, 'hours': 3, 'paid': 73893}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 44, 'paid': 29457}, [900, 10143]), ('normal control', {'federal': 725, 'state': 800, 'local': 1400, 'age': 21, 'days_employed': 89, 'hours': 42, 'paid': 70854}, [1400, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 27, 'paid': 8188}, [900, 16112])], [('regression', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 89, 'hours': 27, 'paid': 71203}, [1400, 0]), ('regression', {'federal': 725, 'state': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 90, 'hours': 17, 'paid': 63085}, [1400, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 90, 'hours': 37, 'paid': 49772}, [1400, 2028]), ('normal control', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 200, 'hours': 2, 'paid': 39319}, [900, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 21, 'days_employed': 100, 'hours': 38, 'paid': 59758}, [1500, 0]), ('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])], [('regression', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 10, 'hours': 4, 'paid': 8906}, [900, 0]), ('regression', {'federal': 725, 'state': 800, 'local': 1700, 'age': 19, 'days_employed': 10, 'hours': 35, 'paid': 45995}, [1700, 13505]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 19, 'days_employed': 89, 'hours': 11, 'paid': 62799}, [1400, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 20, 'days_employed': 89, 'hours': 13, 'paid': 20235}, [1500, 0]), ('normal control', {'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': 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])]]
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 | [425, 0] | [1700, 0] | Failed |
| regression 1 | [1500, 13443] | [1500, 13443] | Passed |
| partial-repair probe 2 | [425, 0] | [1700, 12829] | Failed |
| partial-repair probe 3 | [425, 0] | [900, 0] | Failed |
| normal control 4 | [900, 386] | [900, 386] | Passed |
| normal control 5 | [1500, 0] | [1500, 0] | Passed |
| normal control 6 | [725, 0] | [725, 0] | Passed |
| normal control 7 | [1400, 20638] | [1400, 20638] | Passed |
SHA-256 / ed39766e5c42fd6ba4104dc4fc30241c30ad21c4c236e4169d29d23f89093080
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': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('regression', {'federal': 725, 'state': 1500, 'local': None, 'age': 17, 'days_employed': 10, 'hours': 44, 'paid': 52557}, [1500, 13443]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 17, 'days_employed': 90, 'hours': 18, 'paid': 17771}, [1700, 12829]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 1, 'paid': 51150}, [900, 0]), ('normal control', {'federal': 725, 'state': None, 'local': 900, 'age': 21, 'days_employed': 10, 'hours': 36, 'paid': 32014}, [900, 386]), ('normal control', {'federal': 725, 'state': 1500, 'local': 900, 'age': 19, 'days_employed': 200, 'hours': 32, 'paid': 60214}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': None, 'age': 19, 'days_employed': 200, 'hours': 49, 'paid': 66535}, [725, 0]), ('normal control', {'federal': 725, 'state': 700, 'local': 1400, 'age': 20, 'days_employed': 119, 'hours': 50, 'paid': 49362}, [1400, 20638])], [('regression', {'federal': 725, 'state': None, 'local': 1700, 'age': 17, 'days_employed': 90, 'hours': 18, 'paid': 17771}, [1700, 12829]), ('regression', {'federal': 725, 'state': 700, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 42, 'paid': 43650}, [900, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 1, 'paid': 51150}, [900, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 89, 'hours': 27, 'paid': 71203}, [1400, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 17, 'days_employed': 200, 'hours': 12, 'paid': 62529}, [1500, 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': None, 'local': 1700, 'age': 21, 'days_employed': 200, 'hours': 31, 'paid': 26649}, [1700, 26051]), ('normal control', {'federal': 725, 'state': 700, 'local': None, 'age': 35, 'days_employed': 200, 'hours': 25, 'paid': 55516}, [725, 0])], [('regression', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 90, 'hours': 1, 'paid': 51150}, [900, 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': 17, 'days_employed': 10, 'hours': 4, 'paid': 8906}, [900, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 17, 'days_employed': 89, 'hours': 9, 'paid': 34655}, [1700, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': None, 'age': 21, 'days_employed': 91, 'hours': 3, 'paid': 73893}, [1500, 0]), ('normal control', {'federal': 725, 'state': None, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 44, 'paid': 29457}, [900, 10143]), ('normal control', {'federal': 725, 'state': 800, 'local': 1400, 'age': 21, 'days_employed': 89, 'hours': 42, 'paid': 70854}, [1400, 0]), ('normal control', {'federal': 725, 'state': 800, 'local': 900, 'age': 35, 'days_employed': 10, 'hours': 27, 'paid': 8188}, [900, 16112])], [('regression', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 89, 'hours': 27, 'paid': 71203}, [1400, 0]), ('regression', {'federal': 725, 'state': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 90, 'hours': 17, 'paid': 63085}, [1400, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 17, 'days_employed': 90, 'hours': 37, 'paid': 49772}, [1400, 2028]), ('normal control', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 200, 'hours': 2, 'paid': 39319}, [900, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 21, 'days_employed': 100, 'hours': 38, 'paid': 59758}, [1500, 0]), ('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])], [('regression', {'federal': 725, 'state': None, 'local': 900, 'age': 17, 'days_employed': 10, 'hours': 4, 'paid': 8906}, [900, 0]), ('regression', {'federal': 725, 'state': 800, 'local': 1700, 'age': 19, 'days_employed': 10, 'hours': 35, 'paid': 45995}, [1700, 13505]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1400, 'age': 19, 'days_employed': 89, 'hours': 11, 'paid': 62799}, [1400, 0]), ('partial-repair probe', {'federal': 725, 'state': None, 'local': 1700, 'age': 19, 'days_employed': 90, 'hours': 1, 'paid': 33812}, [1700, 0]), ('normal control', {'federal': 725, 'state': 1500, 'local': 1400, 'age': 20, 'days_employed': 89, 'hours': 13, 'paid': 20235}, [1500, 0]), ('normal control', {'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': 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])]]
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 | [1700, 0] | [1700, 0] | Passed |
| regression 1 | [1500, 13443] | [1500, 13443] | Passed |
| partial-repair probe 2 | [1700, 12829] | [1700, 12829] | Passed |
| partial-repair probe 3 | [900, 0] | [900, 0] | Passed |
| normal control 4 | [900, 386] | [900, 386] | Passed |
| normal control 5 | [1500, 0] | [1500, 0] | Passed |
| normal control 6 | [725, 0] | [725, 0] | Passed |
| normal control 7 | [1400, 20638] | [1400, 20638] | Passed |
SHA-256 / 904a2c75bf665fef7b93e1aacd1f72e1f0964ba79bf8ada3fe5d91cc6988e967
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.805182+00:00.
Case digest / 3f18a8513ccdd7eb2c54c40b8a9f0f0652ab2d43063dde234c77dae312029c21