FA-85608 / Ride-hailing fare and surge pricing / Member archive
Fare exactly at the promo minimum rejected · case 03
A 10.00 ride fails a 10.00 minimum-spend promo.
Case contract
Validate a promo in order: expired if now_day is after expires_day (the expiry day itself is valid), exhausted if no uses remain, not_first if first-ride-only and the rider has prior rides, min_fare if the fare (cents) is below min_fare. A valid pct promo takes value% of the fare (floored), capped at cap cents when cap is not None (a cap of 0 means a zero discount); a flat promo takes value but never more than the fare. Ride credits then cover up to the remaining fare. Return discount, credit used, amount due and reason.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: minimum fare comparison | {"credit_used": 250, "discount": 0, "due": 750, "reason": "min_fare"} | {"credit_used": 250, "discount": 100, "due": 650, "reason": null} | 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 ↗