FAILURE MAP
← Case archive

FA-59299 / Payroll withholding rules / Member archive

Tip shortfall allocation by hours: proportional allocation · case 04

Allocated tips add up to more than the establishment shortfall.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input {receipts, staff: [[name, hours, reported_tips]]} with positive total hours. Target = 8% of receipts. Shortfall = target - total reported; none -> {}. Each employee's share = target*hours/total_hours; employees reporting less than their share get deficit = share - reported. Shortfall is allocated in proportion to deficits, each rounded half-up. Return {name: cents}.

Why this case matters

Tip allocation assigns reported income on W-2s, and only employees under-reporting their share receive allocations.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression 0{"ben": 31758, "cy": 20358, "dee": 19544}{"ben": 18054, "cy": 11573, "dee": 11110}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 ↗