FAILURE MAP
← Case archive

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

Exact ratio at a tier edge falls to the lower tier · case 01

Exactly 20 requests for 10 drivers publishes 1.5x instead of 2.0x.

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

ROOT CAUSE

Tier thresholds are compared with strict greater-than.

VERIFIED REPAIR

A ratio equal to a threshold belongs to that tier.

Unsuccessful approach: Scanning the tiers from the lowest with an early exit stops at 1.2x for every surging zone.

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 if req > 0 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: tier scan order', [[[10, 10], [11, 10], [29, 20], [26, 0], [30, 10], [15, 5]], 15],
   [13, 11, 12, 30, 30, 30]),
  ('partial repair probe: tier scan order', [[[38, 10], [9, 20], [37, 7]], 15], [30, 28, 30]),
  ('second regression', [[[29, 5], [38, 0], [21, 10], [0, 0], [14, 5]], 30], [30, 30, 28, 26, 24]),
  ('normal control 1', [[[5, 5], [1, 0]], 12], [10, 30]),
  ('normal control 2', [[[3, 7], [13, 7], [20, 7], [40, 20], [-1, 0]], 30], [28, 26, 24, 22, 20]),
  ('normal control 3', [[[7, 10], [10, 10]], 20], [18, 16]),
  ('normal control 4', [[[3, 7], [1, 7], [4, 10]], 12], [10, 10, 10])],
 [('regression: tier scan order', [[[6, 5], [25, 10], [40, 0], [7, 7], [-1, 0], [28, 7]], 10],
   [12, 20, 30, 28, 26, 30]),
  ('partial repair probe: tier scan order', [[[9, 20], [37, 20], [0, 0]], 12], [10, 15, 13]),
  ('second regression', [[[38, 0], [23, 10], [31, 20], [10, 5], [21, 5]], 12], [30, 28, 26, 24, 30]),
  ('normal control 1', [[[-1, 0], [0, 0], [9, 10]], 30], [28, 26, 24]),
  ('normal control 2', [[[22, 20], [0, 0], [7, 5]], 15], [13, 11, 12]),
  ('normal control 3', [[[13, 7], [0, 0], [33, 0], [0, 0], [59, 20]], 20], [18, 16, 30, 28, 26]),
  ('normal control 4', [[[0, 0], [0, 0], [10, 7], [20, 20]], 10], [10, 10, 12, 10])],
 [('regression: tier scan order', [[[6, 5], [0, 0], [0, 0], [4, 10]], 12], [12, 10, 10, 10]),
  ('partial repair probe: tier scan order', [[[31, 10], [29, 10], [30, 20], [28, 20], [5, 10], [17, 5]], 30],
   [30, 28, 26, 24, 22, 30]),
  ('second regression', [[[19, 20], [9, 20], [30, 10], [12, 10]], 30], [28, 26, 30, 28]),
  ('normal control 1', [[[5, 10], [5, 10], [0, 0]], 15], [13, 11, 10]),
  ('normal control 2', [[[5, 10], [0, 0]], 10], [10, 10]),
  ('normal control 3', [[[11, 10], [11, 10], [22, 20]], 20], [18, 16, 14]),
  ('normal control 4', [[[20, 20], [5, 10]], 15], [13, 11])],
 [('regression: tier scan order', [[[60, 20], [60, 20], [7, 7], [21, 0], [12, 10], [7, 7]], 20],
   [30, 30, 28, 30, 28, 26]),
  ('partial repair probe: tier scan order', [[[30, 20], [8, 7], [21, 7], [9, 10], [2, 5]], 15],
   [15, 13, 30, 28, 26]),
  ('second regression', [[[11, 10], [10, 10], [40, 10]], 30], [28, 26, 30]),
  ('normal control 1', [[[11, 10], [27, 0], [11, 10], [6, 10], [4, 5]], 30], [28, 30, 28, 26, 24]),
  ('normal control 2', [[[27, 20], [39, 20], [31, 0], [20, 0], [37, 20], [20, 10]], 20],
   [18, 16, 30, 30, 28, 26]),
  ('normal control 3', [[[24, 0], [7, 7]], 20], [30, 28]),
  ('normal control 4', [[[29, 0], [3, 7]], 10], [30, 28])],
 [('regression: tier scan order', [[[15, 5], [0, 20], [6, 10], [37, 7]], 30], [30, 28, 26, 30]),
  ('partial repair probe: tier scan order', [[[28, 0], [38, 10], [7, 5], [10, 20]], 20], [30, 30, 28, 26]),
  ('second regression', [[[38, 20], [9, 20], [29, 20], [12, 5], [21, 20], [19, 0]], 10],
   [15, 13, 12, 20, 18, 30]),
  ('normal control 1', [[[10, 10], [10, 10]], 12], [10, 10]),
  ('normal control 2', [[[11, 10], [11, 10]], 20], [18, 16]),
  ('normal control 3', [[[0, 0], [4, 5], [21, 20]], 10], [10, 10, 10]),
  ('normal control 4', [[[20, 0], [37, 20], [11, 10]], 20], [30, 28, 26])]]
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: tier scan order[13, 11, 12, 30, 28, 26][13, 11, 12, 30, 30, 30]Failed
partial repair probe: tier scan order[30, 28, 30][30, 28, 30]Passed
second regression[30, 30, 28, 26, 24][30, 30, 28, 26, 24]Passed
normal control 1[10, 30][10, 30]Passed
normal control 2[28, 26, 24, 22, 20][28, 26, 24, 22, 20]Passed
normal control 3[18, 16][18, 16]Passed
normal control 4[10, 10, 10][10, 10, 10]Passed

