FA-85691 / Ride-hailing fare and surge pricing / Open access
Range narrower than two dollars shown · case 01
Short trips show a 1.00-wide range that the contract forbids.
ROOT CAUSE
The width fix only triggers when both ends are equal.
VERIFIED REPAIR
Widen the range whenever it is under 2.00.
Unsuccessful approach: Guarding against non-positive widths skips collapsed or inverted ranges created by the minimum fare clamp.
Case contract
Show a fare range from a point estimate in cents: low = 90% of the estimate floored to whole dollars, but never below the minimum fare; high = 110% of the estimate rounded up to whole dollars; if the range is narrower than 2.00 the high end becomes low + 2.00. Return [low, high] cents.
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(est, minimum):
low = max(est * 9 // 10 // 100 * 100, minimum)
high = -(-(est * 11) // 1000) * 100
if high == low:
high = low + 200
return [low, high]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: minimum width', [1000, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 1000], [1000, 1200]),
('second regression', [700, 800], [800, 1000]), ('normal control 1', [700, 500], [600, 800]),
('normal control 2', [1111, 500], [900, 1300]), ('normal control 3', [2500, 800], [2200, 2800]),
('normal control 4', [1000, 800], [900, 1100])],
[('regression: minimum width', [1000, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 1000], [1000, 1200]),
('second regression', [796, 800], [800, 1000]), ('normal control 1', [2500, 800], [2200, 2800]),
('normal control 2', [1234, 800], [1100, 1400]), ('normal control 3', [1999, 500], [1700, 2200]),
('normal control 4', [1000, 800], [900, 1100])],
[('regression: minimum width', [700, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 800], [800, 1000]),
('second regression', [1000, 1000], [1000, 1200]), ('normal control 1', [2050, 500], [1800, 2300]),
('normal control 2', [1111, 1000], [1000, 1300]), ('normal control 3', [1999, 500], [1700, 2200]),
('normal control 4', [1218, 1000], [1000, 1400])],
[('regression: minimum width', [700, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 800], [800, 1000]),
('second regression', [1000, 1000], [1000, 1200]), ('normal control 1', [1234, 1000], [1100, 1400]),
('normal control 2', [4006, 500], [3600, 4500]), ('normal control 3', [1989, 1000], [1700, 2200]),
('normal control 4', [1256, 1000], [1100, 1400])],
[('regression: minimum width', [505, 800], [800, 1000]),
('partial repair probe: minimum width', [700, 800], [800, 1000]),
('second regression', [1000, 1000], [1000, 1200]), ('normal control 1', [1111, 800], [900, 1300]),
('normal control 2', [5958, 500], [5300, 6600]), ('normal control 3', [2050, 800], [1800, 2300]),
('normal control 4', [2050, 1000], [1800, 2300])]]
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: minimum width | [1000, 1100] | [1000, 1200] | Failed |
| partial repair probe: minimum width | [1000, 800] | [1000, 1200] | Failed |
| second regression | [800, 1000] | [800, 1000] | Passed |
| normal control 1 | [600, 800] | [600, 800] | Passed |
| normal control 2 | [900, 1300] | [900, 1300] | Passed |
| normal control 3 | [2200, 2800] | [2200, 2800] | Passed |
| normal control 4 | [900, 1100] | [900, 1100] | Passed |
SHA-256 / 230ac03bbe5020d0aaa1aaa1d6fd135e9f11ee3b4258da97fe2033f808248833
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(est, minimum):
low = max(est * 9 // 10 // 100 * 100, minimum)
high = -(-(est * 11) // 1000) * 100
if 0 < high - low < 200:
high = low + 200
return [low, high]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: minimum width', [1000, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 1000], [1000, 1200]),
('second regression', [700, 800], [800, 1000]), ('normal control 1', [700, 500], [600, 800]),
('normal control 2', [1111, 500], [900, 1300]), ('normal control 3', [2500, 800], [2200, 2800]),
('normal control 4', [1000, 800], [900, 1100])],
[('regression: minimum width', [1000, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 1000], [1000, 1200]),
('second regression', [796, 800], [800, 1000]), ('normal control 1', [2500, 800], [2200, 2800]),
('normal control 2', [1234, 800], [1100, 1400]), ('normal control 3', [1999, 500], [1700, 2200]),
('normal control 4', [1000, 800], [900, 1100])],
[('regression: minimum width', [700, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 800], [800, 1000]),
('second regression', [1000, 1000], [1000, 1200]), ('normal control 1', [2050, 500], [1800, 2300]),
('normal control 2', [1111, 1000], [1000, 1300]), ('normal control 3', [1999, 500], [1700, 2200]),
('normal control 4', [1218, 1000], [1000, 1400])],
[('regression: minimum width', [700, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 800], [800, 1000]),
('second regression', [1000, 1000], [1000, 1200]), ('normal control 1', [1234, 1000], [1100, 1400]),
('normal control 2', [4006, 500], [3600, 4500]), ('normal control 3', [1989, 1000], [1700, 2200]),
('normal control 4', [1256, 1000], [1100, 1400])],
[('regression: minimum width', [505, 800], [800, 1000]),
('partial repair probe: minimum width', [700, 800], [800, 1000]),
('second regression', [1000, 1000], [1000, 1200]), ('normal control 1', [1111, 800], [900, 1300]),
('normal control 2', [5958, 500], [5300, 6600]), ('normal control 3', [2050, 800], [1800, 2300]),
('normal control 4', [2050, 1000], [1800, 2300])]]
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: minimum width | [1000, 1200] | [1000, 1200] | Passed |
| partial repair probe: minimum width | [1000, 800] | [1000, 1200] | Failed |
| second regression | [800, 800] | [800, 1000] | Failed |
| normal control 1 | [600, 800] | [600, 800] | Passed |
| normal control 2 | [900, 1300] | [900, 1300] | Passed |
| normal control 3 | [2200, 2800] | [2200, 2800] | Passed |
| normal control 4 | [900, 1100] | [900, 1100] | Passed |
SHA-256 / 99461bc76964aa70bb78441d860985739bec1a9cae38c6f2f112d0ad8cc47853
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(est, minimum):
low = max(est * 9 // 10 // 100 * 100, minimum)
high = -(-(est * 11) // 1000) * 100
if high - low < 200:
high = low + 200
return [low, high]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: minimum width', [1000, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 1000], [1000, 1200]),
('second regression', [700, 800], [800, 1000]), ('normal control 1', [700, 500], [600, 800]),
('normal control 2', [1111, 500], [900, 1300]), ('normal control 3', [2500, 800], [2200, 2800]),
('normal control 4', [1000, 800], [900, 1100])],
[('regression: minimum width', [1000, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 1000], [1000, 1200]),
('second regression', [796, 800], [800, 1000]), ('normal control 1', [2500, 800], [2200, 2800]),
('normal control 2', [1234, 800], [1100, 1400]), ('normal control 3', [1999, 500], [1700, 2200]),
('normal control 4', [1000, 800], [900, 1100])],
[('regression: minimum width', [700, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 800], [800, 1000]),
('second regression', [1000, 1000], [1000, 1200]), ('normal control 1', [2050, 500], [1800, 2300]),
('normal control 2', [1111, 1000], [1000, 1300]), ('normal control 3', [1999, 500], [1700, 2200]),
('normal control 4', [1218, 1000], [1000, 1400])],
[('regression: minimum width', [700, 1000], [1000, 1200]),
('partial repair probe: minimum width', [700, 800], [800, 1000]),
('second regression', [1000, 1000], [1000, 1200]), ('normal control 1', [1234, 1000], [1100, 1400]),
('normal control 2', [4006, 500], [3600, 4500]), ('normal control 3', [1989, 1000], [1700, 2200]),
('normal control 4', [1256, 1000], [1100, 1400])],
[('regression: minimum width', [505, 800], [800, 1000]),
('partial repair probe: minimum width', [700, 800], [800, 1000]),
('second regression', [1000, 1000], [1000, 1200]), ('normal control 1', [1111, 800], [900, 1300]),
('normal control 2', [5958, 500], [5300, 6600]), ('normal control 3', [2050, 800], [1800, 2300]),
('normal control 4', [2050, 1000], [1800, 2300])]]
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: minimum width | [1000, 1200] | [1000, 1200] | Passed |
| partial repair probe: minimum width | [1000, 1200] | [1000, 1200] | Passed |
| second regression | [800, 1000] | [800, 1000] | Passed |
| normal control 1 | [600, 800] | [600, 800] | Passed |
| normal control 2 | [900, 1300] | [900, 1300] | Passed |
| normal control 3 | [2200, 2800] | [2200, 2800] | Passed |
| normal control 4 | [900, 1100] | [900, 1100] | Passed |
SHA-256 / 6cfbb08a0ad8910669a318f08a6d161ef0d6545ab0bf78bc712b734841e33643
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.832839+00:00.
Case digest / d5053d434cd6aed0c0482c0ca1978ff95d342a828d7ba99b485f687dbf11e1d9