FAILURE MAP
← Case archive

FA-85816 / Ride-hailing fare and surge pricing / Open access

Rider pays the booked price when the meter is lower · case 01

A traffic-free scheduled ride still costs the booked price.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The charge ignores the metered fare.

THE FAILURE

The charge ignores the metered fare.

Unsuccessful approach: Taking the higher fare inverts the guarantee.

Case contract

Scheduled rides guarantee the booked price: the rider pays the lower of booked and metered fare plus the reservation fee. If the driver never shows, nothing is charged and the reservation fee is refunded. Return charge cents and whether the fee is refunded.

Why this case matters

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

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(booked_price, metered, driver_no_show, reservation_fee):
    if driver_no_show:
        return {'charge': 0, 'refund_fee': True}
    return {'charge': booked_price + reservation_fee, 'refund_fee': False}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: price guarantee direction', [3200, 3199, False, 300], {'charge': 3499, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [3200, 4100, False, 300],
   {'charge': 3500, 'refund_fee': False}),
  ('second regression', [3200, 3201, False, 300], {'charge': 3500, 'refund_fee': False}),
  ('normal control 1', [2500, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 2', [3200, 3199, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 3', [4100, 5000, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 4', [4100, 5000, True, 300], {'charge': 0, 'refund_fee': True})],
 [('regression: price guarantee direction', [4100, 4099, False, 200], {'charge': 4299, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [4100, 5000, False, 200],
   {'charge': 4300, 'refund_fee': False}),
  ('second regression', [3200, 4100, False, 200], {'charge': 3400, 'refund_fee': False}),
  ('normal control 1', [3200, 3199, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 2', [4100, 4100, False, 300], {'charge': 4400, 'refund_fee': False}),
  ('normal control 3', [2500, 2500, False, 300], {'charge': 2800, 'refund_fee': False}),
  ('normal control 4', [2500, 3400, True, 300], {'charge': 0, 'refund_fee': True})],
 [('regression: price guarantee direction', [2500, 2499, False, 300], {'charge': 2799, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [3200, 3201, False, 300],
   {'charge': 3500, 'refund_fee': False}),
  ('second regression', [2500, 3400, False, 300], {'charge': 2800, 'refund_fee': False}),
  ('normal control 1', [3200, 3199, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 2', [4100, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 3', [3200, 3200, False, 300], {'charge': 3500, 'refund_fee': False}),
  ('normal control 4', [3200, 3200, True, 300], {'charge': 0, 'refund_fee': True})],
 [('regression: price guarantee direction', [2500, 1800, False, 300], {'charge': 2100, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [2500, 2499, False, 300],
   {'charge': 2799, 'refund_fee': False}),
  ('second regression', [3200, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 1', [4100, 4099, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 2', [2500, 2500, False, 300], {'charge': 2800, 'refund_fee': False}),
  ('normal control 3', [4100, 4101, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 4', [2500, 2500, False, 200], {'charge': 2700, 'refund_fee': False})],
 [('regression: price guarantee direction', [2500, 1800, False, 300], {'charge': 2100, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [3200, 2500, False, 200],
   {'charge': 2700, 'refund_fee': False}),
  ('second regression', [3200, 4100, False, 200], {'charge': 3400, 'refund_fee': False}),
  ('normal control 1', [2500, 2501, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 2', [4100, 4100, False, 300], {'charge': 4400, 'refund_fee': False}),
  ('normal control 3', [2500, 2501, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 4', [3200, 3200, False, 200], {'charge': 3400, 'refund_fee': False})]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: price guarantee direction{'charge': 3500, 'refund_fee': False}{'charge': 3499, 'refund_fee': False}Failed
partial repair probe: price guarantee direction{'charge': 3500, 'refund_fee': False}{'charge': 3500, 'refund_fee': False}Passed
second regression{'charge': 3500, 'refund_fee': False}{'charge': 3500, 'refund_fee': False}Passed
normal control 1{'charge': 2700, 'refund_fee': False}{'charge': 2700, 'refund_fee': False}Passed
normal control 2{'charge': 0, 'refund_fee': True}{'charge': 0, 'refund_fee': True}Passed
normal control 3{'charge': 0, 'refund_fee': True}{'charge': 0, 'refund_fee': True}Passed
normal control 4{'charge': 0, 'refund_fee': True}{'charge': 0, 'refund_fee': True}Passed

SHA-256 / 42483e60bf673d80cda3e50520ccf079e52ff6d61b4e50d51e231add62ce356d

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(booked_price, metered, driver_no_show, reservation_fee):
    if driver_no_show:
        return {'charge': 0, 'refund_fee': True}
    return {'charge': max(booked_price, metered) + reservation_fee, 'refund_fee': False}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: price guarantee direction', [3200, 3199, False, 300], {'charge': 3499, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [3200, 4100, False, 300],
   {'charge': 3500, 'refund_fee': False}),
  ('second regression', [3200, 3201, False, 300], {'charge': 3500, 'refund_fee': False}),
  ('normal control 1', [2500, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 2', [3200, 3199, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 3', [4100, 5000, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 4', [4100, 5000, True, 300], {'charge': 0, 'refund_fee': True})],
 [('regression: price guarantee direction', [4100, 4099, False, 200], {'charge': 4299, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [4100, 5000, False, 200],
   {'charge': 4300, 'refund_fee': False}),
  ('second regression', [3200, 4100, False, 200], {'charge': 3400, 'refund_fee': False}),
  ('normal control 1', [3200, 3199, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 2', [4100, 4100, False, 300], {'charge': 4400, 'refund_fee': False}),
  ('normal control 3', [2500, 2500, False, 300], {'charge': 2800, 'refund_fee': False}),
  ('normal control 4', [2500, 3400, True, 300], {'charge': 0, 'refund_fee': True})],
 [('regression: price guarantee direction', [2500, 2499, False, 300], {'charge': 2799, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [3200, 3201, False, 300],
   {'charge': 3500, 'refund_fee': False}),
  ('second regression', [2500, 3400, False, 300], {'charge': 2800, 'refund_fee': False}),
  ('normal control 1', [3200, 3199, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 2', [4100, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 3', [3200, 3200, False, 300], {'charge': 3500, 'refund_fee': False}),
  ('normal control 4', [3200, 3200, True, 300], {'charge': 0, 'refund_fee': True})],
 [('regression: price guarantee direction', [2500, 1800, False, 300], {'charge': 2100, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [2500, 2499, False, 300],
   {'charge': 2799, 'refund_fee': False}),
  ('second regression', [3200, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 1', [4100, 4099, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 2', [2500, 2500, False, 300], {'charge': 2800, 'refund_fee': False}),
  ('normal control 3', [4100, 4101, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 4', [2500, 2500, False, 200], {'charge': 2700, 'refund_fee': False})],
 [('regression: price guarantee direction', [2500, 1800, False, 300], {'charge': 2100, 'refund_fee': False}),
  ('partial repair probe: price guarantee direction', [3200, 2500, False, 200],
   {'charge': 2700, 'refund_fee': False}),
  ('second regression', [3200, 4100, False, 200], {'charge': 3400, 'refund_fee': False}),
  ('normal control 1', [2500, 2501, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 2', [4100, 4100, False, 300], {'charge': 4400, 'refund_fee': False}),
  ('normal control 3', [2500, 2501, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 4', [3200, 3200, False, 200], {'charge': 3400, 'refund_fee': False})]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: price guarantee direction{'charge': 3500, 'refund_fee': False}{'charge': 3499, 'refund_fee': False}Failed
partial repair probe: price guarantee direction{'charge': 4400, 'refund_fee': False}{'charge': 3500, 'refund_fee': False}Failed
second regression{'charge': 3501, 'refund_fee': False}{'charge': 3500, 'refund_fee': False}Failed
normal control 1{'charge': 2700, 'refund_fee': False}{'charge': 2700, 'refund_fee': False}Passed
normal control 2{'charge': 0, 'refund_fee': True}{'charge': 0, 'refund_fee': True}Passed
normal control 3{'charge': 0, 'refund_fee': True}{'charge': 0, 'refund_fee': True}Passed
normal control 4{'charge': 0, 'refund_fee': True}{'charge': 0, 'refund_fee': True}Passed

SHA-256 / 72995e0ce57a176491046d6ac3d3984b280dda6e113bc5738756f57b3e86d44f

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

A deterministic toy pricing contract stipulated for this example; it does not reproduce the pricing of any real ride-hailing operator or regulator. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:50:43.799943+00:00.

Case digest / 20015924f9a8913a865802c9545e4d2012cb362d81cd3a4e34e7ff17ebb315ae