SHA-256 / f050289a630f8ee2f6d191cc44edf1f9a7639eca8198dc01f93ef4b4e9dc6a6e

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 > 0 else 10
        else:
            for th, mult in reversed(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: tier scan order', [[[10, 10], [11, 10], [29, 20], [26, 0], [30, 10], [15, 5]], 15],
   [13, 11, 12, 30, 30, 30]),
  ('partial repair probe: tier scan order', [[[38, 10], [9, 20], [37, 7]], 15], [30, 28, 30]),
  ('second regression', [[[29, 5], [38, 0], [21, 10], [0, 0], [14, 5]], 30], [30, 30, 28, 26, 24]),
  ('normal control 1', [[[5, 5], [1, 0]], 12], [10, 30]),
  ('normal control 2', [[[3, 7], [13, 7], [20, 7], [40, 20], [-1, 0]], 30], [28, 26, 24, 22, 20]),
  ('normal control 3', [[[7, 10], [10, 10]], 20], [18, 16]),
  ('normal control 4', [[[3, 7], [1, 7], [4, 10]], 12], [10, 10, 10])],
 [('regression: tier scan order', [[[6, 5], [25, 10], [40, 0], [7, 7], [-1, 0], [28, 7]], 10],
   [12, 20, 30, 28, 26, 30]),
  ('partial repair probe: tier scan order', [[[9, 20], [37, 20], [0, 0]], 12], [10, 15, 13]),
  ('second regression', [[[38, 0], [23, 10], [31, 20], [10, 5], [21, 5]], 12], [30, 28, 26, 24, 30]),
  ('normal control 1', [[[-1, 0], [0, 0], [9, 10]], 30], [28, 26, 24]),
  ('normal control 2', [[[22, 20], [0, 0], [7, 5]], 15], [13, 11, 12]),
  ('normal control 3', [[[13, 7], [0, 0], [33, 0], [0, 0], [59, 20]], 20], [18, 16, 30, 28, 26]),
  ('normal control 4', [[[0, 0], [0, 0], [10, 7], [20, 20]], 10], [10, 10, 12, 10])],
 [('regression: tier scan order', [[[6, 5], [0, 0], [0, 0], [4, 10]], 12], [12, 10, 10, 10]),
  ('partial repair probe: tier scan order', [[[31, 10], [29, 10], [30, 20], [28, 20], [5, 10], [17, 5]], 30],
   [30, 28, 26, 24, 22, 30]),
  ('second regression', [[[19, 20], [9, 20], [30, 10], [12, 10]], 30], [28, 26, 30, 28]),
  ('normal control 1', [[[5, 10], [5, 10], [0, 0]], 15], [13, 11, 10]),
  ('normal control 2', [[[5, 10], [0, 0]], 10], [10, 10]),
  ('normal control 3', [[[11, 10], [11, 10], [22, 20]], 20], [18, 16, 14]),
  ('normal control 4', [[[20, 20], [5, 10]], 15], [13, 11])],
 [('regression: tier scan order', [[[60, 20], [60, 20], [7, 7], [21, 0], [12, 10], [7, 7]], 20],
   [30, 30, 28, 30, 28, 26]),
  ('partial repair probe: tier scan order', [[[30, 20], [8, 7], [21, 7], [9, 10], [2, 5]], 15],
   [15, 13, 30, 28, 26]),
  ('second regression', [[[11, 10], [10, 10], [40, 10]], 30], [28, 26, 30]),
  ('normal control 1', [[[11, 10], [27, 0], [11, 10], [6, 10], [4, 5]], 30], [28, 30, 28, 26, 24]),
  ('normal control 2', [[[27, 20], [39, 20], [31, 0], [20, 0], [37, 20], [20, 10]], 20],
   [18, 16, 30, 30, 28, 26]),
  ('normal control 3', [[[24, 0], [7, 7]], 20], [30, 28]),
  ('normal control 4', [[[29, 0], [3, 7]], 10], [30, 28])],
 [('regression: tier scan order', [[[15, 5], [0, 20], [6, 10], [37, 7]], 30], [30, 28, 26, 30]),
  ('partial repair probe: tier scan order', [[[28, 0], [38, 10], [7, 5], [10, 20]], 20], [30, 30, 28, 26]),
  ('second regression', [[[38, 20], [9, 20], [29, 20], [12, 5], [21, 20], [19, 0]], 10],
   [15, 13, 12, 20, 18, 30]),
  ('normal control 1', [[[10, 10], [10, 10]], 12], [10, 10]),
  ('normal control 2', [[[11, 10], [11, 10]], 20], [18, 16]),
  ('normal control 3', [[[0, 0], [4, 5], [21, 20]], 10], [10, 10, 10]),
  ('normal control 4', [[[20, 0], [37, 20], [11, 10]], 20], [30, 28, 26])]]
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: tier scan order[13, 11, 12, 30, 28, 26][13, 11, 12, 30, 30, 30]Failed
partial repair probe: tier scan order[13, 11, 12][30, 28, 30]Failed
second regression[28, 30, 28, 26, 24][30, 30, 28, 26, 24]Failed
normal control 1[10, 30][10, 30]Passed
normal control 2[28, 26, 24, 22, 20][28, 26, 24, 22, 20]Passed
normal control 3[18, 16][18, 16]Passed
normal control 4[10, 10, 10][10, 10, 10]Passed

