FAILURE MAP
← Case archive

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

Reservation fee kept when the driver no-shows · case 01

Riders stood up by the driver still pay the reservation fee.

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

ROOT CAUSE

The no-show branch charges the fee.

VERIFIED REPAIR

Charge nothing and refund the fee.

Unsuccessful approach: Zeroing the charge without flagging the refund leaves the prepaid fee unreturned.

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': reservation_fee, 'refund_fee': False}
    return {'charge': min(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: no-show refund', [4100, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [2500, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('second regression', [3200, 4100, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [4100, 3400, False, 300], {'charge': 3700, 'refund_fee': False}),
  ('normal control 2', [4100, 4099, False, 200], {'charge': 4299, 'refund_fee': False}),
  ('normal control 3', [4100, 4101, False, 200], {'charge': 4300, 'refund_fee': False}),
  ('normal control 4', [2500, 2499, False, 200], {'charge': 2699, 'refund_fee': False})],
 [('regression: no-show refund', [4100, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [2500, 3400, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [2500, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [2500, 1800, False, 200], {'charge': 2000, 'refund_fee': False}),
  ('normal control 2', [4100, 3400, False, 300], {'charge': 3700, 'refund_fee': False}),
  ('normal control 3', [3200, 3199, False, 200], {'charge': 3399, 'refund_fee': False}),
  ('normal control 4', [4100, 4101, False, 300], {'charge': 4400, 'refund_fee': False})],
 [('regression: no-show refund', [3200, 3201, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [4100, 4099, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [3200, 3199, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [3200, 3199, False, 200], {'charge': 3399, 'refund_fee': False}),
  ('normal control 2', [3200, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 3', [2500, 1800, False, 200], {'charge': 2000, 'refund_fee': False}),
  ('normal control 4', [3200, 3201, False, 200], {'charge': 3400, 'refund_fee': False})],
 [('regression: no-show refund', [4100, 4099, True, 300], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [4100, 5000, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [2500, 1800, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [2500, 1800, False, 200], {'charge': 2000, 'refund_fee': False}),
  ('normal control 2', [4100, 3400, False, 200], {'charge': 3600, 'refund_fee': False}),
  ('normal control 3', [3200, 3201, False, 300], {'charge': 3500, 'refund_fee': False}),
  ('normal control 4', [2500, 2501, False, 300], {'charge': 2800, 'refund_fee': False})],
 [('regression: no-show refund', [4100, 4100, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [4100, 4101, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [3200, 3199, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [2500, 3400, False, 300], {'charge': 2800, 'refund_fee': False}),
  ('normal control 2', [3200, 3199, False, 200], {'charge': 3399, 'refund_fee': False}),
  ('normal control 3', [3200, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 4', [2500, 3400, False, 200], {'charge': 2700, '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: no-show refund{'charge': 200, 'refund_fee': False}{'charge': 0, 'refund_fee': True}Failed
partial repair probe: no-show refund{'charge': 200, 'refund_fee': False}{'charge': 0, 'refund_fee': True}Failed
second regression{'charge': 200, 'refund_fee': False}{'charge': 0, 'refund_fee': True}Failed
normal control 1{'charge': 3700, 'refund_fee': False}{'charge': 3700, 'refund_fee': False}Passed
normal control 2{'charge': 4299, 'refund_fee': False}{'charge': 4299, 'refund_fee': False}Passed
normal control 3{'charge': 4300, 'refund_fee': False}{'charge': 4300, 'refund_fee': False}Passed
normal control 4{'charge': 2699, 'refund_fee': False}{'charge': 2699, 'refund_fee': False}Passed

SHA-256 / cb772d9c4aa86b8bbdf9d039e7dcace2392a995f88eca7d20cb82f4613f5eb9d

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': False}
    return {'charge': min(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: no-show refund', [4100, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [2500, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('second regression', [3200, 4100, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [4100, 3400, False, 300], {'charge': 3700, 'refund_fee': False}),
  ('normal control 2', [4100, 4099, False, 200], {'charge': 4299, 'refund_fee': False}),
  ('normal control 3', [4100, 4101, False, 200], {'charge': 4300, 'refund_fee': False}),
  ('normal control 4', [2500, 2499, False, 200], {'charge': 2699, 'refund_fee': False})],
 [('regression: no-show refund', [4100, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [2500, 3400, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [2500, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [2500, 1800, False, 200], {'charge': 2000, 'refund_fee': False}),
  ('normal control 2', [4100, 3400, False, 300], {'charge': 3700, 'refund_fee': False}),
  ('normal control 3', [3200, 3199, False, 200], {'charge': 3399, 'refund_fee': False}),
  ('normal control 4', [4100, 4101, False, 300], {'charge': 4400, 'refund_fee': False})],
 [('regression: no-show refund', [3200, 3201, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [4100, 4099, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [3200, 3199, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [3200, 3199, False, 200], {'charge': 3399, 'refund_fee': False}),
  ('normal control 2', [3200, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 3', [2500, 1800, False, 200], {'charge': 2000, 'refund_fee': False}),
  ('normal control 4', [3200, 3201, False, 200], {'charge': 3400, 'refund_fee': False})],
 [('regression: no-show refund', [4100, 4099, True, 300], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [4100, 5000, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [2500, 1800, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [2500, 1800, False, 200], {'charge': 2000, 'refund_fee': False}),
  ('normal control 2', [4100, 3400, False, 200], {'charge': 3600, 'refund_fee': False}),
  ('normal control 3', [3200, 3201, False, 300], {'charge': 3500, 'refund_fee': False}),
  ('normal control 4', [2500, 2501, False, 300], {'charge': 2800, 'refund_fee': False})],
 [('regression: no-show refund', [4100, 4100, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [4100, 4101, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [3200, 3199, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [2500, 3400, False, 300], {'charge': 2800, 'refund_fee': False}),
  ('normal control 2', [3200, 3199, False, 200], {'charge': 3399, 'refund_fee': False}),
  ('normal control 3', [3200, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 4', [2500, 3400, False, 200], {'charge': 2700, '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: no-show refund{'charge': 0, 'refund_fee': False}{'charge': 0, 'refund_fee': True}Failed
partial repair probe: no-show refund{'charge': 0, 'refund_fee': False}{'charge': 0, 'refund_fee': True}Failed
second regression{'charge': 0, 'refund_fee': False}{'charge': 0, 'refund_fee': True}Failed
normal control 1{'charge': 3700, 'refund_fee': False}{'charge': 3700, 'refund_fee': False}Passed
normal control 2{'charge': 4299, 'refund_fee': False}{'charge': 4299, 'refund_fee': False}Passed
normal control 3{'charge': 4300, 'refund_fee': False}{'charge': 4300, 'refund_fee': False}Passed
normal control 4{'charge': 2699, 'refund_fee': False}{'charge': 2699, 'refund_fee': False}Passed

SHA-256 / 3f57583ba94e65809c947467686cb1e9f0516020e3ca294584cb06ab39b7710d

3 / The verified repair

Exit 0
"""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': min(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: no-show refund', [4100, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [2500, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('second regression', [3200, 4100, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [4100, 3400, False, 300], {'charge': 3700, 'refund_fee': False}),
  ('normal control 2', [4100, 4099, False, 200], {'charge': 4299, 'refund_fee': False}),
  ('normal control 3', [4100, 4101, False, 200], {'charge': 4300, 'refund_fee': False}),
  ('normal control 4', [2500, 2499, False, 200], {'charge': 2699, 'refund_fee': False})],
 [('regression: no-show refund', [4100, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [2500, 3400, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [2500, 3400, True, 200], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [2500, 1800, False, 200], {'charge': 2000, 'refund_fee': False}),
  ('normal control 2', [4100, 3400, False, 300], {'charge': 3700, 'refund_fee': False}),
  ('normal control 3', [3200, 3199, False, 200], {'charge': 3399, 'refund_fee': False}),
  ('normal control 4', [4100, 4101, False, 300], {'charge': 4400, 'refund_fee': False})],
 [('regression: no-show refund', [3200, 3201, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [4100, 4099, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [3200, 3199, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [3200, 3199, False, 200], {'charge': 3399, 'refund_fee': False}),
  ('normal control 2', [3200, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 3', [2500, 1800, False, 200], {'charge': 2000, 'refund_fee': False}),
  ('normal control 4', [3200, 3201, False, 200], {'charge': 3400, 'refund_fee': False})],
 [('regression: no-show refund', [4100, 4099, True, 300], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [4100, 5000, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [2500, 1800, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [2500, 1800, False, 200], {'charge': 2000, 'refund_fee': False}),
  ('normal control 2', [4100, 3400, False, 200], {'charge': 3600, 'refund_fee': False}),
  ('normal control 3', [3200, 3201, False, 300], {'charge': 3500, 'refund_fee': False}),
  ('normal control 4', [2500, 2501, False, 300], {'charge': 2800, 'refund_fee': False})],
 [('regression: no-show refund', [4100, 4100, True, 200], {'charge': 0, 'refund_fee': True}),
  ('partial repair probe: no-show refund', [4100, 4101, True, 300], {'charge': 0, 'refund_fee': True}),
  ('second regression', [3200, 3199, True, 300], {'charge': 0, 'refund_fee': True}),
  ('normal control 1', [2500, 3400, False, 300], {'charge': 2800, 'refund_fee': False}),
  ('normal control 2', [3200, 3199, False, 200], {'charge': 3399, 'refund_fee': False}),
  ('normal control 3', [3200, 2500, False, 200], {'charge': 2700, 'refund_fee': False}),
  ('normal control 4', [2500, 3400, False, 200], {'charge': 2700, '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: no-show refund{'charge': 0, 'refund_fee': True}{'charge': 0, 'refund_fee': True}Passed
partial repair probe: no-show refund{'charge': 0, 'refund_fee': True}{'charge': 0, 'refund_fee': True}Passed
second regression{'charge': 0, 'refund_fee': True}{'charge': 0, 'refund_fee': True}Passed
normal control 1{'charge': 3700, 'refund_fee': False}{'charge': 3700, 'refund_fee': False}Passed
normal control 2{'charge': 4299, 'refund_fee': False}{'charge': 4299, 'refund_fee': False}Passed
normal control 3{'charge': 4300, 'refund_fee': False}{'charge': 4300, 'refund_fee': False}Passed
normal control 4{'charge': 2699, 'refund_fee': False}{'charge': 2699, 'refund_fee': False}Passed

SHA-256 / 74d7fd71f694f3307d7a27adba57f0c0cc1980a014cf1089ccb152dd6d30d6dd

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.769315+00:00.

Case digest / 3e61e1c9f5dc7ff2871d0d2082e63933518f4be9deed66522a9da590eb44b3f1