FA-85641 / Ride-hailing fare and surge pricing / Open access
Airport dropoff charged the pickup fee · case 01
Trips to the airport are charged the higher pickup fee.
ROOT CAUSE
The dropoff side reads the pickup fee entry.
VERIFIED REPAIR
Charge the pickup fee for pickups and the dropoff fee for dropoffs.
Unsuccessful approach: Omitting the dropoff fee entirely under-charges airport dropoffs.
Case contract
Zone names are case-insensitive (normalized upper case). A flat fare table keyed "A|B" applies in both directions; a flat fare (0 is a valid promotional flat) is never surged. Otherwise the metered fare is surged (tenths, half up). Airport fees apply separately: the pickup fee of the pickup zone and the dropoff fee of the dropoff zone. Tolls are added last. Return [fare, flat|metered].
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(table, pickup_zone, drop_zone, metered, tolls, surge, airport_fees):
p, d = pickup_zone.upper(), drop_zone.upper()
flat = table.get(p + '|' + d, table.get(d + '|' + p))
if flat is not None:
fare, kind = flat, 'flat'
else:
fare, kind = (metered * surge * 2 + 10) // 20, 'metered'
fare += airport_fees.get(p, {}).get('pickup', 0) + airport_fees.get(d, {}).get('pickup', 0)
return [fare + tolls, kind]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'AIR', 4387, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5050, 'flat']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'AIR', 2756, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'air', 5529, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5400, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'MID', 1177, 0, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2854, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'DT', 3757, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5636, 'metered']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'MID', 3578, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4328, 'metered']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'DT', 4097, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[6396, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'air', 3297, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4450, 'flat']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'AIR', 991, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'air', 4614, 600, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5400, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'UNI', 2643, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2643, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'Dt', 2569, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5000, 'flat']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'DT', 5450, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[0, 'flat']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'SHUT', 4706, 600, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[10512, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'air', 3585, 600, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[8070, 'metered']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'AIR', 4123, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'AIR', 4026, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'DT', 4305, 250, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[8860, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'MID', 2606, 0, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5212, 'metered']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'Dt', 4867, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5250, 'flat']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'SHUT', 4760, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5510, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'air', 4285, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5185, 'metered']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'AIR', 5437, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5050, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'AIR', 1363, 250, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4450, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'DT', 4478, 600, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[7317, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'UNI', 5924, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5000, 'flat']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'DT', 1853, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5250, 'flat']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'MID', 4781, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[7172, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'air', 1974, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5050, 'flat']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'AIR', 1558, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2637, 'metered']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'AIR', 2287, 600, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4831, 'metered']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'Dt', 2942, 250, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5250, 'flat']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'SHUT', 3509, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4009, 'metered']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'SHUT', 2704, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2704, 'metered']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'DT', 2888, 0, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[0, 'flat'])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: airport fee sides | [5250, 'flat'] | [5050, 'flat'] | Failed |
| partial repair probe: airport fee sides | [5000, 'flat'] | [4800, 'flat'] | Failed |
| second regression | [5600, 'flat'] | [5400, 'flat'] | Failed |
| normal control 1 | [2854, 'metered'] | [2854, 'metered'] | Passed |
| normal control 2 | [5636, 'metered'] | [5636, 'metered'] | Passed |
| normal control 3 | [4328, 'metered'] | [4328, 'metered'] | Passed |
| normal control 4 | [6396, 'metered'] | [6396, 'metered'] | Passed |
SHA-256 / 01d5f1506ac4ee5deee3b44cebf2ede2d5992646b2093ada215c0b803ca551b2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(table, pickup_zone, drop_zone, metered, tolls, surge, airport_fees):
p, d = pickup_zone.upper(), drop_zone.upper()
flat = table.get(p + '|' + d, table.get(d + '|' + p))
if flat is not None:
fare, kind = flat, 'flat'
else:
fare, kind = (metered * surge * 2 + 10) // 20, 'metered'
fare += airport_fees.get(p, {}).get('pickup', 0)
return [fare + tolls, kind]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'AIR', 4387, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5050, 'flat']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'AIR', 2756, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'air', 5529, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5400, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'MID', 1177, 0, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2854, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'DT', 3757, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5636, 'metered']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'MID', 3578, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4328, 'metered']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'DT', 4097, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[6396, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'air', 3297, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4450, 'flat']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'AIR', 991, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'air', 4614, 600, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5400, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'UNI', 2643, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2643, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'Dt', 2569, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5000, 'flat']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'DT', 5450, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[0, 'flat']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'SHUT', 4706, 600, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[10512, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'air', 3585, 600, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[8070, 'metered']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'AIR', 4123, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'AIR', 4026, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'DT', 4305, 250, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[8860, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'MID', 2606, 0, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5212, 'metered']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'Dt', 4867, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5250, 'flat']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'SHUT', 4760, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5510, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'air', 4285, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5185, 'metered']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'AIR', 5437, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5050, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'AIR', 1363, 250, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4450, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'DT', 4478, 600, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[7317, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'UNI', 5924, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5000, 'flat']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'DT', 1853, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5250, 'flat']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'MID', 4781, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[7172, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'air', 1974, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5050, 'flat']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'AIR', 1558, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2637, 'metered']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'AIR', 2287, 600, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4831, 'metered']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'Dt', 2942, 250, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5250, 'flat']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'SHUT', 3509, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4009, 'metered']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'SHUT', 2704, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2704, 'metered']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'DT', 2888, 0, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[0, 'flat'])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: airport fee sides | [4750, 'flat'] | [5050, 'flat'] | Failed |
| partial repair probe: airport fee sides | [4500, 'flat'] | [4800, 'flat'] | Failed |
| second regression | [5100, 'flat'] | [5400, 'flat'] | Failed |
| normal control 1 | [2854, 'metered'] | [2854, 'metered'] | Passed |
| normal control 2 | [5636, 'metered'] | [5636, 'metered'] | Passed |
| normal control 3 | [4328, 'metered'] | [4328, 'metered'] | Passed |
| normal control 4 | [6396, 'metered'] | [6396, 'metered'] | Passed |
SHA-256 / fb4465e0a527f44940fdcf66286aa7ffb5e64a619f73a3de1eea21a42c9e8d1c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(table, pickup_zone, drop_zone, metered, tolls, surge, airport_fees):
p, d = pickup_zone.upper(), drop_zone.upper()
flat = table.get(p + '|' + d, table.get(d + '|' + p))
if flat is not None:
fare, kind = flat, 'flat'
else:
fare, kind = (metered * surge * 2 + 10) // 20, 'metered'
fare += airport_fees.get(p, {}).get('pickup', 0) + airport_fees.get(d, {}).get('dropoff', 0)
return [fare + tolls, kind]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'AIR', 4387, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5050, 'flat']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'AIR', 2756, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'air', 5529, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5400, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'MID', 1177, 0, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2854, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'DT', 3757, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5636, 'metered']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'MID', 3578, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4328, 'metered']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'DT', 4097, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[6396, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'air', 3297, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4450, 'flat']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'AIR', 991, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'air', 4614, 600, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5400, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'UNI', 2643, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2643, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'Dt', 2569, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5000, 'flat']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'DT', 5450, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[0, 'flat']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'SHUT', 4706, 600, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[10512, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'air', 3585, 600, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[8070, 'metered']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'AIR', 4123, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'AIR', 4026, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4800, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'DT', 4305, 250, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[8860, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'MID', 2606, 0, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5212, 'metered']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'Dt', 4867, 250, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5250, 'flat']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'SHUT', 4760, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5510, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'air', 4285, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5185, 'metered']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'AIR', 5437, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5050, 'flat']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'UNI', 'AIR', 1363, 250, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4450, 'flat']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'DT', 4478, 600, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[7317, 'metered']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'UNI', 5924, 600, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5000, 'flat']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'DT', 1853, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5250, 'flat']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'Dt', 'MID', 4781, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[7172, 'metered'])],
[('regression: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'DT', 'air', 1974, 250, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5050, 'flat']),
('partial repair probe: airport fee sides',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'AIR', 1558, 0, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2637, 'metered']),
('second regression',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'air', 'AIR', 2287, 600, 15,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4831, 'metered']),
('normal control 1',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'Dt', 2942, 250, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[5250, 'flat']),
('normal control 2',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'AIR', 'SHUT', 3509, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[4009, 'metered']),
('normal control 3',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'MID', 'SHUT', 2704, 0, 10,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[2704, 'metered']),
('normal control 4',
[{'AIR|DT': 4500, 'AIR|UNI': 3900, 'DT|SHUT': 0}, 'SHUT', 'DT', 2888, 0, 20,
{'AIR': {'dropoff': 300, 'pickup': 500}}],
[0, 'flat'])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: airport fee sides | [5050, 'flat'] | [5050, 'flat'] | Passed |
| partial repair probe: airport fee sides | [4800, 'flat'] | [4800, 'flat'] | Passed |
| second regression | [5400, 'flat'] | [5400, 'flat'] | Passed |
| normal control 1 | [2854, 'metered'] | [2854, 'metered'] | Passed |
| normal control 2 | [5636, 'metered'] | [5636, 'metered'] | Passed |
| normal control 3 | [4328, 'metered'] | [4328, 'metered'] | Passed |
| normal control 4 | [6396, 'metered'] | [6396, 'metered'] | Passed |
SHA-256 / 99e3bd0312adb52e0afdaf9a8f9ac348b2d4cdde33bc7ef40f8ca4dee7ecc3f6
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:42.263367+00:00.
Case digest / d3ffc1c88c9499663d923a3b9bd548f7a94c35240a57ba99a953da0d932480db