FAILURE MAP
← Case archive

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

Zero drivers and zero requests treated as maximum surge · case 01

A quiet zone with no drivers and no riders publishes 3.0x.

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

ROOT CAUSE

Any zone with zero idle drivers gets the maximum multiplier.

THE FAILURE

Any zone with zero idle drivers gets the maximum multiplier.

Unsuccessful approach: Requiring two requests ignores a single stranded rider.

Case contract

Each interval gives [open requests, idle drivers]. The raw multiplier (tenths) is 30 when the exact ratio requests/drivers >= 3, 20 when >= 2, 15 when >= 1.5, 12 when >= 1.2, else 10; with zero drivers it is 30 if any request is open, else 10. The published multiplier rises immediately to the raw value but falls by at most 2 tenths per interval, starting from prev. Return the published multiplier per interval.

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(obs, prev):
    tiers = [(30, 30), (20, 20), (15, 15), (12, 12)]
    cur = prev
    out = []
    for req, drv in obs:
        raw = 10
        if drv == 0:
            raw = 30
        else:
            for th, mult in tiers:
                if req * 10 >= th * drv:
                    raw = mult
                    break
        cur = raw if raw >= cur else max(raw, cur - 2)
        out.append(cur)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: empty market', [[[39, 20], [16, 7], [-1, 0], [-1, 0]], 15], [15, 20, 18, 16]),
  ('partial repair probe: empty market', [[[60, 20], [4, 5], [1, 0], [5, 5]], 15], [30, 28, 30, 28]),
  ('second regression', [[[32, 0], [-1, 0]], 30], [30, 28]),
  ('normal control 1', [[[0, 10], [15, 10]], 12], [10, 15]),
  ('normal control 2', [[[15, 5], [12, 7], [18, 0], [6, 7]], 15], [30, 28, 30, 28]),
  ('normal control 3', [[[5, 10], [3, 7], [33, 7], [7, 7]], 20], [18, 16, 30, 28]),
  ('normal control 4', [[[27, 10], [37, 0], [7, 5], [23, 10], [10, 5], [15, 5]], 15],
   [20, 30, 28, 26, 24, 30])],
 [('regression: empty market', [[[-1, 0], [5, 10], [12, 10]], 10], [10, 10, 12]),
  ('partial repair probe: empty market', [[[1, 0], [-1, 0], [10, 7]], 15], [30, 28, 26]),
  ('second regression', [[[20, 10], [7, 7], [0, 0], [22, 20]], 15], [20, 18, 16, 14]),
  ('normal control 1', [[[11, 10], [23, 5], [4, 5], [12, 10]], 12], [10, 30, 28, 26]),
  ('normal control 2', [[[6, 5], [30, 10], [9, 10], [14, 5]], 30], [28, 30, 28, 26]),
  ('normal control 3', [[[18, 5], [10, 10], [5, 10]], 12], [30, 28, 26]),
  ('normal control 4', [[[13, 7], [17, 5], [4, 10], [29, 10], [10, 10], [19, 10]], 20],
   [18, 30, 28, 26, 24, 22])],
 [('regression: empty market', [[[5, 10], [10, 20], [36, 10], [-1, 0]], 20], [18, 16, 30, 28]),
  ('partial repair probe: empty market', [[[7, 7], [7, 7], [1, 0]], 30], [28, 26, 30]),
  ('second regression', [[[1, 20], [36, 5], [0, 0], [10, 20], [0, 0]], 15], [13, 30, 28, 26, 24]),
  ('normal control 1', [[[30, 10], [6, 7], [10, 7], [31, 7]], 10], [30, 28, 26, 30]),
  ('normal control 2', [[[21, 20], [10, 10]], 10], [10, 10]),
  ('normal control 3', [[[20, 5], [20, 7], [19, 20], [7, 7], [5, 10], [5, 10]], 15],
   [30, 28, 26, 24, 22, 20]),
  ('normal control 4', [[[4, 10], [20, 20], [4, 5]], 10], [10, 10, 10])],
 [('regression: empty market', [[[35, 5], [40, 20], [19, 10], [13, 7], [-1, 0], [14, 7]], 30],
   [30, 28, 26, 24, 22, 20]),
  ('partial repair probe: empty market', [[[11, 10], [18, 5], [17, 10], [5, 5], [1, 0]], 10],
   [10, 30, 28, 26, 30]),
  ('second regression', [[[36, 7], [6, 7], [-1, 0], [10, 20]], 20], [30, 28, 26, 24]),
  ('normal control 1', [[[6, 5], [17, 10]], 15], [13, 15]),
  ('normal control 2', [[[20, 20], [12, 7], [15, 5], [15, 5], [40, 20]], 10], [10, 15, 30, 30, 28]),
  ('normal control 3', [[[7, 20], [10, 20]], 20], [18, 16]),
  ('normal control 4', [[[38, 20], [20, 20], [20, 10]], 12], [15, 13, 20])],
 [('regression: empty market', [[[0, 0], [12, 5], [11, 7]], 15], [13, 20, 18]),
  ('partial repair probe: empty market', [[[25, 5], [0, 0], [1, 0]], 10], [30, 28, 30]),
  ('second regression', [[[19, 10], [7, 0], [10, 10], [-1, 0], [21, 20], [-1, 0]], 30],
   [28, 30, 28, 26, 24, 22]),
  ('normal control 1', [[[18, 10], [10, 7], [16, 5]], 12], [15, 13, 30]),
  ('normal control 2', [[[14, 7], [20, 10], [29, 10], [29, 5], [27, 10], [20, 20]], 15],
   [20, 20, 20, 30, 28, 26]),
  ('normal control 3', [[[4, 10], [9, 5]], 12], [10, 15]),
  ('normal control 4', [[[29, 7], [6, 5], [13, 7], [30, 20], [27, 10], [10, 10]], 10],
   [30, 28, 26, 24, 22, 20])]]
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: empty market[15, 20, 30, 30][15, 20, 18, 16]Failed
partial repair probe: empty market[30, 28, 30, 28][30, 28, 30, 28]Passed
second regression[30, 30][30, 28]Failed
normal control 1[10, 15][10, 15]Passed
normal control 2[30, 28, 30, 28][30, 28, 30, 28]Passed
normal control 3[18, 16, 30, 28][18, 16, 30, 28]Passed
normal control 4[20, 30, 28, 26, 24, 30][20, 30, 28, 26, 24, 30]Passed

