FAILURE MAP
← Case archive

FA-59309 / Payroll withholding rules / Member archive

Tip shortfall allocation by hours: hours share base · case 04

The wrong employees are selected for allocation because shares are too small.

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{"ana": 19130, "ben": 159457}{"ana": 25510, "ben": 153078}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 ↗