FA-59304 / Payroll withholding rules / Member archive
Tip shortfall allocation by hours: allocation eligibility · case 04
Employees who reported exactly their share are listed with zero-cent allocations.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | {"dee": 58211, "eli": 0} | {"dee": 58211} | 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 ↗