FAILURE MAP
← Case archive

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

GPS jump becomes the new anchor · case 01

After a spurious jump, the next genuine segment is measured from the bogus point.

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

ROOT CAUSE

A rejected teleport ping still replaces the anchor.

VERIFIED REPAIR

Discard the teleport ping and keep the previous anchor.

Unsuccessful approach: Clearing the anchor loses the segment from the last good point.

Case contract

Billable distance from GPS pings [t seconds, x m, y m, accuracy m, paused]. Sort by time (stable); drop pings with accuracy worse than max_acc; among remaining pings with the same timestamp keep the first. Walk the kept pings with an anchor: segment length is the floored Euclidean distance (isqrt); if it implies a speed above max_speed m/s the ping is discarded and the anchor stays; otherwise the segment is billed unless either endpoint is paused, and the anchor moves. Return total meters.

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
import math
N = 1
observations = []
def solve(pings, max_acc, max_speed):
    kept = []
    seen = set()
    for p in sorted(pings, key=lambda p: p[0]):
        if p[3] > max_acc:
            continue
        if p[0] in seen:
            continue
        seen.add(p[0])
        kept.append(p)
    total = 0
    anchor = None
    for p in kept:
        if anchor is None:
            anchor = p
            continue
        d = math.isqrt((p[1] - anchor[1]) ** 2 + (p[2] - anchor[2]) ** 2)
        dt = p[0] - anchor[0]
        if d > max_speed * dt:
            anchor = p
            continue
        if not (p[4] or anchor[4]):
            total += d
        anchor = p
    return total
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: teleport anchor',
   [[[5, 60, 0, 25, False], [5, 460, 20, 20, False], [10, 520, 40, 5, False], [20, 920, 40, 20, True],
     [25, 920, 25, 60, True], [30, 965, 25, 20, False], [35, 965, 25, 25, False]],
    20, 30],
   508),
  ('partial repair probe: teleport anchor',
   [[[0, 45, -15, 10, False], [0, 445, -15, 10, False], [5, 505, 18, 20, False], [5, 550, 3, 25, False],
     [10, 595, 23, 20, False], [15, 595, 56, 20, False], [15, 625, 56, 5, False], [20, 670, 89, 20, True]],
    20, 30],
   0),
  ('second regression',
   [[[0, 45, 0, 5, False], [5, 445, 20, 10, False], [10, 490, 20, 5, False], [10, 890, 53, 20, False],
     [15, 1290, 86, 25, False], [20, 1320, 86, 60, False]],
    20, 30],
   0),
  ('normal control 1', [[[5, 0, 33, 60, True], [10, 45, 66, 25, True], [15, 90, 86, 25, False]], 20, 30], 0),
  ('normal control 2',
   [[[5, 30, -15, 25, False], [5, 430, -15, 20, True], [10, 460, -30, 20, False], [15, 460, -45, 60, False],
     [25, 460, -25, 25, False], [25, 860, -40, 20, True], [25, 920, -7, 25, False]],
    20, 30],
   0),
  ('normal control 3',
   [[[5, 0, 0, 25, False], [5, 0, -15, 20, False], [5, 30, 18, 20, False], [10, 90, 38, 20, False],
     [15, 150, 23, 20, False], [15, 210, 56, 5, False]],
    20, 30],
   165),
  ('normal control 4',
   [[[0, 30, 20, 20, False], [10, 90, 53, 5, True], [15, 120, 53, 10, False], [15, 150, 86, 20, False]], 20,
    30],
   0)],
 [('regression: teleport anchor',
   [[[35, 1335, -5, 5, False], [35, 1335, -20, 60, False], [20, 445, 5, 5, False], [30, 1290, 10, 25, True],
     [25, 490, 5, 5, False], [25, 890, -10, 60, False], [15, 400, -15, 10, False], [10, 0, 0, 20, False]],
    20, 30],
   0),
  ('partial repair probe: teleport anchor',
   [[[5, 60, 33, 20, False], [15, 105, 33, 10, False], [20, 505, 53, 25, False], [25, 905, 38, 20, False],
     [30, 935, 23, 60, False], [35, 935, 8, 25, False], [45, 935, -7, 5, False]],
    20, 30],
   875),
  ('second regression',
   [[[10, 30, 33, 5, False], [10, 430, 66, 20, True], [20, 430, 66, 20, False], [30, 430, 99, 10, False],
     [30, 430, 84, 10, True], [40, 830, 84, 5, False], [45, 860, 84, 20, False], [45, 920, 69, 10, True]],
    20, 30],
   835),
  ('normal control 1',
   [[[0, 60, 33, 20, True], [5, 120, 53, 25, True], [15, 165, 38, 60, False], [15, 195, 23, 20, False],
     [25, 195, 8, 5, False], [30, 240, 41, 60, False], [30, 270, 74, 10, False]],
    20, 30],
   114),
  ('normal control 2',
   [[[0, 30, 0, 20, True], [0, 430, 20, 25, False], [5, 830, 5, 5, True], [15, 860, 5, 20, True]], 20, 30],
   0),
  ('normal control 3',
   [[[20, 860, 38, 25, False], [10, 860, 5, 25, False], [10, 460, 5, 60, False], [10, 400, 20, 25, False]],
    20, 30],
   0),
  ('normal control 4', [[[5, 60, 20, 25, False], [10, 105, 53, 10, False], [15, 165, 73, 20, True]], 20, 30],
   0)],
 [('regression: teleport anchor',
   [[[15, 800, 40, 10, False], [5, 400, 20, 20, True], [20, 860, 40, 20, False], [25, 860, 60, 10, False]],
    20, 30],
   0),
  ('partial repair probe: teleport anchor',
   [[[25, 430, 51, 10, False], [25, 830, 71, 25, True], [10, 430, 18, 10, False], [0, 30, -15, 20, False],
     [20, 430, 51, 60, False]],
    20, 30],
   405),
  ('second regression',
   [[[5, 60, 33, 25, True], [15, 90, 18, 25, False], [20, 150, 38, 10, False], [30, 550, 38, 20, False],
     [35, 610, 58, 20, False], [45, 670, 91, 5, False]],
    20, 30],
   522),
  ('normal control 1',
   [[[30, 195, 23, 10, False], [30, 225, 43, 5, True], [30, 150, 38, 60, False], [15, 120, 33, 10, False],
     [25, 120, 18, 10, True], [30, 270, 28, 10, False], [5, 60, 33, 60, False]],
    20, 30],
   0),
  ('normal control 2', [[[15, 430, 5, 60, True], [10, 400, -15, 20, True], [20, 460, 25, 5, True]], 20, 30],
   0),
  ('normal control 3',
   [[[5, 0, 20, 20, True], [15, 0, 5, 20, False], [20, 30, 5, 5, True], [30, 75, 5, 60, False]], 20, 30], 0),
  ('normal control 4',
   [[[5, 90, 53, 10, False], [20, 210, 106, 10, False], [10, 120, 73, 20, False], [0, 45, 33, 60, False],
     [15, 150, 73, 20, False]],
    20, 30],
   134)],
 [('regression: teleport anchor',
   [[[0, 30, 33, 5, False], [5, 430, 66, 20, True], [15, 830, 51, 60, True], [15, 860, 84, 25, False],
     [25, 860, 104, 20, True], [30, 890, 89, 20, False]],
    20, 30],
   861),
  ('partial repair probe: teleport anchor',
   [[[10, 400, 0, 5, False], [15, 800, 33, 20, True], [20, 1200, 53, 10, False], [25, 1600, 38, 60, False],
     [30, 1600, 38, 20, True], [35, 1660, 58, 20, False], [45, 1660, 58, 20, False],
     [50, 1720, 78, 5, False]],
    20, 30],
   0),
  ('second regression',
   [[[5, 800, 25, 60, True], [20, 1200, 43, 5, False], [0, 400, 20, 5, False], [15, 1200, 58, 20, True],
     [25, 1660, 48, 10, False], [5, 800, 5, 5, False], [25, 1600, 28, 5, False], [10, 800, 58, 20, False]],
    20, 30],
   0),
  ('normal control 1',
   [[[10, 60, 0, 5, True], [15, 60, 33, 5, False], [20, 60, 66, 20, False], [25, 60, 86, 25, True],
     [30, 60, 86, 25, True], [35, 90, 119, 25, False]],
    20, 30],
   33),
  ('normal control 2', [[[20, 460, 66, 25, True], [5, 400, 0, 20, True], [15, 460, 33, 20, False]], 20, 30],
   0),
  ('normal control 3', [[[0, 30, 20, 25, False], [5, 430, 5, 20, True], [5, 490, -10, 20, False]], 20, 30],
   0),
  ('normal control 4',
   [[[15, 460, 53, 10, False], [5, 60, 20, 60, True], [20, 505, 106, 60, True], [20, 505, 73, 20, False]], 20,
    30],
   49)],
 [('regression: teleport anchor',
   [[[30, 580, 51, 20, False], [10, 490, 66, 5, False], [10, 90, 33, 10, False], [5, 45, 33, 10, False],
     [20, 550, 66, 20, False]],
    20, 30],
   535),
  ('partial repair probe: teleport anchor',
   [[[10, 60, 20, 10, False], [15, 105, 5, 5, False], [50, 1365, 76, 10, False], [30, 905, 25, 60, False],
     [20, 505, 5, 20, True], [40, 1335, 91, 20, False], [5, 60, 0, 20, False], [30, 935, 58, 25, False]],
    20, 30],
   67),
  ('second regression', [[[5, 0, 20, 20, False], [10, 400, 53, 5, False], [15, 445, 38, 20, False]], 20, 30],
   0),
  ('normal control 1',
   [[[5, 45, 0, 10, True], [15, 75, 33, 25, False], [20, 120, 53, 5, False], [25, 120, 53, 20, False],
     [30, 120, 73, 20, False], [30, 165, 73, 5, False], [35, 165, 106, 20, False]],
    20, 30],
   75),
  ('normal control 2', [[[10, 30, 0, 20, True], [15, 90, 20, 5, False], [20, 135, 40, 20, False]], 20, 30],
   49),
  ('normal control 3',
   [[[35, 210, 119, 20, False], [25, 150, 86, 20, False], [40, 240, 139, 5, False], [15, 90, 86, 20, True],
     [10, 0, 33, 25, False], [45, 270, 172, 20, False], [10, 45, 53, 10, False]],
    20, 30],
   148),
  ('normal control 4',
   [[[35, 165, 86, 5, False], [15, 75, 66, 60, False], [25, 120, 66, 20, False], [30, 165, 66, 25, True],
     [5, 45, 33, 20, True]],
    20, 30],
   49)]]
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: teleport anchor63508Failed
partial repair probe: teleport anchor1230Failed
second regression450Failed
normal control 100Passed
normal control 200Passed
normal control 3165165Passed
normal control 400Passed

