FAILURE MAP
← Case archive

FA-59004 / Payroll withholding rules / Member archive

Overtime regular rate with bonuses and differentials: shift differential in regular rate · case 04

Night-shift workers with overtime are underpaid on their premium.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input weekly {hours, rate, bonus, discretionary, diff_hours, diff}. Straight pay = hours*rate + diff_hours*diff. Regular rate = (straight pay + bonus unless discretionary) / hours. Overtime premium = regular rate * max(0, hours-40) / 2, rounded half-up to the cent. Total = straight pay + bonus + premium. Zero hours returns [0, bonus]. Return [premium, total].

Why this case matters

Nondiscretionary bonuses and shift differentials raise the regular rate, and only a half-time premium is owed on top of straight-time pay.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression 0[7865, 84982][8254, 85371]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 ↗