FAILURE MAP
← Case archive

FA-68594 / Toll and parking fee computation / Member archive

Pay-by-plate invoice and tag discount: invoice periods assume 1-based days · case 04

Pay-by-plate invoice and tag discount returns a wrong result when invoice periods assume 1-based days.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input {trips: [[day (0-based), base cents, tag|plate|exempt]], plate_surcharge_pct, tag_discount_pct, invoice_fee, cycle_days}. Exempt trips are ignored. Tag trips pay base minus a discount floored to cents. Plate trips pay base plus a surcharge rounded up to cents and are grouped into invoices by billing period day // cycle_days; each invoice adds one invoice_fee to the plate total. Return {tag, plate, invoices}.

Why this case matters

Fee engines bill customers in integer cents; a wrong boundary, rounding stage or cap scope silently over- or under-charges.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
fee oracle 0{"invoices": 4, "plate": 2905, "tag": 945}{"invoices": 3, "plate": 2705, "tag": 945}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 ↗