SHA-256 / 480108fc5d36b5817deb89c5dbdb8ecd09040d5f0a4bce29e7110b8f3e764a10

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(pings, max_acc, max_speed):
    kept = []
    seen = set()
    for p in sorted(pings, key=lambda p: p[0]):
        if p[3] > max_acc:
            continue
        if p[0] in seen:
            continue
        seen.add(p[0])
        kept.append(p)
    total = 0
    anchor = None
    for p in kept:
        if anchor is None:
            anchor = p
            continue
        d = math.isqrt((p[1] - anchor[1]) ** 2 + (p[2] - anchor[2]) ** 2)
        dt = p[0] - anchor[0]
        if d > max_speed * dt:
            anchor = None
            continue
        if not (p[4] or anchor[4]):
            total += d
        anchor = p
    return total
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: teleport anchor',
   [[[5, 60, 0, 25, False], [5, 460, 20, 20, False], [10, 520, 40, 5, False], [20, 920, 40, 20, True],
     [25, 920, 25, 60, True], [30, 965, 25, 20, False], [35, 965, 25, 25, False]],
    20, 30],
   508),
  ('partial repair probe: teleport anchor',
   [[[0, 45, -15, 10, False], [0, 445, -15, 10, False], [5, 505, 18, 20, False], [5, 550, 3, 25, False],
     [10, 595, 23, 20, False], [15, 595, 56, 20, False], [15, 625, 56, 5, False], [20, 670, 89, 20, True]],
    20, 30],
   0),
  ('second regression',
   [[[0, 45, 0, 5, False], [5, 445, 20, 10, False], [10, 490, 20, 5, False], [10, 890, 53, 20, False],
     [15, 1290, 86, 25, False], [20, 1320, 86, 60, False]],
    20, 30],
   0),
  ('normal control 1', [[[5, 0, 33, 60, True], [10, 45, 66, 25, True], [15, 90, 86, 25, False]], 20, 30], 0),
  ('normal control 2',
   [[[5, 30, -15, 25, False], [5, 430, -15, 20, True], [10, 460, -30, 20, False], [15, 460, -45, 60, False],
     [25, 460, -25, 25, False], [25, 860, -40, 20, True], [25, 920, -7, 25, False]],
    20, 30],
   0),
  ('normal control 3',
   [[[5, 0, 0, 25, False], [5, 0, -15, 20, False], [5, 30, 18, 20, False], [10, 90, 38, 20, False],
     [15, 150, 23, 20, False], [15, 210, 56, 5, False]],
    20, 30],
   165),
  ('normal control 4',
   [[[0, 30, 20, 20, False], [10, 90, 53, 5, True], [15, 120, 53, 10, False], [15, 150, 86, 20, False]], 20,
    30],
   0)],
 [('regression: teleport anchor',
   [[[35, 1335, -5, 5, False], [35, 1335, -20, 60, False], [20, 445, 5, 5, False], [30, 1290, 10, 25, True],
     [25, 490, 5, 5, False], [25, 890, -10, 60, False], [15, 400, -15, 10, False], [10, 0, 0, 20, False]],
    20, 30],
   0),
  ('partial repair probe: teleport anchor',
   [[[5, 60, 33, 20, False], [15, 105, 33, 10, False], [20, 505, 53, 25, False], [25, 905, 38, 20, False],
     [30, 935, 23, 60, False], [35, 935, 8, 25, False], [45, 935, -7, 5, False]],
    20, 30],
   875),
  ('second regression',
   [[[10, 30, 33, 5, False], [10, 430, 66, 20, True], [20, 430, 66, 20, False], [30, 430, 99, 10, False],
     [30, 430, 84, 10, True], [40, 830, 84, 5, False], [45, 860, 84, 20, False], [45, 920, 69, 10, True]],
    20, 30],
   835),
  ('normal control 1',
   [[[0, 60, 33, 20, True], [5, 120, 53, 25, True], [15, 165, 38, 60, False], [15, 195, 23, 20, False],
     [25, 195, 8, 5, False], [30, 240, 41, 60, False], [30, 270, 74, 10, False]],
    20, 30],
   114),
  ('normal control 2',
   [[[0, 30, 0, 20, True], [0, 430, 20, 25, False], [5, 830, 5, 5, True], [15, 860, 5, 20, True]], 20, 30],
   0),
  ('normal control 3',
   [[[20, 860, 38, 25, False], [10, 860, 5, 25, False], [10, 460, 5, 60, False], [10, 400, 20, 25, False]],
    20, 30],
   0),
  ('normal control 4', [[[5, 60, 20, 25, False], [10, 105, 53, 10, False], [15, 165, 73, 20, True]], 20, 30],
   0)],
 [('regression: teleport anchor',
   [[[15, 800, 40, 10, False], [5, 400, 20, 20, True], [20, 860, 40, 20, False], [25, 860, 60, 10, False]],
    20, 30],
   0),
  ('partial repair probe: teleport anchor',
   [[[25, 430, 51, 10, False], [25, 830, 71, 25, True], [10, 430, 18, 10, False], [0, 30, -15, 20, False],
     [20, 430, 51, 60, False]],
    20, 30],
   405),
  ('second regression',
   [[[5, 60, 33, 25, True], [15, 90, 18, 25, False], [20, 150, 38, 10, False], [30, 550, 38, 20, False],
     [35, 610, 58, 20, False], [45, 670, 91, 5, False]],
    20, 30],
   522),
  ('normal control 1',
   [[[30, 195, 23, 10, False], [30, 225, 43, 5, True], [30, 150, 38, 60, False], [15, 120, 33, 10, False],
     [25, 120, 18, 10, True], [30, 270, 28, 10, False], [5, 60, 33, 60, False]],
    20, 30],
   0),
  ('normal control 2', [[[15, 430, 5, 60, True], [10, 400, -15, 20, True], [20, 460, 25, 5, True]], 20, 30],
   0),
  ('normal control 3',
   [[[5, 0, 20, 20, True], [15, 0, 5, 20, False], [20, 30, 5, 5, True], [30, 75, 5, 60, False]], 20, 30], 0),
  ('normal control 4',
   [[[5, 90, 53, 10, False], [20, 210, 106, 10, False], [10, 120, 73, 20, False], [0, 45, 33, 60, False],
     [15, 150, 73, 20, False]],
    20, 30],
   134)],
 [('regression: teleport anchor',
   [[[0, 30, 33, 5, False], [5, 430, 66, 20, True], [15, 830, 51, 60, True], [15, 860, 84, 25, False],
     [25, 860, 104, 20, True], [30, 890, 89, 20, False]],
    20, 30],
   861),
  ('partial repair probe: teleport anchor',
   [[[10, 400, 0, 5, False], [15, 800, 33, 20, True], [20, 1200, 53, 10, False], [25, 1600, 38, 60, False],
     [30, 1600, 38, 20, True], [35, 1660, 58, 20, False], [45, 1660, 58, 20, False],
     [50, 1720, 78, 5, False]],
    20, 30],
   0),
  ('second regression',
   [[[5, 800, 25, 60, True], [20, 1200, 43, 5, False], [0, 400, 20, 5, False], [15, 1200, 58, 20, True],
     [25, 1660, 48, 10, False], [5, 800, 5, 5, False], [25, 1600, 28, 5, False], [10, 800, 58, 20, False]],
    20, 30],
   0),
  ('normal control 1',
   [[[10, 60, 0, 5, True], [15, 60, 33, 5, False], [20, 60, 66, 20, False], [25, 60, 86, 25, True],
     [30, 60, 86, 25, True], [35, 90, 119, 25, False]],
    20, 30],
   33),
  ('normal control 2', [[[20, 460, 66, 25, True], [5, 400, 0, 20, True], [15, 460, 33, 20, False]], 20, 30],
   0),
  ('normal control 3', [[[0, 30, 20, 25, False], [5, 430, 5, 20, True], [5, 490, -10, 20, False]], 20, 30],
   0),
  ('normal control 4',
   [[[15, 460, 53, 10, False], [5, 60, 20, 60, True], [20, 505, 106, 60, True], [20, 505, 73, 20, False]], 20,
    30],
   49)],
 [('regression: teleport anchor',
   [[[30, 580, 51, 20, False], [10, 490, 66, 5, False], [10, 90, 33, 10, False], [5, 45, 33, 10, False],
     [20, 550, 66, 20, False]],
    20, 30],
   535),
  ('partial repair probe: teleport anchor',
   [[[10, 60, 20, 10, False], [15, 105, 5, 5, False], [50, 1365, 76, 10, False], [30, 905, 25, 60, False],
     [20, 505, 5, 20, True], [40, 1335, 91, 20, False], [5, 60, 0, 20, False], [30, 935, 58, 25, False]],
    20, 30],
   67),
  ('second regression', [[[5, 0, 20, 20, False], [10, 400, 53, 5, False], [15, 445, 38, 20, False]], 20, 30],
   0),
  ('normal control 1',
   [[[5, 45, 0, 10, True], [15, 75, 33, 25, False], [20, 120, 53, 5, False], [25, 120, 53, 20, False],
     [30, 120, 73, 20, False], [30, 165, 73, 5, False], [35, 165, 106, 20, False]],
    20, 30],
   75),
  ('normal control 2', [[[10, 30, 0, 20, True], [15, 90, 20, 5, False], [20, 135, 40, 20, False]], 20, 30],
   49),
  ('normal control 3',
   [[[35, 210, 119, 20, False], [25, 150, 86, 20, False], [40, 240, 139, 5, False], [15, 90, 86, 20, True],
     [10, 0, 33, 25, False], [45, 270, 172, 20, False], [10, 45, 53, 10, False]],
    20, 30],
   148),
  ('normal control 4',
   [[[35, 165, 86, 5, False], [15, 75, 66, 60, False], [25, 120, 66, 20, False], [30, 165, 66, 25, True],
     [5, 45, 33, 20, True]],
    20, 30],
   49)]]
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: teleport anchor63508Failed
partial repair probe: teleport anchor330Failed
second regression00Passed
normal control 100Passed
normal control 200Passed
normal control 3165165Passed
normal control 400Passed

