FAILURE MAP
← Case archive

FA-85393 / Ride-hailing fare and surge pricing / Member archive

Percentage promo ignores its cap · case 03

A 50% promo takes 40.00 off an 80.00 ride despite a 10.00 cap.

Member previewVariant 3 · 3 implementations · 7 checks per implementation

Case contract

Cents throughout. Surge (tenths) multiplies only base+distance+time, rounded half up. A percentage promo discounts the surged amount (floor), capped at promo cap cents. The booking fee is added after the discount. Tax (basis points, rounded half up) applies to surged - discount + booking fee; tolls and airport fees are passed through untaxed and unsurged.

Why this case matters

Ride-hailing prices are computed per trip at scale; ordering, unit and boundary slips become systematic over- or under-charging.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression: promo cap{"discount": 1681, "surged": 3362, "tax": 159, "total": 2775}{"discount": 1000, "surged": 3362, "tax": 215, "total": 3512}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 ↗