FA-59126 / Payroll withholding rules / Open access
W-4 exempt claim expiration: expiry year · case 01
Exempt forms filed after mid-February expire immediately.
ROOT CAUSE
The expiry date is set in the filing year instead of the following year.
THE FAILURE
The expiry date is set in the filing year instead of the following year.
Unsuccessful approach: The attempt anchors expiry to the pay-date year, so an old exempt form revives every January.
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 'per-form'
expiry = (active[0][0], 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, 9, 19], True], [[2023, 8, 5], True], [[2022, 3, 16], False]], 'pay_date': [2023, 9, 19]}, 'exempt'), ('regression', {'claims': [[[2023, 10, 8], True], [[2024, 3, 27], True]], 'pay_date': [2023, 10, 8]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt'), ('partial-repair probe', {'claims': [[[2023, 4, 26], True], [[2022, 11, 26], False]], 'pay_date': [2023, 4, 26]}, 'exempt'), ('normal control', {'claims': [[[2022, 2, 13], True], [[2023, 3, 1], False], [[2022, 3, 22], False]], 'pay_date': [2024, 2, 27]}, 'per-form'), ('normal control', {'claims': [[[2023, 2, 25], False]], 'pay_date': [2025, 12, 24]}, 'per-form'), ('normal control', {'claims': [], 'pay_date': [2025, 2, 4]}, 'single-default'), ('normal control', {'claims': [[[2023, 7, 12], False], [[2023, 2, 5], False], [[2024, 5, 28], False]], 'pay_date': [2024, 2, 16]}, 'per-form')], [('regression', {'claims': [[[2023, 10, 8], True], [[2024, 3, 27], True]], 'pay_date': [2023, 10, 8]}, 'exempt'), ('regression', {'claims': [[[2023, 2, 6], True]], 'pay_date': [2024, 2, 13]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt'), ('partial-repair probe', {'claims': [[[2023, 4, 26], True], [[2022, 11, 26], False]], 'pay_date': [2023, 4, 26]}, 'exempt'), ('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'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 16]}, 'single-default'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 15]}, 'single-default')], [('regression', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt'), ('regression', {'claims': [[[2023, 2, 6], True]], 'pay_date': [2024, 2, 13]}, 'exempt'), ('partial-repair probe', {'claims': [[[2024, 11, 25], False], [[2022, 6, 11], True], [[2024, 3, 25], True]], 'pay_date': [2024, 4, 3]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 10, 24], True], [[2022, 6, 19], True], [[2023, 1, 23], False]], 'pay_date': [2022, 10, 24]}, 'exempt'), ('normal control', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('normal control', {'claims': [[[2022, 1, 6], False], [[2024, 2, 7], False]], 'pay_date': [2024, 2, 12]}, 'per-form'), ('normal control', {'claims': [[[2023, 4, 9], False], [[2024, 8, 26], False], [[2022, 5, 3], False]], 'pay_date': [2024, 7, 21]}, 'per-form'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 27]}, 'single-default')], [('regression', {'claims': [[[2023, 4, 26], True], [[2022, 11, 26], False]], 'pay_date': [2023, 4, 26]}, 'exempt'), ('regression', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt'), ('partial-repair probe', {'claims': [[[2023, 2, 17], True], [[2024, 9, 16], False]], 'pay_date': [2023, 2, 17]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 3, 20], True]], 'pay_date': [2025, 2, 15]}, '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, 14], False], [[2024, 8, 7], True], [[2024, 1, 1], True]], 'pay_date': [2023, 9, 14]}, 'per-form'), ('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': [[[2023, 10, 8], False], [[2024, 8, 1], False]], 'pay_date': [2023, 2, 16]}, 'single-default')], [('regression', {'claims': [[[2024, 11, 25], False], [[2022, 6, 11], True], [[2024, 3, 25], True]], 'pay_date': [2024, 4, 3]}, 'exempt'), ('regression', {'claims': [[[2022, 7, 16], True], [[2024, 7, 18], True]], 'pay_date': [2025, 2, 15]}, 'exempt'), ('partial-repair probe', {'claims': [[[2023, 9, 8], True], [[2023, 6, 20], True]], 'pay_date': [2023, 9, 8]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 10, 19], True], [[2022, 10, 27], True]], 'pay_date': [2022, 10, 19]}, 'exempt'), ('normal control', {'claims': [[[2024, 12, 15], False], [[2023, 9, 28], False]], 'pay_date': [2025, 2, 3]}, 'per-form'), ('normal control', {'claims': [], 'pay_date': [2024, 7, 6]}, 'single-default'), ('normal control', {'claims': [[[2022, 1, 12], True], [[2022, 3, 16], True]], 'pay_date': [2024, 5, 17]}, 'single-default'), ('normal control', {'claims': [[[2022, 3, 17], True]], 'pay_date': [2023, 2, 17]}, '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 | exempt | Failed |
| regression 1 | single-default | exempt | Failed |
| partial-repair probe 2 | single-default | exempt | Failed |
| partial-repair probe 3 | single-default | exempt | Failed |
| normal control 4 | per-form | per-form | Passed |
| normal control 5 | per-form | per-form | Passed |
| normal control 6 | single-default | single-default | Passed |
| normal control 7 | per-form | per-form | Passed |
SHA-256 / 9a81c4957fb65200dd7fb828045424bde6d0c9e2df8fa2fbb9984f7e13d224d0
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]:
return 'per-form'
expiry = (pay[0], 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, 9, 19], True], [[2023, 8, 5], True], [[2022, 3, 16], False]], 'pay_date': [2023, 9, 19]}, 'exempt'), ('regression', {'claims': [[[2023, 10, 8], True], [[2024, 3, 27], True]], 'pay_date': [2023, 10, 8]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt'), ('partial-repair probe', {'claims': [[[2023, 4, 26], True], [[2022, 11, 26], False]], 'pay_date': [2023, 4, 26]}, 'exempt'), ('normal control', {'claims': [[[2022, 2, 13], True], [[2023, 3, 1], False], [[2022, 3, 22], False]], 'pay_date': [2024, 2, 27]}, 'per-form'), ('normal control', {'claims': [[[2023, 2, 25], False]], 'pay_date': [2025, 12, 24]}, 'per-form'), ('normal control', {'claims': [], 'pay_date': [2025, 2, 4]}, 'single-default'), ('normal control', {'claims': [[[2023, 7, 12], False], [[2023, 2, 5], False], [[2024, 5, 28], False]], 'pay_date': [2024, 2, 16]}, 'per-form')], [('regression', {'claims': [[[2023, 10, 8], True], [[2024, 3, 27], True]], 'pay_date': [2023, 10, 8]}, 'exempt'), ('regression', {'claims': [[[2023, 2, 6], True]], 'pay_date': [2024, 2, 13]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt'), ('partial-repair probe', {'claims': [[[2023, 4, 26], True], [[2022, 11, 26], False]], 'pay_date': [2023, 4, 26]}, 'exempt'), ('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'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 16]}, 'single-default'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 15]}, 'single-default')], [('regression', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt'), ('regression', {'claims': [[[2023, 2, 6], True]], 'pay_date': [2024, 2, 13]}, 'exempt'), ('partial-repair probe', {'claims': [[[2024, 11, 25], False], [[2022, 6, 11], True], [[2024, 3, 25], True]], 'pay_date': [2024, 4, 3]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 10, 24], True], [[2022, 6, 19], True], [[2023, 1, 23], False]], 'pay_date': [2022, 10, 24]}, 'exempt'), ('normal control', {'claims': [[[2024, 1, 17], False]], 'pay_date': [2025, 2, 16]}, 'per-form'), ('normal control', {'claims': [[[2022, 1, 6], False], [[2024, 2, 7], False]], 'pay_date': [2024, 2, 12]}, 'per-form'), ('normal control', {'claims': [[[2023, 4, 9], False], [[2024, 8, 26], False], [[2022, 5, 3], False]], 'pay_date': [2024, 7, 21]}, 'per-form'), ('normal control', {'claims': [], 'pay_date': [2023, 2, 27]}, 'single-default')], [('regression', {'claims': [[[2023, 4, 26], True], [[2022, 11, 26], False]], 'pay_date': [2023, 4, 26]}, 'exempt'), ('regression', {'claims': [[[2022, 5, 10], True]], 'pay_date': [2022, 5, 10]}, 'exempt'), ('partial-repair probe', {'claims': [[[2023, 2, 17], True], [[2024, 9, 16], False]], 'pay_date': [2023, 2, 17]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 3, 20], True]], 'pay_date': [2025, 2, 15]}, '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, 14], False], [[2024, 8, 7], True], [[2024, 1, 1], True]], 'pay_date': [2023, 9, 14]}, 'per-form'), ('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': [[[2023, 10, 8], False], [[2024, 8, 1], False]], 'pay_date': [2023, 2, 16]}, 'single-default')], [('regression', {'claims': [[[2024, 11, 25], False], [[2022, 6, 11], True], [[2024, 3, 25], True]], 'pay_date': [2024, 4, 3]}, 'exempt'), ('regression', {'claims': [[[2022, 7, 16], True], [[2024, 7, 18], True]], 'pay_date': [2025, 2, 15]}, 'exempt'), ('partial-repair probe', {'claims': [[[2023, 9, 8], True], [[2023, 6, 20], True]], 'pay_date': [2023, 9, 8]}, 'exempt'), ('partial-repair probe', {'claims': [[[2022, 10, 19], True], [[2022, 10, 27], True]], 'pay_date': [2022, 10, 19]}, 'exempt'), ('normal control', {'claims': [[[2024, 12, 15], False], [[2023, 9, 28], False]], 'pay_date': [2025, 2, 3]}, 'per-form'), ('normal control', {'claims': [], 'pay_date': [2024, 7, 6]}, 'single-default'), ('normal control', {'claims': [[[2022, 1, 12], True], [[2022, 3, 16], True]], 'pay_date': [2024, 5, 17]}, 'single-default'), ('normal control', {'claims': [[[2022, 3, 17], True]], 'pay_date': [2023, 2, 17]}, '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 | exempt | Failed |
| regression 1 | single-default | exempt | Failed |
| partial-repair probe 2 | single-default | exempt | Failed |
| partial-repair probe 3 | single-default | exempt | Failed |
| normal control 4 | per-form | per-form | Passed |
| normal control 5 | per-form | per-form | Passed |
| normal control 6 | single-default | single-default | Passed |
| normal control 7 | per-form | per-form | Passed |
SHA-256 / a63062bd71411c18d7c41d675f95f17025fef1235e1d073e518d220313539a94
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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 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.355155+00:00.
Case digest / b3bbc104c9b3a15f3f685c5ae469c96d318a1960fab25b5aa9809a2d6292b9d8