{"abstract":"A pickup on the border between two zones picks up the neighbor's surge.","category":"Ride-hailing fare and surge pricing","checks":7,"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].","contract_signature":"zones, pickup, dropoff","evaluation_group":"w2-ride-hailing-fare-surge-surge-zone-lookup","failed_approach":"Opening only the x axis still double-assigns horizontal borders.","family":"w2-ride-hailing-fare-surge-surge-zone-lookup-half-open-borders","id":"FA-85471","implementations":{"attempt":{"sha256":"91c182e8c403a1526a0695fb69cfaf7b1ec44e01eca3baa4704f2b5e0f549ed6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(zones, pickup, dropoff):\n    best = None\n    for z in zones:\n        if z['x0'] <= pickup[0] < z['x1'] and z['y0'] <= pickup[1] <= z['y1']:\n            k = (z['priority'], z['mult'], -z['id'])\n            if best is None or k > best[0]:\n                best = (k, z)\n    if best is None:\n        return [None, 10]\n    return [best[1]['id'], best[1]['mult']]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: half-open borders',\n   [[{'id': 29, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20},\n     {'id': 5, 'mult': 20, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 9, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 4, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 6, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],\n    [30, 20], [15, 12]],\n   [None, 10]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 39, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},\n     {'id': 22, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}],\n    [28, 30], [20, 20]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 19, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},\n     {'id': 42, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 3, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 10}],\n    [40, 30], [21, 10]],\n   [None, 10]),\n  ('normal control 1',\n   [[{'id': 17, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20},\n     {'id': 20, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 50, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},\n     {'id': 49, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},\n     {'id': 34, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20}],\n    [30, 0], [28, 31]],\n   [None, 10]),\n  ('normal control 2',\n   [[{'id': 33, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20},\n     {'id': 1, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 13, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 3, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30}],\n    [5, 12], [15, 0]],\n   [None, 10]),\n  ('normal control 3',\n   [[{'id': 32, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 10},\n     {'id': 37, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 30}],\n    [0, 5], [40, 20]],\n   [32, 15]),\n  ('normal control 4',\n   [[{'id': 43, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 24, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 20},\n     {'id': 8, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40},\n     {'id': 15, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 18, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40}],\n    [10, 0], [10, 30]],\n   [15, 20])],\n [('regression: half-open borders',\n   [[{'id': 30, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20},\n     {'id': 33, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 23, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],\n    [10, 10], [5, 12]],\n   [None, 10]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 27, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40},\n     {'id': 25, 'mult': 20, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 20, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 16, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},\n     {'id': 24, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 20}],\n    [15, 30], [40, 10]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 9, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20},\n     {'id': 20, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},\n     {'id': 46, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 13, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40}],\n    [10, 10], [20, 30]],\n   [46, 12]),\n  ('normal control 1',\n   [[{'id': 44, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 14, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 30, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30}],\n    [15, 0], [15, 10]],\n   [None, 10]),\n  ('normal control 2',\n   [[{'id': 33, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20}], [30, 23], [40, 20]],\n   [None, 10]),\n  ('normal control 3',\n   [[{'id': 7, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 4, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 30, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 20, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30}],\n    [0, 0], [0, 5]],\n   [7, 15]),\n  ('normal control 4',\n   [[{'id': 2, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 31, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 26, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},\n     {'id': 5, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}],\n    [29, 0], [15, 30]],\n   [26, 20])],\n [('regression: half-open borders',\n   [[{'id': 27, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}], [15, 30], [20, 30]],\n   [None, 10]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 31, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20}], [16, 20], [10, 12]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 39, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30},\n     {'id': 50, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 10},\n     {'id': 22, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],\n    [20, 0], [10, 5]],\n   [None, 10]),\n  ('normal control 1',\n   [[{'id': 33, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 49, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}],\n    [15, 12], [10, 5]],\n   [33, 12]),\n  ('normal control 2',\n   [[{'id': 44, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20}], [22, 20], [40, 30]],\n   [None, 10]),\n  ('normal control 3',\n   [[{'id': 46, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 4, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 33, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 40},\n     {'id': 26, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30}],\n    [0, 31], [20, 10]],\n   [46, 15]),\n  ('normal control 4',\n   [[{'id': 18, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30}], [31, 0], [0, 20]],\n   [None, 10])],\n [('regression: half-open borders',\n   [[{'id': 18, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 26, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},\n     {'id': 5, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20},\n     {'id': 19, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30}],\n    [2, 10], [20, 0]],\n   [18, 20]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 50, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30},\n     {'id': 42, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20},\n     {'id': 20, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 10},\n     {'id': 16, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 10}],\n    [27, 10], [20, 17]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 47, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20},\n     {'id': 22, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20},\n     {'id': 25, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40}],\n    [10, 20], [10, 0]],\n   [25, 15]),\n  ('normal control 1',\n   [[{'id': 12, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}], [5, 10], [30, 20]],\n   [None, 10]),\n  ('normal control 2',\n   [[{'id': 3, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},\n     {'id': 9, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 20, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20},\n     {'id': 8, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 49, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],\n    [0, 12], [5, 30]],\n   [3, 20]),\n  ('normal control 3',\n   [[{'id': 7, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 10},\n     {'id': 2, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},\n     {'id': 33, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30},\n     {'id': 45, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20}],\n    [40, 23], [20, 10]],\n   [None, 10]),\n  ('normal control 4',\n   [[{'id': 15, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 29, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},\n     {'id': 18, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30}],\n    [15, 5], [15, 12]],\n   [None, 10])],\n [('regression: half-open borders',\n   [[{'id': 6, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30},\n     {'id': 47, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20},\n     {'id': 21, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 40},\n     {'id': 19, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 10}],\n    [40, 5], [15, 20]],\n   [None, 10]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 18, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 8, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30},\n     {'id': 17, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 6, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30}],\n    [10, 30], [40, 20]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 46, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 24, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 25, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 34, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10}],\n    [20, 12], [0, 20]],\n   [None, 10]),\n  ('normal control 1',\n   [[{'id': 13, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},\n     {'id': 20, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 7, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30}],\n    [40, 10], [30, 0]],\n   [None, 10]),\n  ('normal control 2',\n   [[{'id': 34, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},\n     {'id': 10, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 6, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}],\n    [0, 10], [13, 0]],\n   [None, 10]),\n  ('normal control 3',\n   [[{'id': 28, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20}], [5, 14], [10, 8]],\n   [28, 15]),\n  ('normal control 4',\n   [[{'id': 50, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},\n     {'id': 47, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20}],\n    [0, 5], [20, 12]],\n   [None, 10])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"a2d12098121e3a3fa9b9034d0aee4e61b525edc02d2f3863831f46e2bcdfbc1c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(zones, pickup, dropoff):\n    best = None\n    for z in zones:\n        if z['x0'] <= pickup[0] <= z['x1'] and z['y0'] <= pickup[1] <= z['y1']:\n            k = (z['priority'], z['mult'], -z['id'])\n            if best is None or k > best[0]:\n                best = (k, z)\n    if best is None:\n        return [None, 10]\n    return [best[1]['id'], best[1]['mult']]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: half-open borders',\n   [[{'id': 29, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20},\n     {'id': 5, 'mult': 20, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 9, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 4, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 6, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],\n    [30, 20], [15, 12]],\n   [None, 10]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 39, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},\n     {'id': 22, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}],\n    [28, 30], [20, 20]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 19, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 30},\n     {'id': 42, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 3, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 10}],\n    [40, 30], [21, 10]],\n   [None, 10]),\n  ('normal control 1',\n   [[{'id': 17, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 20},\n     {'id': 20, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 50, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},\n     {'id': 49, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},\n     {'id': 34, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20}],\n    [30, 0], [28, 31]],\n   [None, 10]),\n  ('normal control 2',\n   [[{'id': 33, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20},\n     {'id': 1, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 13, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 3, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30}],\n    [5, 12], [15, 0]],\n   [None, 10]),\n  ('normal control 3',\n   [[{'id': 32, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 10},\n     {'id': 37, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 30}],\n    [0, 5], [40, 20]],\n   [32, 15]),\n  ('normal control 4',\n   [[{'id': 43, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 24, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 20},\n     {'id': 8, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40},\n     {'id': 15, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 18, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40}],\n    [10, 0], [10, 30]],\n   [15, 20])],\n [('regression: half-open borders',\n   [[{'id': 30, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20},\n     {'id': 33, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 23, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],\n    [10, 10], [5, 12]],\n   [None, 10]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 27, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40},\n     {'id': 25, 'mult': 20, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 20, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 16, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},\n     {'id': 24, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 20}],\n    [15, 30], [40, 10]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 9, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20},\n     {'id': 20, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},\n     {'id': 46, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 13, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 40}],\n    [10, 10], [20, 30]],\n   [46, 12]),\n  ('normal control 1',\n   [[{'id': 44, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 14, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 30, 'mult': 12, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30}],\n    [15, 0], [15, 10]],\n   [None, 10]),\n  ('normal control 2',\n   [[{'id': 33, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20}], [30, 23], [40, 20]],\n   [None, 10]),\n  ('normal control 3',\n   [[{'id': 7, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 4, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 30, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 20, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30}],\n    [0, 0], [0, 5]],\n   [7, 15]),\n  ('normal control 4',\n   [[{'id': 2, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 31, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 26, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},\n     {'id': 5, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}],\n    [29, 0], [15, 30]],\n   [26, 20])],\n [('regression: half-open borders',\n   [[{'id': 27, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}], [15, 30], [20, 30]],\n   [None, 10]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 31, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20}], [16, 20], [10, 12]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 39, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30},\n     {'id': 50, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 10},\n     {'id': 22, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],\n    [20, 0], [10, 5]],\n   [None, 10]),\n  ('normal control 1',\n   [[{'id': 33, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 49, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}],\n    [15, 12], [10, 5]],\n   [33, 12]),\n  ('normal control 2',\n   [[{'id': 44, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20}], [22, 20], [40, 30]],\n   [None, 10]),\n  ('normal control 3',\n   [[{'id': 46, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 4, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 33, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 40},\n     {'id': 26, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30}],\n    [0, 31], [20, 10]],\n   [46, 15]),\n  ('normal control 4',\n   [[{'id': 18, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30}], [31, 0], [0, 20]],\n   [None, 10])],\n [('regression: half-open borders',\n   [[{'id': 18, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 26, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},\n     {'id': 5, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20},\n     {'id': 19, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30}],\n    [2, 10], [20, 0]],\n   [18, 20]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 50, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30},\n     {'id': 42, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20},\n     {'id': 20, 'mult': 15, 'priority': 2, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 10},\n     {'id': 16, 'mult': 20, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 10}],\n    [27, 10], [20, 17]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 47, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20},\n     {'id': 22, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20},\n     {'id': 25, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40}],\n    [10, 20], [10, 0]],\n   [25, 15]),\n  ('normal control 1',\n   [[{'id': 12, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 40}], [5, 10], [30, 20]],\n   [None, 10]),\n  ('normal control 2',\n   [[{'id': 3, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},\n     {'id': 9, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 20, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 20},\n     {'id': 8, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 49, 'mult': 12, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 40}],\n    [0, 12], [5, 30]],\n   [3, 20]),\n  ('normal control 3',\n   [[{'id': 7, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 10},\n     {'id': 2, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10},\n     {'id': 33, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30},\n     {'id': 45, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 20}],\n    [40, 23], [20, 10]],\n   [None, 10]),\n  ('normal control 4',\n   [[{'id': 15, 'mult': 15, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 10, 'y1': 30},\n     {'id': 29, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 20},\n     {'id': 18, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 10, 'y1': 30}],\n    [15, 5], [15, 12]],\n   [None, 10])],\n [('regression: half-open borders',\n   [[{'id': 6, 'mult': 20, 'priority': 2, 'x0': 0, 'x1': 10, 'y0': 20, 'y1': 30},\n     {'id': 47, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 20},\n     {'id': 21, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 20, 'y1': 40},\n     {'id': 19, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 0, 'y1': 10}],\n    [40, 5], [15, 20]],\n   [None, 10]),\n  ('partial repair probe: half-open borders',\n   [[{'id': 18, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 20},\n     {'id': 8, 'mult': 15, 'priority': 2, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30},\n     {'id': 17, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 6, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 40, 'y0': 10, 'y1': 30}],\n    [10, 30], [40, 20]],\n   [None, 10]),\n  ('second regression',\n   [[{'id': 46, 'mult': 20, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 24, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 25, 'mult': 15, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 20, 'y1': 30},\n     {'id': 34, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 10}],\n    [20, 12], [0, 20]],\n   [None, 10]),\n  ('normal control 1',\n   [[{'id': 13, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 20, 'y0': 20, 'y1': 30},\n     {'id': 20, 'mult': 12, 'priority': 2, 'x0': 10, 'x1': 20, 'y0': 0, 'y1': 20},\n     {'id': 7, 'mult': 12, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 10, 'y1': 30}],\n    [40, 10], [30, 0]],\n   [None, 10]),\n  ('normal control 2',\n   [[{'id': 34, 'mult': 12, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},\n     {'id': 10, 'mult': 20, 'priority': 1, 'x0': 10, 'x1': 20, 'y0': 20, 'y1': 40},\n     {'id': 6, 'mult': 15, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 10, 'y1': 30}],\n    [0, 10], [13, 0]],\n   [None, 10]),\n  ('normal control 3',\n   [[{'id': 28, 'mult': 15, 'priority': 1, 'x0': 0, 'x1': 10, 'y0': 0, 'y1': 20}], [5, 14], [10, 8]],\n   [28, 15]),\n  ('normal control 4',\n   [[{'id': 50, 'mult': 20, 'priority': 1, 'x0': 20, 'x1': 30, 'y0': 0, 'y1': 10},\n     {'id': 47, 'mult': 12, 'priority': 1, 'x0': 10, 'x1': 30, 'y0': 0, 'y1': 20}],\n    [0, 5], [20, 12]],\n   [None, 10])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-ride-hailing-fare-surge-surge-zone-lookup-half-open-borders","generated_at":"2026-09-29T14:50:40.626316+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Ride-hailing prices are computed per trip at scale; ordering, unit and boundary slips become systematic over- or under-charging.","root_cause":"Zone containment uses closed intervals on both axes.","sha256":"e6e2ed3cd74f05bb0ab7cde03695b9b6e3453b526ba610dd95276f15b8d2f9e7","title":"Shared zone border belongs to both zones · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.35,"exit_code":1,"observations":[{"actual":[29,20],"check":"regression: half-open borders","expected":[null,10],"passed":false},{"actual":[39,20],"check":"partial repair probe: half-open borders","expected":[null,10],"passed":false},{"actual":[null,10],"check":"second regression","expected":[null,10],"passed":true},{"actual":[null,10],"check":"normal control 1","expected":[null,10],"passed":true},{"actual":[null,10],"check":"normal control 2","expected":[null,10],"passed":true},{"actual":[32,15],"check":"normal control 3","expected":[32,15],"passed":true},{"actual":[15,20],"check":"normal control 4","expected":[15,20],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: half-open borders\", \"actual\": [29, 20], \"expected\": [null, 10], \"passed\": false}, {\"check\": \"partial repair probe: half-open borders\", \"actual\": [39, 20], \"expected\": [null, 10], \"passed\": false}, {\"check\": \"second regression\", \"actual\": [null, 10], \"expected\": [null, 10], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [null, 10], \"expected\": [null, 10], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [null, 10], \"expected\": [null, 10], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [32, 15], \"expected\": [32, 15], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [15, 20], \"expected\": [15, 20], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.655,"exit_code":1,"observations":[{"actual":[29,20],"check":"regression: half-open borders","expected":[null,10],"passed":false},{"actual":[39,20],"check":"partial repair probe: half-open borders","expected":[null,10],"passed":false},{"actual":[19,15],"check":"second regression","expected":[null,10],"passed":false},{"actual":[null,10],"check":"normal control 1","expected":[null,10],"passed":true},{"actual":[null,10],"check":"normal control 2","expected":[null,10],"passed":true},{"actual":[32,15],"check":"normal control 3","expected":[32,15],"passed":true},{"actual":[15,20],"check":"normal control 4","expected":[15,20],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: half-open borders\", \"actual\": [29, 20], \"expected\": [null, 10], \"passed\": false}, {\"check\": \"partial repair probe: half-open borders\", \"actual\": [39, 20], \"expected\": [null, 10], \"passed\": false}, {\"check\": \"second regression\", \"actual\": [19, 15], \"expected\": [null, 10], \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": [null, 10], \"expected\": [null, 10], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [null, 10], \"expected\": [null, 10], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [32, 15], \"expected\": [32, 15], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [15, 20], \"expected\": [15, 20], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}