FA-59146 / Payroll withholding rules / Open access
W-4 exempt claim expiration: non-exempt claim handling · case 01
Employees who file a regular W-4 are withheld at the default rate, ignoring their form.
ROOT CAUSE
A non-exempt active claim falls back to single-default instead of using the form.
VERIFIED REPAIR
Restore the contract rule at the non-exempt claim handling step: use `if not active[1]: return 'per-form'`.
Unsuccessful approach: The attempt honors the form only when more than one claim exists, so a sole regular W-4 is still ignored.
Case contract
Input {claims: [[[y,m,d], exempt]], pay_date [y,m,d]}. The active claim is the latest-dated claim on or before the pay date (claims processed by date; equal dates keep input order, last wins). No claim -> 'single-default'. Non-exempt claim -> 'per-form'. Exempt claim is honored through February 15 of the year after it was filed, inclusive; afterwards 'single-default'.
Why this case matters
Exempt status must lapse on a fixed date, reverting to default withholding until a new form arrives.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
pay = tuple(x['pay_date'])
active = None
for date, exempt in sorted(x['claims'], key=lambda c: tuple(c[0])):
if tuple(date) <= pay:
active = (tuple(date), exempt)
if active is None:
return 'single-default'
if not active[1]:
return 'single-default'
expiry = (active[0][0] + 1, 2, 15)
return 'exempt' if pay <= expiry else 'single-default'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'claims': [[[2023, 2, 25], False]], 'pay_date': [2025, 12, 24]}, 'per-form'), ('regression', {'claims': [[[2022, 2, 13], True], [[2023, 3, 1], False], [[2022, 3, 22], False]], 'pay_date': [2024, 2, 27]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 11, 7], False]], 'pay_date': [2023, 9, 11]}, 'per-form'), ('normal control', {'claims': [[[2023, 9, 19], True], [[2023, 8, 5], True], [[2022, 3, 16], False]], 'pay_date': [2023, 9, 19]}, 'exempt'), ('normal control', {'claims': [], 'pay_date': [2025, 2, 4]}, 'single-default'), ('normal control', {'claims': [[[2022, 7, 27], False], [[2022, 1, 5], True], [[2022, 8, 16], True]], 'pay_date': [2024, 5, 27]}, 'single-default'), ('normal control', {'claims': [[[2023, 4, 5], True]], 'pay_date': [2024, 11, 6]}, 'single-default')], [('regression', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('regression', {'claims': [[[2023, 2, 25], False]], 'pay_date': [2025, 12, 24]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 11, 7], False]], 'pay_date': [2023, 9, 11]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 6, 25], False]], 'pay_date': [2024, 10, 5]}, 'per-form'), ('normal control', {'claims': [[[2023, 10, 8], True], [[2024, 3, 27], True]], 'pay_date': [2023, 10, 8]}, 'exempt'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 16]}, 'single-default'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 15]}, 'single-default'), ('normal control', {'claims': [[[2023, 2, 6], True]], 'pay_date': [2024, 2, 13]}, 'exempt')], [('regression', {'claims': [[[2022, 11, 7], False]], 'pay_date': [2023, 9, 11]}, 'per-form'), ('regression', {'claims': [[[2023, 7, 12], False], [[2023, 2, 5], False], [[2024, 5, 28], False]], 'pay_date': [2024, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 6, 10], False]], 'pay_date': [2024, 6, 10]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 1, 28], False]], 'pay_date': [2023, 2, 16]}, 'per-form'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 27]}, 'single-default'), ('normal control', {'claims': [[[2024, 6, 18], True], [[2024, 1, 24], True], [[2024, 8, 3], True]], 'pay_date': [2025, 2, 16]}, 'single-default'), ('normal control', {'claims': [[[2023, 9, 6], True], [[2023, 1, 17], False], [[2022, 11, 5], True]], 'pay_date': [2025, 2, 16]}, 'single-default'), ('normal control', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt')], [('regression', {'claims': [[[2024, 6, 25], False]], 'pay_date': [2024, 10, 5]}, 'per-form'), ('regression', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 5, 25], False]], 'pay_date': [2024, 5, 25]}, 'per-form'), ('partial-repair probe', {'claims': [[[2023, 6, 8], False]], 'pay_date': [2024, 2, 15]}, 'per-form'), ('normal control', {'claims': [[[2023, 10, 8], False], [[2024, 8, 1], False]], 'pay_date': [2023, 2, 16]}, 'single-default'), ('normal control', {'claims': [], 'pay_date': [2024, 7, 6]}, 'single-default'), ('normal control', {'claims': [[[2022, 7, 16], True], [[2024, 7, 18], True]], 'pay_date': [2025, 2, 15]}, 'exempt'), ('normal control', {'claims': [[[2022, 1, 12], True], [[2022, 3, 16], True]], 'pay_date': [2024, 5, 17]}, 'single-default')], [('regression', {'claims': [[[2024, 6, 10], False]], 'pay_date': [2024, 6, 10]}, 'per-form'), ('regression', {'claims': [[[2022, 1, 6], False], [[2024, 2, 7], False]], 'pay_date': [2024, 2, 12]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 4, 24], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 9, 19], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('normal control', {'claims': [[[2022, 3, 17], True]], 'pay_date': [2023, 2, 17]}, 'single-default'), ('normal control', {'claims': [[[2023, 4, 26], True], [[2022, 11, 26], False]], 'pay_date': [2023, 4, 26]}, 'exempt'), ('normal control', {'claims': [[[2024, 11, 25], False], [[2022, 6, 11], True], [[2024, 3, 25], True]], 'pay_date': [2024, 4, 3]}, 'exempt'), ('normal control', {'claims': [[[2024, 7, 26], True], [[2024, 2, 21], True]], 'pay_date': [2023, 2, 15]}, 'single-default')]]
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 | single-default | per-form | Failed |
| regression 1 | single-default | per-form | Failed |
| partial-repair probe 2 | single-default | per-form | Failed |
| partial-repair probe 3 | single-default | per-form | Failed |
| normal control 4 | exempt | exempt | Passed |
| normal control 5 | single-default | single-default | Passed |
| normal control 6 | single-default | single-default | Passed |
| normal control 7 | single-default | single-default | Passed |
SHA-256 / 0aa47a418a5a721c55e3fe4da152b75b42d999d2cea1890cc14b2148984780d1
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
pay = tuple(x['pay_date'])
active = None
for date, exempt in sorted(x['claims'], key=lambda c: tuple(c[0])):
if tuple(date) <= pay:
active = (tuple(date), exempt)
if active is None:
return 'single-default'
if not active[1] and len(x['claims']) > 1:
return 'per-form'
expiry = (active[0][0] + 1, 2, 15)
return 'exempt' if pay <= expiry else 'single-default'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'claims': [[[2023, 2, 25], False]], 'pay_date': [2025, 12, 24]}, 'per-form'), ('regression', {'claims': [[[2022, 2, 13], True], [[2023, 3, 1], False], [[2022, 3, 22], False]], 'pay_date': [2024, 2, 27]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 11, 7], False]], 'pay_date': [2023, 9, 11]}, 'per-form'), ('normal control', {'claims': [[[2023, 9, 19], True], [[2023, 8, 5], True], [[2022, 3, 16], False]], 'pay_date': [2023, 9, 19]}, 'exempt'), ('normal control', {'claims': [], 'pay_date': [2025, 2, 4]}, 'single-default'), ('normal control', {'claims': [[[2022, 7, 27], False], [[2022, 1, 5], True], [[2022, 8, 16], True]], 'pay_date': [2024, 5, 27]}, 'single-default'), ('normal control', {'claims': [[[2023, 4, 5], True]], 'pay_date': [2024, 11, 6]}, 'single-default')], [('regression', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('regression', {'claims': [[[2023, 2, 25], False]], 'pay_date': [2025, 12, 24]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 11, 7], False]], 'pay_date': [2023, 9, 11]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 6, 25], False]], 'pay_date': [2024, 10, 5]}, 'per-form'), ('normal control', {'claims': [[[2023, 10, 8], True], [[2024, 3, 27], True]], 'pay_date': [2023, 10, 8]}, 'exempt'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 16]}, 'single-default'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 15]}, 'single-default'), ('normal control', {'claims': [[[2023, 2, 6], True]], 'pay_date': [2024, 2, 13]}, 'exempt')], [('regression', {'claims': [[[2022, 11, 7], False]], 'pay_date': [2023, 9, 11]}, 'per-form'), ('regression', {'claims': [[[2023, 7, 12], False], [[2023, 2, 5], False], [[2024, 5, 28], False]], 'pay_date': [2024, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 6, 10], False]], 'pay_date': [2024, 6, 10]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 1, 28], False]], 'pay_date': [2023, 2, 16]}, 'per-form'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 27]}, 'single-default'), ('normal control', {'claims': [[[2024, 6, 18], True], [[2024, 1, 24], True], [[2024, 8, 3], True]], 'pay_date': [2025, 2, 16]}, 'single-default'), ('normal control', {'claims': [[[2023, 9, 6], True], [[2023, 1, 17], False], [[2022, 11, 5], True]], 'pay_date': [2025, 2, 16]}, 'single-default'), ('normal control', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt')], [('regression', {'claims': [[[2024, 6, 25], False]], 'pay_date': [2024, 10, 5]}, 'per-form'), ('regression', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 5, 25], False]], 'pay_date': [2024, 5, 25]}, 'per-form'), ('partial-repair probe', {'claims': [[[2023, 6, 8], False]], 'pay_date': [2024, 2, 15]}, 'per-form'), ('normal control', {'claims': [[[2023, 10, 8], False], [[2024, 8, 1], False]], 'pay_date': [2023, 2, 16]}, 'single-default'), ('normal control', {'claims': [], 'pay_date': [2024, 7, 6]}, 'single-default'), ('normal control', {'claims': [[[2022, 7, 16], True], [[2024, 7, 18], True]], 'pay_date': [2025, 2, 15]}, 'exempt'), ('normal control', {'claims': [[[2022, 1, 12], True], [[2022, 3, 16], True]], 'pay_date': [2024, 5, 17]}, 'single-default')], [('regression', {'claims': [[[2024, 6, 10], False]], 'pay_date': [2024, 6, 10]}, 'per-form'), ('regression', {'claims': [[[2022, 1, 6], False], [[2024, 2, 7], False]], 'pay_date': [2024, 2, 12]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 4, 24], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 9, 19], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('normal control', {'claims': [[[2022, 3, 17], True]], 'pay_date': [2023, 2, 17]}, 'single-default'), ('normal control', {'claims': [[[2023, 4, 26], True], [[2022, 11, 26], False]], 'pay_date': [2023, 4, 26]}, 'exempt'), ('normal control', {'claims': [[[2024, 11, 25], False], [[2022, 6, 11], True], [[2024, 3, 25], True]], 'pay_date': [2024, 4, 3]}, 'exempt'), ('normal control', {'claims': [[[2024, 7, 26], True], [[2024, 2, 21], True]], 'pay_date': [2023, 2, 15]}, 'single-default')]]
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 | single-default | per-form | Failed |
| regression 1 | per-form | per-form | Passed |
| partial-repair probe 2 | single-default | per-form | Failed |
| partial-repair probe 3 | single-default | per-form | Failed |
| normal control 4 | exempt | exempt | Passed |
| normal control 5 | single-default | single-default | Passed |
| normal control 6 | single-default | single-default | Passed |
| normal control 7 | single-default | single-default | Passed |
SHA-256 / 673b692f8fd21ae2fe63ac1179ce7941b2fabd85b83d60da40eb61771f5e1272
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
pay = tuple(x['pay_date'])
active = None
for date, exempt in sorted(x['claims'], key=lambda c: tuple(c[0])):
if tuple(date) <= pay:
active = (tuple(date), exempt)
if active is None:
return 'single-default'
if not active[1]:
return 'per-form'
expiry = (active[0][0] + 1, 2, 15)
return 'exempt' if pay <= expiry else 'single-default'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'claims': [[[2023, 2, 25], False]], 'pay_date': [2025, 12, 24]}, 'per-form'), ('regression', {'claims': [[[2022, 2, 13], True], [[2023, 3, 1], False], [[2022, 3, 22], False]], 'pay_date': [2024, 2, 27]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 11, 7], False]], 'pay_date': [2023, 9, 11]}, 'per-form'), ('normal control', {'claims': [[[2023, 9, 19], True], [[2023, 8, 5], True], [[2022, 3, 16], False]], 'pay_date': [2023, 9, 19]}, 'exempt'), ('normal control', {'claims': [], 'pay_date': [2025, 2, 4]}, 'single-default'), ('normal control', {'claims': [[[2022, 7, 27], False], [[2022, 1, 5], True], [[2022, 8, 16], True]], 'pay_date': [2024, 5, 27]}, 'single-default'), ('normal control', {'claims': [[[2023, 4, 5], True]], 'pay_date': [2024, 11, 6]}, 'single-default')], [('regression', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('regression', {'claims': [[[2023, 2, 25], False]], 'pay_date': [2025, 12, 24]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 11, 7], False]], 'pay_date': [2023, 9, 11]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 6, 25], False]], 'pay_date': [2024, 10, 5]}, 'per-form'), ('normal control', {'claims': [[[2023, 10, 8], True], [[2024, 3, 27], True]], 'pay_date': [2023, 10, 8]}, 'exempt'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 16]}, 'single-default'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 15]}, 'single-default'), ('normal control', {'claims': [[[2023, 2, 6], True]], 'pay_date': [2024, 2, 13]}, 'exempt')], [('regression', {'claims': [[[2022, 11, 7], False]], 'pay_date': [2023, 9, 11]}, 'per-form'), ('regression', {'claims': [[[2023, 7, 12], False], [[2023, 2, 5], False], [[2024, 5, 28], False]], 'pay_date': [2024, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 6, 10], False]], 'pay_date': [2024, 6, 10]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 1, 28], False]], 'pay_date': [2023, 2, 16]}, 'per-form'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 27]}, 'single-default'), ('normal control', {'claims': [[[2024, 6, 18], True], [[2024, 1, 24], True], [[2024, 8, 3], True]], 'pay_date': [2025, 2, 16]}, 'single-default'), ('normal control', {'claims': [[[2023, 9, 6], True], [[2023, 1, 17], False], [[2022, 11, 5], True]], 'pay_date': [2025, 2, 16]}, 'single-default'), ('normal control', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt')], [('regression', {'claims': [[[2024, 6, 25], False]], 'pay_date': [2024, 10, 5]}, 'per-form'), ('regression', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 5, 25], False]], 'pay_date': [2024, 5, 25]}, 'per-form'), ('partial-repair probe', {'claims': [[[2023, 6, 8], False]], 'pay_date': [2024, 2, 15]}, 'per-form'), ('normal control', {'claims': [[[2023, 10, 8], False], [[2024, 8, 1], False]], 'pay_date': [2023, 2, 16]}, 'single-default'), ('normal control', {'claims': [], 'pay_date': [2024, 7, 6]}, 'single-default'), ('normal control', {'claims': [[[2022, 7, 16], True], [[2024, 7, 18], True]], 'pay_date': [2025, 2, 15]}, 'exempt'), ('normal control', {'claims': [[[2022, 1, 12], True], [[2022, 3, 16], True]], 'pay_date': [2024, 5, 17]}, 'single-default')], [('regression', {'claims': [[[2024, 6, 10], False]], 'pay_date': [2024, 6, 10]}, 'per-form'), ('regression', {'claims': [[[2022, 1, 6], False], [[2024, 2, 7], False]], 'pay_date': [2024, 2, 12]}, 'per-form'), ('partial-repair probe', {'claims': [[[2022, 4, 24], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('partial-repair probe', {'claims': [[[2024, 9, 19], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('normal control', {'claims': [[[2022, 3, 17], True]], 'pay_date': [2023, 2, 17]}, 'single-default'), ('normal control', {'claims': [[[2023, 4, 26], True], [[2022, 11, 26], False]], 'pay_date': [2023, 4, 26]}, 'exempt'), ('normal control', {'claims': [[[2024, 11, 25], False], [[2022, 6, 11], True], [[2024, 3, 25], True]], 'pay_date': [2024, 4, 3]}, 'exempt'), ('normal control', {'claims': [[[2024, 7, 26], True], [[2024, 2, 21], True]], 'pay_date': [2023, 2, 15]}, 'single-default')]]
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 | per-form | per-form | Passed |
| regression 1 | per-form | per-form | Passed |
| partial-repair probe 2 | per-form | per-form | Passed |
| partial-repair probe 3 | per-form | per-form | Passed |
| normal control 4 | exempt | exempt | Passed |
| normal control 5 | single-default | single-default | Passed |
| normal control 6 | single-default | single-default | Passed |
| normal control 7 | single-default | single-default | Passed |
SHA-256 / 7eaca3a044cbd71b271cec9fea01f4a11ba0cb749e29ef66214961b84ff8aa60
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.485873+00:00.
Case digest / 0d3445afa498e3a79564c6ae6522ec5081b278766b7cc6e33cc6322818bf6f81