SHA-256 / 3d34048b9cfc8aa0b37bc2c237cd76dbf260832ca0a2ce5737130e2d5dc9eb19

3 / The verified repair

Exit 0
"""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 > 0 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: tier scan order', [[[10, 10], [11, 10], [29, 20], [26, 0], [30, 10], [15, 5]], 15],
   [13, 11, 12, 30, 30, 30]),
  ('partial repair probe: tier scan order', [[[38, 10], [9, 20], [37, 7]], 15], [30, 28, 30]),
  ('second regression', [[[29, 5], [38, 0], [21, 10], [0, 0], [14, 5]], 30], [30, 30, 28, 26, 24]),
  ('normal control 1', [[[5, 5], [1, 0]], 12], [10, 30]),
  ('normal control 2', [[[3, 7], [13, 7], [20, 7], [40, 20], [-1, 0]], 30], [28, 26, 24, 22, 20]),
  ('normal control 3', [[[7, 10], [10, 10]], 20], [18, 16]),
  ('normal control 4', [[[3, 7], [1, 7], [4, 10]], 12], [10, 10, 10])],
 [('regression: tier scan order', [[[6, 5], [25, 10], [40, 0], [7, 7], [-1, 0], [28, 7]], 10],
   [12, 20, 30, 28, 26, 30]),
  ('partial repair probe: tier scan order', [[[9, 20], [37, 20], [0, 0]], 12], [10, 15, 13]),
  ('second regression', [[[38, 0], [23, 10], [31, 20], [10, 5], [21, 5]], 12], [30, 28, 26, 24, 30]),
  ('normal control 1', [[[-1, 0], [0, 0], [9, 10]], 30], [28, 26, 24]),
  ('normal control 2', [[[22, 20], [0, 0], [7, 5]], 15], [13, 11, 12]),
  ('normal control 3', [[[13, 7], [0, 0], [33, 0], [0, 0], [59, 20]], 20], [18, 16, 30, 28, 26]),
  ('normal control 4', [[[0, 0], [0, 0], [10, 7], [20, 20]], 10], [10, 10, 12, 10])],
 [('regression: tier scan order', [[[6, 5], [0, 0], [0, 0], [4, 10]], 12], [12, 10, 10, 10]),
  ('partial repair probe: tier scan order', [[[31, 10], [29, 10], [30, 20], [28, 20], [5, 10], [17, 5]], 30],
   [30, 28, 26, 24, 22, 30]),
  ('second regression', [[[19, 20], [9, 20], [30, 10], [12, 10]], 30], [28, 26, 30, 28]),
  ('normal control 1', [[[5, 10], [5, 10], [0, 0]], 15], [13, 11, 10]),
  ('normal control 2', [[[5, 10], [0, 0]], 10], [10, 10]),
  ('normal control 3', [[[11, 10], [11, 10], [22, 20]], 20], [18, 16, 14]),
  ('normal control 4', [[[20, 20], [5, 10]], 15], [13, 11])],
 [('regression: tier scan order', [[[60, 20], [60, 20], [7, 7], [21, 0], [12, 10], [7, 7]], 20],
   [30, 30, 28, 30, 28, 26]),
  ('partial repair probe: tier scan order', [[[30, 20], [8, 7], [21, 7], [9, 10], [2, 5]], 15],
   [15, 13, 30, 28, 26]),
  ('second regression', [[[11, 10], [10, 10], [40, 10]], 30], [28, 26, 30]),
  ('normal control 1', [[[11, 10], [27, 0], [11, 10], [6, 10], [4, 5]], 30], [28, 30, 28, 26, 24]),
  ('normal control 2', [[[27, 20], [39, 20], [31, 0], [20, 0], [37, 20], [20, 10]], 20],
   [18, 16, 30, 30, 28, 26]),
  ('normal control 3', [[[24, 0], [7, 7]], 20], [30, 28]),
  ('normal control 4', [[[29, 0], [3, 7]], 10], [30, 28])],
 [('regression: tier scan order', [[[15, 5], [0, 20], [6, 10], [37, 7]], 30], [30, 28, 26, 30]),
  ('partial repair probe: tier scan order', [[[28, 0], [38, 10], [7, 5], [10, 20]], 20], [30, 30, 28, 26]),
  ('second regression', [[[38, 20], [9, 20], [29, 20], [12, 5], [21, 20], [19, 0]], 10],
   [15, 13, 12, 20, 18, 30]),
  ('normal control 1', [[[10, 10], [10, 10]], 12], [10, 10]),
  ('normal control 2', [[[11, 10], [11, 10]], 20], [18, 16]),
  ('normal control 3', [[[0, 0], [4, 5], [21, 20]], 10], [10, 10, 10]),
  ('normal control 4', [[[20, 0], [37, 20], [11, 10]], 20], [30, 28, 26])]]
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: tier scan order[13, 11, 12, 30, 30, 30][13, 11, 12, 30, 30, 30]Passed
partial repair probe: tier scan order[30, 28, 30][30, 28, 30]Passed
second regression[30, 30, 28, 26, 24][30, 30, 28, 26, 24]Passed
normal control 1[10, 30][10, 30]Passed
normal control 2[28, 26, 24, 22, 20][28, 26, 24, 22, 20]Passed
normal control 3[18, 16][18, 16]Passed
normal control 4[10, 10, 10][10, 10, 10]Passed

SHA-256 / a06509a5987bd76d8e962f4aa74a1f026e812c203d8e7aa1694207a3de600da6

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

Case digest / 1e2a889632541e307c21c8af4c97cb8decc951413de8abdb7ecccc2eb0f4331d