FA-68592 / Toll and parking fee computation / Member archive
Pay-by-plate invoice and tag discount: invoice periods assume 1-based days · case 02
Pay-by-plate invoice and tag discount returns a wrong result when invoice periods assume 1-based days.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fee oracle 2 | {"invoices": 4, "plate": 2556, "tag": 447} | {"invoices": 2, "plate": 2156, "tag": 447} | 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 ↗