FAILURE MAP
← Case archive

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

Surge taken from the dropoff zone · case 01

Riders heading into a surging stadium zone pay its surge from a calm neighborhood.

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

ROOT CAUSE

Containment is tested against the dropoff point.

THE FAILURE

Containment is tested against the dropoff point.

Unsuccessful approach: Matching zones at either endpoint still applies dropoff surges.

Case contract

Surge zones are rectangles, half-open [x0, x1) x [y0, y1). The multiplier comes from the pickup point only. Among zones containing it choose highest priority, then highest multiplier, then lowest id. No containing zone gives [None, 10] (1.0x in tenths). Return [zone id, multiplier].

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(zones, pickup, dropoff):
    best = None
    for z in zones:
        if z['x0'] <= dropoff[0] < z['x1'] and z['y0'] <= dropoff[1] < z['y1']:
            k = (z['priority'], z['mult'], -z['id'])
            if best is None or k > best[0]:
                best = (k, z)
    if best is None:
        return [None, 10]
    return [best[1]['id'], best[1]['mult']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: pickup-anchored surge',
   [[{'id': 4, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10}], [40, 10], [5, 0]],
   [None, 10]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 26, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},
     {'id': 6, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 24, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 41, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},
     {'id': 25, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}],
    [20, 30], [20, 12]],
   [25, 12]),
  ('second regression',
   [[{'id': 34, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},
     {'id': 32, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 10},
     {'id': 44, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20}],
    [0, 12], [15, 20]],
   [34, 20]),
  ('normal control 1',
   [[{'id': 30, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 20}], [10, 30], [0, 10]],
   [None, 10]),
  ('normal control 2',
   [[{'id': 45, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30}], [35, 12], [10, 12]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 37, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20}], [40, 30], [15, 10]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 49, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20},
     {'id': 12, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},
     {'id': 17, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20}],
    [30, 26], [40, 12]],
   [None, 10])],
 [('regression: pickup-anchored surge',
   [[{'id': 49, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40},
     {'id': 19, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 42, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30},
     {'id': 37, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30}],
    [5, 12], [10, 20]],
   [19, 15]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 2, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30},
     {'id': 23, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},
     {'id': 7, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 37, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20}],
    [27, 0], [20, 20]],
   [None, 10]),
  ('second regression',
   [[{'id': 21, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 40},
     {'id': 29, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},
     {'id': 7, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40},
     {'id': 33, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30}],
    [30, 20], [0, 30]],
   [21, 12]),
  ('normal control 1',
   [[{'id': 27, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}], [40, 12], [30, 10]],
   [None, 10]),
  ('normal control 2',
   [[{'id': 15, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30},
     {'id': 16, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},
     {'id': 23, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],
    [15, 5], [40, 30]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 19, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20},
     {'id': 6, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 30},
     {'id': 50, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30}],
    [40, 10], [10, 30]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 20, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40},
     {'id': 44, 'mult': 20, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20}],
    [15, 20], [40, 0]],
   [None, 10])],
 [('regression: pickup-anchored surge',
   [[{'id': 8, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30},
     {'id': 41, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 15, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20}],
    [32, 10], [5, 20]],
   [None, 10]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 35, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20},
     {'id': 34, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30},
     {'id': 12, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 10}],
    [40, 30], [10, 0]],
   [None, 10]),
  ('second regression',
   [[{'id': 46, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 19, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 47, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30},
     {'id': 39, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 48, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10}],
    [15, 10], [40, 12]],
   [19, 15]),
  ('normal control 1',
   [[{'id': 25, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20},
     {'id': 6, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 10},
     {'id': 37, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20}],
    [0, 10], [0, 10]],
   [25, 12]),
  ('normal control 2',
   [[{'id': 23, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30},
     {'id': 11, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},
     {'id': 3, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40},
     {'id': 30, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20},
     {'id': 2, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40}],
    [40, 23], [16, 0]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 30, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 40},
     {'id': 16, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20},
     {'id': 23, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40}],
    [40, 26], [5, 10]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 14, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 40, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30}],
    [35, 20], [40, 10]],
   [None, 10])],
 [('regression: pickup-anchored surge',
   [[{'id': 14, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 5, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 29, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20}],
    [0, 10], [40, 12]],
   [5, 12]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 9, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},
     {'id': 36, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40}],
    [20, 5], [19, 25]],
   [None, 10]),
  ('second regression',
   [[{'id': 11, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20},
     {'id': 29, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30},
     {'id': 7, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}],
    [15, 0], [40, 0]],
   [11, 12]),
  ('normal control 1',
   [[{'id': 37, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 10},
     {'id': 45, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},
     {'id': 15, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 13, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 10},
     {'id': 11, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40}],
    [0, 30], [0, 38]],
   [11, 12]),
  ('normal control 2',
   [[{'id': 19, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10}], [10, 10], [5, 0]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 13, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},
     {'id': 12, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 27, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30}],
    [20, 30], [30, 2]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 41, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20},
     {'id': 45, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 10, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30}],
    [20, 12], [20, 10]],
   [None, 10])],
 [('regression: pickup-anchored surge',
   [[{'id': 23, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},
     {'id': 10, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30},
     {'id': 12, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 14, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},
     {'id': 30, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}],
    [5, 20], [26, 10]],
   [23, 15]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 35, 'mult': 20, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 19, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20}],
    [5, 20], [15, 10]],
   [None, 10]),
  ('second regression',
   [[{'id': 31, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 39, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 20},
     {'id': 49, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20},
     {'id': 37, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20}],
    [15, 0], [5, 10]],
   [49, 15]),
  ('normal control 1',
   [[{'id': 11, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20}], [0, 37], [22, 30]],
   [None, 10]),
  ('normal control 2',
   [[{'id': 1, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30}], [15, 10], [12, 0]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 16, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 8, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20}],
    [30, 20], [30, 20]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 46, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30},
     {'id': 9, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30}],
    [40, 10], [30, 20]],
   [None, 10])]]
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: pickup-anchored surge[4, 20][None, 10]Failed
partial repair probe: pickup-anchored surge[6, 20][25, 12]Failed
second regression[None, 10][34, 20]Failed
normal control 1[None, 10][None, 10]Passed
normal control 2[None, 10][None, 10]Passed
normal control 3[None, 10][None, 10]Passed
normal control 4[None, 10][None, 10]Passed