SHA-256 / edbfbda807f91e41f0c7ac452412c880682bd90ff81ceb4ad0e6eae58b0eeee8

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(obs, prev):
    tiers = [(30, 30), (20, 20), (15, 15), (12, 12)]
    cur = prev
    out = []
    for req, drv in obs:
        raw = 10
        if drv == 0:
            raw = 30 if req > 1 else 10
        else:
            for th, mult in tiers:
                if req * 10 >= th * drv:
                    raw = mult
                    break
        cur = raw if raw >= cur else max(raw, cur - 2)
        out.append(cur)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: empty market', [[[39, 20], [16, 7], [-1, 0], [-1, 0]], 15], [15, 20, 18, 16]),
  ('partial repair probe: empty market', [[[60, 20], [4, 5], [1, 0], [5, 5]], 15], [30, 28, 30, 28]),
  ('second regression', [[[32, 0], [-1, 0]], 30], [30, 28]),
  ('normal control 1', [[[0, 10], [15, 10]], 12], [10, 15]),
  ('normal control 2', [[[15, 5], [12, 7], [18, 0], [6, 7]], 15], [30, 28, 30, 28]),
  ('normal control 3', [[[5, 10], [3, 7], [33, 7], [7, 7]], 20], [18, 16, 30, 28]),
  ('normal control 4', [[[27, 10], [37, 0], [7, 5], [23, 10], [10, 5], [15, 5]], 15],
   [20, 30, 28, 26, 24, 30])],
 [('regression: empty market', [[[-1, 0], [5, 10], [12, 10]], 10], [10, 10, 12]),
  ('partial repair probe: empty market', [[[1, 0], [-1, 0], [10, 7]], 15], [30, 28, 26]),
  ('second regression', [[[20, 10], [7, 7], [0, 0], [22, 20]], 15], [20, 18, 16, 14]),
  ('normal control 1', [[[11, 10], [23, 5], [4, 5], [12, 10]], 12], [10, 30, 28, 26]),
  ('normal control 2', [[[6, 5], [30, 10], [9, 10], [14, 5]], 30], [28, 30, 28, 26]),
  ('normal control 3', [[[18, 5], [10, 10], [5, 10]], 12], [30, 28, 26]),
  ('normal control 4', [[[13, 7], [17, 5], [4, 10], [29, 10], [10, 10], [19, 10]], 20],
   [18, 30, 28, 26, 24, 22])],
 [('regression: empty market', [[[5, 10], [10, 20], [36, 10], [-1, 0]], 20], [18, 16, 30, 28]),
  ('partial repair probe: empty market', [[[7, 7], [7, 7], [1, 0]], 30], [28, 26, 30]),
  ('second regression', [[[1, 20], [36, 5], [0, 0], [10, 20], [0, 0]], 15], [13, 30, 28, 26, 24]),
  ('normal control 1', [[[30, 10], [6, 7], [10, 7], [31, 7]], 10], [30, 28, 26, 30]),
  ('normal control 2', [[[21, 20], [10, 10]], 10], [10, 10]),
  ('normal control 3', [[[20, 5], [20, 7], [19, 20], [7, 7], [5, 10], [5, 10]], 15],
   [30, 28, 26, 24, 22, 20]),
  ('normal control 4', [[[4, 10], [20, 20], [4, 5]], 10], [10, 10, 10])],
 [('regression: empty market', [[[35, 5], [40, 20], [19, 10], [13, 7], [-1, 0], [14, 7]], 30],
   [30, 28, 26, 24, 22, 20]),
  ('partial repair probe: empty market', [[[11, 10], [18, 5], [17, 10], [5, 5], [1, 0]], 10],
   [10, 30, 28, 26, 30]),
  ('second regression', [[[36, 7], [6, 7], [-1, 0], [10, 20]], 20], [30, 28, 26, 24]),
  ('normal control 1', [[[6, 5], [17, 10]], 15], [13, 15]),
  ('normal control 2', [[[20, 20], [12, 7], [15, 5], [15, 5], [40, 20]], 10], [10, 15, 30, 30, 28]),
  ('normal control 3', [[[7, 20], [10, 20]], 20], [18, 16]),
  ('normal control 4', [[[38, 20], [20, 20], [20, 10]], 12], [15, 13, 20])],
 [('regression: empty market', [[[0, 0], [12, 5], [11, 7]], 15], [13, 20, 18]),
  ('partial repair probe: empty market', [[[25, 5], [0, 0], [1, 0]], 10], [30, 28, 30]),
  ('second regression', [[[19, 10], [7, 0], [10, 10], [-1, 0], [21, 20], [-1, 0]], 30],
   [28, 30, 28, 26, 24, 22]),
  ('normal control 1', [[[18, 10], [10, 7], [16, 5]], 12], [15, 13, 30]),
  ('normal control 2', [[[14, 7], [20, 10], [29, 10], [29, 5], [27, 10], [20, 20]], 15],
   [20, 20, 20, 30, 28, 26]),
  ('normal control 3', [[[4, 10], [9, 5]], 12], [10, 15]),
  ('normal control 4', [[[29, 7], [6, 5], [13, 7], [30, 20], [27, 10], [10, 10]], 10],
   [30, 28, 26, 24, 22, 20])]]
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: empty market[15, 20, 18, 16][15, 20, 18, 16]Passed
partial repair probe: empty market[30, 28, 26, 24][30, 28, 30, 28]Failed
second regression[30, 28][30, 28]Passed
normal control 1[10, 15][10, 15]Passed
normal control 2[30, 28, 30, 28][30, 28, 30, 28]Passed
normal control 3[18, 16, 30, 28][18, 16, 30, 28]Passed
normal control 4[20, 30, 28, 26, 24, 30][20, 30, 28, 26, 24, 30]Passed

SHA-256 / d3eca453f58482cf9e52cf5862cc0e756ee7873ae4b04edfeb19af9f1f1abe3b

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

Case digest / 2c73d19bf756e72de912f69e24fea59861801d36280f73e4dee9973758eb0fc2