SHA-256 / 4f298a2a3e4ab5502e78df9e7c2ea9ab4f9b6383dd4aa2b9cea0bb47065e1178

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(pings, max_acc, max_speed):
    kept = []
    seen = set()
    for p in sorted(pings, key=lambda p: p[0]):
        if p[3] > max_acc:
            continue
        if p[0] in seen:
            continue
        seen.add(p[0])
        kept.append(p)
    total = 0
    anchor = None
    for p in kept:
        if anchor is None:
            anchor = p
            continue
        d = math.isqrt((p[1] - anchor[1]) ** 2 + (p[2] - anchor[2]) ** 2)
        dt = p[0] - anchor[0]
        if d > max_speed * dt:
            continue
        if not (p[4] or anchor[4]):
            total += d
        anchor = p
    return total
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: teleport anchor',
   [[[5, 60, 0, 25, False], [5, 460, 20, 20, False], [10, 520, 40, 5, False], [20, 920, 40, 20, True],
     [25, 920, 25, 60, True], [30, 965, 25, 20, False], [35, 965, 25, 25, False]],
    20, 30],
   508),
  ('partial repair probe: teleport anchor',
   [[[0, 45, -15, 10, False], [0, 445, -15, 10, False], [5, 505, 18, 20, False], [5, 550, 3, 25, False],
     [10, 595, 23, 20, False], [15, 595, 56, 20, False], [15, 625, 56, 5, False], [20, 670, 89, 20, True]],
    20, 30],
   0),
  ('second regression',
   [[[0, 45, 0, 5, False], [5, 445, 20, 10, False], [10, 490, 20, 5, False], [10, 890, 53, 20, False],
     [15, 1290, 86, 25, False], [20, 1320, 86, 60, False]],
    20, 30],
   0),
  ('normal control 1', [[[5, 0, 33, 60, True], [10, 45, 66, 25, True], [15, 90, 86, 25, False]], 20, 30], 0),
  ('normal control 2',
   [[[5, 30, -15, 25, False], [5, 430, -15, 20, True], [10, 460, -30, 20, False], [15, 460, -45, 60, False],
     [25, 460, -25, 25, False], [25, 860, -40, 20, True], [25, 920, -7, 25, False]],
    20, 30],
   0),
  ('normal control 3',
   [[[5, 0, 0, 25, False], [5, 0, -15, 20, False], [5, 30, 18, 20, False], [10, 90, 38, 20, False],
     [15, 150, 23, 20, False], [15, 210, 56, 5, False]],
    20, 30],
   165),
  ('normal control 4',
   [[[0, 30, 20, 20, False], [10, 90, 53, 5, True], [15, 120, 53, 10, False], [15, 150, 86, 20, False]], 20,
    30],
   0)],
 [('regression: teleport anchor',
   [[[35, 1335, -5, 5, False], [35, 1335, -20, 60, False], [20, 445, 5, 5, False], [30, 1290, 10, 25, True],
     [25, 490, 5, 5, False], [25, 890, -10, 60, False], [15, 400, -15, 10, False], [10, 0, 0, 20, False]],
    20, 30],
   0),
  ('partial repair probe: teleport anchor',
   [[[5, 60, 33, 20, False], [15, 105, 33, 10, False], [20, 505, 53, 25, False], [25, 905, 38, 20, False],
     [30, 935, 23, 60, False], [35, 935, 8, 25, False], [45, 935, -7, 5, False]],
    20, 30],
   875),
  ('second regression',
   [[[10, 30, 33, 5, False], [10, 430, 66, 20, True], [20, 430, 66, 20, False], [30, 430, 99, 10, False],
     [30, 430, 84, 10, True], [40, 830, 84, 5, False], [45, 860, 84, 20, False], [45, 920, 69, 10, True]],
    20, 30],
   835),
  ('normal control 1',
   [[[0, 60, 33, 20, True], [5, 120, 53, 25, True], [15, 165, 38, 60, False], [15, 195, 23, 20, False],
     [25, 195, 8, 5, False], [30, 240, 41, 60, False], [30, 270, 74, 10, False]],
    20, 30],
   114),
  ('normal control 2',
   [[[0, 30, 0, 20, True], [0, 430, 20, 25, False], [5, 830, 5, 5, True], [15, 860, 5, 20, True]], 20, 30],
   0),
  ('normal control 3',
   [[[20, 860, 38, 25, False], [10, 860, 5, 25, False], [10, 460, 5, 60, False], [10, 400, 20, 25, False]],
    20, 30],
   0),
  ('normal control 4', [[[5, 60, 20, 25, False], [10, 105, 53, 10, False], [15, 165, 73, 20, True]], 20, 30],
   0)],
 [('regression: teleport anchor',
   [[[15, 800, 40, 10, False], [5, 400, 20, 20, True], [20, 860, 40, 20, False], [25, 860, 60, 10, False]],
    20, 30],
   0),
  ('partial repair probe: teleport anchor',
   [[[25, 430, 51, 10, False], [25, 830, 71, 25, True], [10, 430, 18, 10, False], [0, 30, -15, 20, False],
     [20, 430, 51, 60, False]],
    20, 30],
   405),
  ('second regression',
   [[[5, 60, 33, 25, True], [15, 90, 18, 25, False], [20, 150, 38, 10, False], [30, 550, 38, 20, False],
     [35, 610, 58, 20, False], [45, 670, 91, 5, False]],
    20, 30],
   522),
  ('normal control 1',
   [[[30, 195, 23, 10, False], [30, 225, 43, 5, True], [30, 150, 38, 60, False], [15, 120, 33, 10, False],
     [25, 120, 18, 10, True], [30, 270, 28, 10, False], [5, 60, 33, 60, False]],
    20, 30],
   0),
  ('normal control 2', [[[15, 430, 5, 60, True], [10, 400, -15, 20, True], [20, 460, 25, 5, True]], 20, 30],
   0),
  ('normal control 3',
   [[[5, 0, 20, 20, True], [15, 0, 5, 20, False], [20, 30, 5, 5, True], [30, 75, 5, 60, False]], 20, 30], 0),
  ('normal control 4',
   [[[5, 90, 53, 10, False], [20, 210, 106, 10, False], [10, 120, 73, 20, False], [0, 45, 33, 60, False],
     [15, 150, 73, 20, False]],
    20, 30],
   134)],
 [('regression: teleport anchor',
   [[[0, 30, 33, 5, False], [5, 430, 66, 20, True], [15, 830, 51, 60, True], [15, 860, 84, 25, False],
     [25, 860, 104, 20, True], [30, 890, 89, 20, False]],
    20, 30],
   861),
  ('partial repair probe: teleport anchor',
   [[[10, 400, 0, 5, False], [15, 800, 33, 20, True], [20, 1200, 53, 10, False], [25, 1600, 38, 60, False],
     [30, 1600, 38, 20, True], [35, 1660, 58, 20, False], [45, 1660, 58, 20, False],
     [50, 1720, 78, 5, False]],
    20, 30],
   0),
  ('second regression',
   [[[5, 800, 25, 60, True], [20, 1200, 43, 5, False], [0, 400, 20, 5, False], [15, 1200, 58, 20, True],
     [25, 1660, 48, 10, False], [5, 800, 5, 5, False], [25, 1600, 28, 5, False], [10, 800, 58, 20, False]],
    20, 30],
   0),
  ('normal control 1',
   [[[10, 60, 0, 5, True], [15, 60, 33, 5, False], [20, 60, 66, 20, False], [25, 60, 86, 25, True],
     [30, 60, 86, 25, True], [35, 90, 119, 25, False]],
    20, 30],
   33),
  ('normal control 2', [[[20, 460, 66, 25, True], [5, 400, 0, 20, True], [15, 460, 33, 20, False]], 20, 30],
   0),
  ('normal control 3', [[[0, 30, 20, 25, False], [5, 430, 5, 20, True], [5, 490, -10, 20, False]], 20, 30],
   0),
  ('normal control 4',
   [[[15, 460, 53, 10, False], [5, 60, 20, 60, True], [20, 505, 106, 60, True], [20, 505, 73, 20, False]], 20,
    30],
   49)],
 [('regression: teleport anchor',
   [[[30, 580, 51, 20, False], [10, 490, 66, 5, False], [10, 90, 33, 10, False], [5, 45, 33, 10, False],
     [20, 550, 66, 20, False]],
    20, 30],
   535),
  ('partial repair probe: teleport anchor',
   [[[10, 60, 20, 10, False], [15, 105, 5, 5, False], [50, 1365, 76, 10, False], [30, 905, 25, 60, False],
     [20, 505, 5, 20, True], [40, 1335, 91, 20, False], [5, 60, 0, 20, False], [30, 935, 58, 25, False]],
    20, 30],
   67),
  ('second regression', [[[5, 0, 20, 20, False], [10, 400, 53, 5, False], [15, 445, 38, 20, False]], 20, 30],
   0),
  ('normal control 1',
   [[[5, 45, 0, 10, True], [15, 75, 33, 25, False], [20, 120, 53, 5, False], [25, 120, 53, 20, False],
     [30, 120, 73, 20, False], [30, 165, 73, 5, False], [35, 165, 106, 20, False]],
    20, 30],
   75),
  ('normal control 2', [[[10, 30, 0, 20, True], [15, 90, 20, 5, False], [20, 135, 40, 20, False]], 20, 30],
   49),
  ('normal control 3',
   [[[35, 210, 119, 20, False], [25, 150, 86, 20, False], [40, 240, 139, 5, False], [15, 90, 86, 20, True],
     [10, 0, 33, 25, False], [45, 270, 172, 20, False], [10, 45, 53, 10, False]],
    20, 30],
   148),
  ('normal control 4',
   [[[35, 165, 86, 5, False], [15, 75, 66, 60, False], [25, 120, 66, 20, False], [30, 165, 66, 25, True],
     [5, 45, 33, 20, True]],
    20, 30],
   49)]]
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: teleport anchor508508Passed
partial repair probe: teleport anchor00Passed
second regression00Passed
normal control 100Passed
normal control 200Passed
normal control 3165165Passed
normal control 400Passed

SHA-256 / 9a698ceccb479f51a4ef15418bef86c07f801cf06e21fa3a17b282ea680b050f

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

Case digest / 737a4c66e4a828c50497c275e0033e4b3660a7bb6a11e0b1315c7d32f86861e5