FAILURE MAP
← Case archive

FA-59219 / Payroll withholding rules / Member archive

Multi-state wage allocation by work days: zero allocation filter · case 04

Allocation results list states with zero cents allocated.

Member previewVariant 4 · 3 implementations · 10 checks per implementation

Case contract

Input {wage, days: {state: work days}, resident}. With zero total days all wages go to the resident state. Otherwise each state gets floor(wage*days/total); leftover cents go one each to states ranked by largest fractional remainder, ties by the base order (days descending, then state name). States allocated 0 cents are omitted. Return {state: cents}.

Why this case matters

State wage allocation must sum exactly to the paycheck with a deterministic remainder rule.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression 0{"CT": 0, "MA": 2, "NJ": 2}{"MA": 2, "NJ": 2}Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