SHA-256 / 5a9e30b89c6411566f5e8769102d66965ad22f7192a2ac5e71ba48ff26753bfe

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(zones, pickup, dropoff):
    best = None
    for z in zones:
        if any(z['x0'] <= p[0] < z['x1'] and z['y0'] <= p[1] < z['y1'] for p in (pickup, dropoff)):
            k = (z['priority'], z['mult'], -z['id'])
            if best is None or k > best[0]:
                best = (k, z)
    if best is None:
        return [None, 10]
    return [best[1]['id'], best[1]['mult']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: pickup-anchored surge',
   [[{'id': 4, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10}], [40, 10], [5, 0]],
   [None, 10]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 26, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},
     {'id': 6, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 24, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 41, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},
     {'id': 25, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}],
    [20, 30], [20, 12]],
   [25, 12]),
  ('second regression',
   [[{'id': 34, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},
     {'id': 32, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 10},
     {'id': 44, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20}],
    [0, 12], [15, 20]],
   [34, 20]),
  ('normal control 1',
   [[{'id': 30, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 20}], [10, 30], [0, 10]],
   [None, 10]),
  ('normal control 2',
   [[{'id': 45, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30}], [35, 12], [10, 12]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 37, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20}], [40, 30], [15, 10]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 49, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20},
     {'id': 12, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},
     {'id': 17, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20}],
    [30, 26], [40, 12]],
   [None, 10])],
 [('regression: pickup-anchored surge',
   [[{'id': 49, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40},
     {'id': 19, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 42, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30},
     {'id': 37, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30}],
    [5, 12], [10, 20]],
   [19, 15]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 2, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30},
     {'id': 23, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},
     {'id': 7, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 37, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20}],
    [27, 0], [20, 20]],
   [None, 10]),
  ('second regression',
   [[{'id': 21, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 40},
     {'id': 29, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},
     {'id': 7, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40},
     {'id': 33, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30}],
    [30, 20], [0, 30]],
   [21, 12]),
  ('normal control 1',
   [[{'id': 27, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}], [40, 12], [30, 10]],
   [None, 10]),
  ('normal control 2',
   [[{'id': 15, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30},
     {'id': 16, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},
     {'id': 23, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],
    [15, 5], [40, 30]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 19, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20},
     {'id': 6, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 30},
     {'id': 50, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30}],
    [40, 10], [10, 30]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 20, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40},
     {'id': 44, 'mult': 20, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20}],
    [15, 20], [40, 0]],
   [None, 10])],
 [('regression: pickup-anchored surge',
   [[{'id': 8, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30},
     {'id': 41, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 15, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20}],
    [32, 10], [5, 20]],
   [None, 10]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 35, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20},
     {'id': 34, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30},
     {'id': 12, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 10}],
    [40, 30], [10, 0]],
   [None, 10]),
  ('second regression',
   [[{'id': 46, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 19, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 47, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30},
     {'id': 39, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 48, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10}],
    [15, 10], [40, 12]],
   [19, 15]),
  ('normal control 1',
   [[{'id': 25, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20},
     {'id': 6, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 10},
     {'id': 37, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20}],
    [0, 10], [0, 10]],
   [25, 12]),
  ('normal control 2',
   [[{'id': 23, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30},
     {'id': 11, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},
     {'id': 3, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40},
     {'id': 30, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20},
     {'id': 2, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40}],
    [40, 23], [16, 0]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 30, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 40},
     {'id': 16, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20},
     {'id': 23, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40}],
    [40, 26], [5, 10]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 14, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 40, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30}],
    [35, 20], [40, 10]],
   [None, 10])],
 [('regression: pickup-anchored surge',
   [[{'id': 14, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 5, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 29, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20}],
    [0, 10], [40, 12]],
   [5, 12]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 9, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},
     {'id': 36, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40}],
    [20, 5], [19, 25]],
   [None, 10]),
  ('second regression',
   [[{'id': 11, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20},
     {'id': 29, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30},
     {'id': 7, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}],
    [15, 0], [40, 0]],
   [11, 12]),
  ('normal control 1',
   [[{'id': 37, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 10},
     {'id': 45, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},
     {'id': 15, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 13, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 10},
     {'id': 11, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40}],
    [0, 30], [0, 38]],
   [11, 12]),
  ('normal control 2',
   [[{'id': 19, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10}], [10, 10], [5, 0]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 13, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},
     {'id': 12, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 27, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30}],
    [20, 30], [30, 2]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 41, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20},
     {'id': 45, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 30},
     {'id': 10, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30}],
    [20, 12], [20, 10]],
   [None, 10])],
 [('regression: pickup-anchored surge',
   [[{'id': 23, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},
     {'id': 10, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30},
     {'id': 12, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 14, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},
     {'id': 30, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}],
    [5, 20], [26, 10]],
   [23, 15]),
  ('partial repair probe: pickup-anchored surge',
   [[{'id': 35, 'mult': 20, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 19, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20}],
    [5, 20], [15, 10]],
   [None, 10]),
  ('second regression',
   [[{'id': 31, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},
     {'id': 39, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 20},
     {'id': 49, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20},
     {'id': 37, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20}],
    [15, 0], [5, 10]],
   [49, 15]),
  ('normal control 1',
   [[{'id': 11, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20}], [0, 37], [22, 30]],
   [None, 10]),
  ('normal control 2',
   [[{'id': 1, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30}], [15, 10], [12, 0]],
   [None, 10]),
  ('normal control 3',
   [[{'id': 16, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20},
     {'id': 8, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20}],
    [30, 20], [30, 20]],
   [None, 10]),
  ('normal control 4',
   [[{'id': 46, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30},
     {'id': 9, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30}],
    [40, 10], [30, 20]],
   [None, 10])]]
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: pickup-anchored surge[4, 20][None, 10]Failed
partial repair probe: pickup-anchored surge[6, 20][25, 12]Failed
second regression[34, 20][34, 20]Passed
normal control 1[None, 10][None, 10]Passed
normal control 2[None, 10][None, 10]Passed
normal control 3[None, 10][None, 10]Passed
normal control 4[None, 10][None, 10]Passed

SHA-256 / e94f7a0d85328bccc9bdc657821514b53b0d77591b972bb49c1d1054be430ca6

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

Case digest / 6de8528e66bc18142c21dd3f6a415e1621e2986693ba16c71126b56e49745bfc