{"abstract":"Trips with many short segments bill a few more meters than the per-segment rule.","category":"Ride-hailing fare and surge pricing","checks":7,"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.","evaluation_group":"w2-ride-hailing-fare-surge-gps-trace-distance","failed_approach":"Rounding each segment to nearest meter still overbills fractional segments.","family":"w2-ride-hailing-fare-surge-gps-trace-distance-segment-floor","id":"FA-85541","implementations":{"attempt":{"sha256":"8cf6dd026d7014060f042293adfc97b5d114603fcafb5d941e62d66c3d17b29b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(pings, max_acc, max_speed):\n    kept = []\n    seen = set()\n    for p in sorted(pings, key=lambda p: p[0]):\n        if p[3] > max_acc:\n            continue\n        if p[0] in seen:\n            continue\n        seen.add(p[0])\n        kept.append(p)\n    total = 0\n    anchor = None\n    for p in kept:\n        if anchor is None:\n            anchor = p\n            continue\n        d = round(math.hypot(p[1] - anchor[1], p[2] - anchor[2]))\n        dt = p[0] - anchor[0]\n        if d > max_speed * dt:\n            continue\n        if not (p[4] or anchor[4]):\n            total += d\n        anchor = p\n    return total\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: segment floor',\n   [[[20, 475, 38, 5, False], [5, 75, 53, 5, False], [30, 505, 71, 5, False], [10, 475, 53, 20, True],\n     [40, 610, 76, 5, False], [35, 565, 56, 10, False], [5, 45, 20, 60, False]],\n    20, 30],\n   554),\n  ('partial repair probe: segment floor',\n   [[[5, 45, 33, 10, False], [10, 90, 66, 10, False], [10, 135, 86, 20, False], [15, 535, 71, 25, False],\n     [20, 535, 104, 20, False]],\n    20, 30],\n   55),\n  ('second regression',\n   [[[20, 520, 38, 20, True], [5, 30, -15, 5, False], [30, 965, 104, 5, False], [15, 490, 38, 25, False],\n     [5, 90, 18, 5, False], [0, 0, -15, 20, False], [25, 565, 71, 5, False]],\n    20, 30],\n   571),\n  ('normal control 1',\n   [[[30, 980, 83, 5, False], [25, 520, 43, 10, True], [15, 60, 38, 10, True], [5, 60, 18, 25, False],\n     [25, 490, 58, 5, False], [20, 90, 38, 20, False], [5, 60, 33, 25, False], [25, 580, 63, 20, True]],\n    20, 30],\n   0),\n  ('normal control 2',\n   [[[25, 550, 43, 20, True], [5, 460, 40, 20, False], [20, 550, 58, 20, False], [35, 655, 48, 60, False],\n     [10, 520, 73, 60, False], [0, 60, 20, 10, True], [25, 595, 28, 20, False], [40, 700, 68, 60, False]],\n    20, 30],\n   0),\n  ('normal control 3',\n   [[[30, 520, 53, 20, True], [20, 120, 53, 25, False], [40, 1025, 78, 25, False], [35, 625, 58, 25, False],\n     [10, 45, 33, 20, False], [35, 580, 38, 20, False], [15, 75, 33, 25, False]],\n    20, 30],\n   0),\n  ('normal control 4',\n   [[[0, 400, 33, 25, False], [10, 445, 66, 20, False], [15, 845, 99, 10, False], [20, 875, 132, 20, True],\n     [25, 875, 117, 20, False]],\n    20, 30],\n   433)],\n [('regression: segment floor',\n   [[[10, 45, 33, 20, False], [10, 90, 18, 60, True], [15, 135, 38, 60, False], [15, 180, 38, 60, False],\n     [20, 180, 23, 20, False], [25, 225, 56, 20, False], [30, 225, 41, 20, True]],\n    20, 30],\n   190),\n  ('partial repair probe: segment floor',\n   [[[5, 30, 33, 10, False], [10, 30, 33, 25, False], [15, 90, 18, 10, False]], 20, 30], 61),\n  ('second regression',\n   [[[40, 1365, 21, 25, False], [35, 1335, 36, 20, False], [30, 1230, 3, 25, False],\n     [15, 800, -15, 60, False], [45, 1425, 54, 10, False], [20, 830, 18, 25, False], [10, 400, 0, 60, False],\n     [35, 1275, 3, 20, False]],\n    20, 30],\n   91),\n  ('normal control 1', [[[10, 400, 20, 5, False], [15, 800, 5, 60, False], [5, 0, 20, 10, True]], 20, 30], 0),\n  ('normal control 2',\n   [[[0, 45, -15, 10, False], [30, 1010, 177, 20, False], [0, 90, 38, 20, False], [15, 210, 111, 20, False],\n     [0, 45, 5, 25, False], [10, 150, 91, 20, True], [5, 120, 71, 20, False], [25, 610, 144, 20, False]],\n    20, 30],\n   114),\n  ('normal control 3',\n   [[[30, 460, 18, 60, False], [20, 400, 18, 10, False], [10, 400, -15, 20, False], [40, 1260, 36, 25, False],\n     [35, 860, 51, 60, True], [50, 1260, 36, 20, False]],\n    20, 30],\n   893),\n  ('normal control 4', [[[0, 400, 0, 20, True], [5, 800, 33, 20, True], [5, 830, 33, 5, False]], 20, 30], 0)],\n [('regression: segment floor',\n   [[[5, 75, 66, 60, True], [25, 180, 69, 20, False], [35, 285, 89, 10, False], [30, 240, 69, 25, True],\n     [10, 135, 51, 60, True], [0, 45, 33, 20, False], [45, 315, 122, 60, False], [20, 135, 84, 5, False]],\n    20, 30],\n   256),\n  ('partial repair probe: segment floor',\n   [[[30, 460, 23, 20, False], [10, 30, 18, 10, False], [25, 460, 23, 25, False], [15, 60, 3, 60, False],\n     [5, 0, 33, 10, False]],\n    20, 30],\n   463),\n  ('second regression',\n   [[[5, 0, 33, 20, False], [5, 30, 53, 60, True], [5, 60, 38, 20, False], [10, 105, 71, 5, False],\n     [15, 105, 104, 20, False], [20, 505, 137, 20, False]],\n    20, 30],\n   144),\n  ('normal control 1',\n   [[[25, 75, 60, 25, False], [25, 75, 40, 20, False], [10, 45, 20, 10, False], [20, 45, 40, 20, True]], 20,\n    30],\n   0),\n  ('normal control 2',\n   [[[20, 30, 20, 20, True], [25, 30, 53, 20, False], [10, 30, 20, 10, False], [35, 75, 73, 25, False]], 20,\n    30],\n   0),\n  ('normal control 3',\n   [[[30, 625, 139, 10, False], [0, 0, 20, 10, False], [25, 565, 106, 5, False], [10, 105, 53, 20, False],\n     [5, 45, 20, 20, False], [15, 505, 53, 10, False], [20, 565, 73, 5, False]],\n    20, 30],\n   640),\n  ('normal control 4',\n   [[[5, 400, 33, 20, True], [15, 445, 18, 60, False], [15, 445, 3, 5, False], [25, 445, 23, 25, False],\n     [35, 490, 23, 20, False]],\n    20, 30],\n   49)],\n [('regression: segment floor',\n   [[[5, 460, 38, 20, False], [20, 520, 56, 10, False], [5, 60, 53, 20, False], [10, 490, 23, 10, False],\n     [5, 0, 33, 5, True], [35, 565, 89, 20, False], [25, 565, 56, 20, False]],\n    20, 30],\n   155),\n  ('partial repair probe: segment floor',\n   [[[0, 30, 20, 10, False], [5, 75, 53, 20, False], [10, 75, 38, 20, False], [15, 105, 58, 20, False]], 20,\n    30],\n   106),\n  ('second regression', [[[10, 45, 0, 20, False], [15, 75, -15, 5, False], [15, 75, 5, 60, False]], 20, 30],\n   33),\n  ('normal control 1',\n   [[[10, 60, -15, 60, False], [15, 105, -15, 20, False], [20, 105, 18, 20, True], [20, 105, 18, 25, False],\n     [25, 505, 38, 10, False]],\n    20, 30],\n   0),\n  ('normal control 2',\n   [[[5, 400, 33, 25, False], [15, 800, 53, 60, False], [20, 1200, 86, 25, False]], 20, 30], 0),\n  ('normal control 3', [[[10, 430, 53, 20, True], [15, 475, 38, 25, False], [0, 30, 33, 20, False]], 20, 30],\n   0),\n  ('normal control 4',\n   [[[5, 60, -15, 25, False], [15, 105, -30, 20, False], [15, 150, 3, 20, False], [20, 550, 23, 10, False],\n     [25, 580, 23, 10, False], [35, 610, 56, 20, False]],\n    20, 30],\n   512)],\n [('regression: segment floor',\n   [[[5, 0, 20, 20, False], [15, 45, 53, 20, False], [20, 105, 86, 10, False], [20, 135, 71, 10, False],\n     [20, 180, 71, 10, False]],\n    20, 30],\n   123),\n  ('partial repair probe: segment floor',\n   [[[5, 45, 18, 25, False], [5, 0, -15, 5, False], [10, 45, 18, 5, False]], 20, 30], 55),\n  ('second regression',\n   [[[25, 550, 99, 10, False], [40, 995, 84, 20, False], [10, 105, 33, 10, False], [10, 45, 33, 25, False],\n     [30, 950, 99, 25, False], [5, 0, 0, 10, False], [15, 150, 66, 20, False], [40, 1040, 69, 10, True]],\n    20, 30],\n   165),\n  ('normal control 1',\n   [[[35, 595, 99, 20, False], [5, 400, 0, 25, True], [40, 700, 139, 5, False], [15, 430, 33, 10, False],\n     [30, 535, 99, 10, False], [25, 535, 99, 60, False], [35, 640, 119, 20, False], [20, 490, 66, 25, True]],\n    20, 30],\n   296),\n  ('normal control 2',\n   [[[20, 535, 89, 5, False], [10, 445, 23, 25, False], [30, 535, 89, 5, True], [15, 505, 56, 5, True],\n     [0, 0, -15, 20, False], [5, 445, 3, 10, True], [0, 45, -30, 20, True], [35, 595, 89, 20, False]],\n    20, 30],\n   545),\n  ('normal control 3',\n   [[[30, 550, 25, 10, False], [20, 460, 20, 60, False], [25, 505, 40, 5, True], [10, 400, 0, 20, False]], 20,\n    30],\n   0),\n  ('normal control 4',\n   [[[0, 30, 33, 25, True], [10, 90, 33, 25, False], [20, 90, 18, 60, False], [25, 135, 18, 25, False],\n     [30, 165, 38, 60, True], [40, 210, 38, 20, True]],\n    20, 30],\n   0)]]\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":"05c0d7c16e524828f70ea88927da1ce9f9eb82cdf3ba9cf0117adf4b45c886df","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(pings, max_acc, max_speed):\n    kept = []\n    seen = set()\n    for p in sorted(pings, key=lambda p: p[0]):\n        if p[3] > max_acc:\n            continue\n        if p[0] in seen:\n            continue\n        seen.add(p[0])\n        kept.append(p)\n    total = 0\n    anchor = None\n    for p in kept:\n        if anchor is None:\n            anchor = p\n            continue\n        d = math.hypot(p[1] - anchor[1], p[2] - anchor[2])\n        dt = p[0] - anchor[0]\n        if d > max_speed * dt:\n            continue\n        if not (p[4] or anchor[4]):\n            total += d\n        anchor = p\n    return int(total)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: segment floor',\n   [[[20, 475, 38, 5, False], [5, 75, 53, 5, False], [30, 505, 71, 5, False], [10, 475, 53, 20, True],\n     [40, 610, 76, 5, False], [35, 565, 56, 10, False], [5, 45, 20, 60, False]],\n    20, 30],\n   554),\n  ('partial repair probe: segment floor',\n   [[[5, 45, 33, 10, False], [10, 90, 66, 10, False], [10, 135, 86, 20, False], [15, 535, 71, 25, False],\n     [20, 535, 104, 20, False]],\n    20, 30],\n   55),\n  ('second regression',\n   [[[20, 520, 38, 20, True], [5, 30, -15, 5, False], [30, 965, 104, 5, False], [15, 490, 38, 25, False],\n     [5, 90, 18, 5, False], [0, 0, -15, 20, False], [25, 565, 71, 5, False]],\n    20, 30],\n   571),\n  ('normal control 1',\n   [[[30, 980, 83, 5, False], [25, 520, 43, 10, True], [15, 60, 38, 10, True], [5, 60, 18, 25, False],\n     [25, 490, 58, 5, False], [20, 90, 38, 20, False], [5, 60, 33, 25, False], [25, 580, 63, 20, True]],\n    20, 30],\n   0),\n  ('normal control 2',\n   [[[25, 550, 43, 20, True], [5, 460, 40, 20, False], [20, 550, 58, 20, False], [35, 655, 48, 60, False],\n     [10, 520, 73, 60, False], [0, 60, 20, 10, True], [25, 595, 28, 20, False], [40, 700, 68, 60, False]],\n    20, 30],\n   0),\n  ('normal control 3',\n   [[[30, 520, 53, 20, True], [20, 120, 53, 25, False], [40, 1025, 78, 25, False], [35, 625, 58, 25, False],\n     [10, 45, 33, 20, False], [35, 580, 38, 20, False], [15, 75, 33, 25, False]],\n    20, 30],\n   0),\n  ('normal control 4',\n   [[[0, 400, 33, 25, False], [10, 445, 66, 20, False], [15, 845, 99, 10, False], [20, 875, 132, 20, True],\n     [25, 875, 117, 20, False]],\n    20, 30],\n   433)],\n [('regression: segment floor',\n   [[[10, 45, 33, 20, False], [10, 90, 18, 60, True], [15, 135, 38, 60, False], [15, 180, 38, 60, False],\n     [20, 180, 23, 20, False], [25, 225, 56, 20, False], [30, 225, 41, 20, True]],\n    20, 30],\n   190),\n  ('partial repair probe: segment floor',\n   [[[5, 30, 33, 10, False], [10, 30, 33, 25, False], [15, 90, 18, 10, False]], 20, 30], 61),\n  ('second regression',\n   [[[40, 1365, 21, 25, False], [35, 1335, 36, 20, False], [30, 1230, 3, 25, False],\n     [15, 800, -15, 60, False], [45, 1425, 54, 10, False], [20, 830, 18, 25, False], [10, 400, 0, 60, False],\n     [35, 1275, 3, 20, False]],\n    20, 30],\n   91),\n  ('normal control 1', [[[10, 400, 20, 5, False], [15, 800, 5, 60, False], [5, 0, 20, 10, True]], 20, 30], 0),\n  ('normal control 2',\n   [[[0, 45, -15, 10, False], [30, 1010, 177, 20, False], [0, 90, 38, 20, False], [15, 210, 111, 20, False],\n     [0, 45, 5, 25, False], [10, 150, 91, 20, True], [5, 120, 71, 20, False], [25, 610, 144, 20, False]],\n    20, 30],\n   114),\n  ('normal control 3',\n   [[[30, 460, 18, 60, False], [20, 400, 18, 10, False], [10, 400, -15, 20, False], [40, 1260, 36, 25, False],\n     [35, 860, 51, 60, True], [50, 1260, 36, 20, False]],\n    20, 30],\n   893),\n  ('normal control 4', [[[0, 400, 0, 20, True], [5, 800, 33, 20, True], [5, 830, 33, 5, False]], 20, 30], 0)],\n [('regression: segment floor',\n   [[[5, 75, 66, 60, True], [25, 180, 69, 20, False], [35, 285, 89, 10, False], [30, 240, 69, 25, True],\n     [10, 135, 51, 60, True], [0, 45, 33, 20, False], [45, 315, 122, 60, False], [20, 135, 84, 5, False]],\n    20, 30],\n   256),\n  ('partial repair probe: segment floor',\n   [[[30, 460, 23, 20, False], [10, 30, 18, 10, False], [25, 460, 23, 25, False], [15, 60, 3, 60, False],\n     [5, 0, 33, 10, False]],\n    20, 30],\n   463),\n  ('second regression',\n   [[[5, 0, 33, 20, False], [5, 30, 53, 60, True], [5, 60, 38, 20, False], [10, 105, 71, 5, False],\n     [15, 105, 104, 20, False], [20, 505, 137, 20, False]],\n    20, 30],\n   144),\n  ('normal control 1',\n   [[[25, 75, 60, 25, False], [25, 75, 40, 20, False], [10, 45, 20, 10, False], [20, 45, 40, 20, True]], 20,\n    30],\n   0),\n  ('normal control 2',\n   [[[20, 30, 20, 20, True], [25, 30, 53, 20, False], [10, 30, 20, 10, False], [35, 75, 73, 25, False]], 20,\n    30],\n   0),\n  ('normal control 3',\n   [[[30, 625, 139, 10, False], [0, 0, 20, 10, False], [25, 565, 106, 5, False], [10, 105, 53, 20, False],\n     [5, 45, 20, 20, False], [15, 505, 53, 10, False], [20, 565, 73, 5, False]],\n    20, 30],\n   640),\n  ('normal control 4',\n   [[[5, 400, 33, 20, True], [15, 445, 18, 60, False], [15, 445, 3, 5, False], [25, 445, 23, 25, False],\n     [35, 490, 23, 20, False]],\n    20, 30],\n   49)],\n [('regression: segment floor',\n   [[[5, 460, 38, 20, False], [20, 520, 56, 10, False], [5, 60, 53, 20, False], [10, 490, 23, 10, False],\n     [5, 0, 33, 5, True], [35, 565, 89, 20, False], [25, 565, 56, 20, False]],\n    20, 30],\n   155),\n  ('partial repair probe: segment floor',\n   [[[0, 30, 20, 10, False], [5, 75, 53, 20, False], [10, 75, 38, 20, False], [15, 105, 58, 20, False]], 20,\n    30],\n   106),\n  ('second regression', [[[10, 45, 0, 20, False], [15, 75, -15, 5, False], [15, 75, 5, 60, False]], 20, 30],\n   33),\n  ('normal control 1',\n   [[[10, 60, -15, 60, False], [15, 105, -15, 20, False], [20, 105, 18, 20, True], [20, 105, 18, 25, False],\n     [25, 505, 38, 10, False]],\n    20, 30],\n   0),\n  ('normal control 2',\n   [[[5, 400, 33, 25, False], [15, 800, 53, 60, False], [20, 1200, 86, 25, False]], 20, 30], 0),\n  ('normal control 3', [[[10, 430, 53, 20, True], [15, 475, 38, 25, False], [0, 30, 33, 20, False]], 20, 30],\n   0),\n  ('normal control 4',\n   [[[5, 60, -15, 25, False], [15, 105, -30, 20, False], [15, 150, 3, 20, False], [20, 550, 23, 10, False],\n     [25, 580, 23, 10, False], [35, 610, 56, 20, False]],\n    20, 30],\n   512)],\n [('regression: segment floor',\n   [[[5, 0, 20, 20, False], [15, 45, 53, 20, False], [20, 105, 86, 10, False], [20, 135, 71, 10, False],\n     [20, 180, 71, 10, False]],\n    20, 30],\n   123),\n  ('partial repair probe: segment floor',\n   [[[5, 45, 18, 25, False], [5, 0, -15, 5, False], [10, 45, 18, 5, False]], 20, 30], 55),\n  ('second regression',\n   [[[25, 550, 99, 10, False], [40, 995, 84, 20, False], [10, 105, 33, 10, False], [10, 45, 33, 25, False],\n     [30, 950, 99, 25, False], [5, 0, 0, 10, False], [15, 150, 66, 20, False], [40, 1040, 69, 10, True]],\n    20, 30],\n   165),\n  ('normal control 1',\n   [[[35, 595, 99, 20, False], [5, 400, 0, 25, True], [40, 700, 139, 5, False], [15, 430, 33, 10, False],\n     [30, 535, 99, 10, False], [25, 535, 99, 60, False], [35, 640, 119, 20, False], [20, 490, 66, 25, True]],\n    20, 30],\n   296),\n  ('normal control 2',\n   [[[20, 535, 89, 5, False], [10, 445, 23, 25, False], [30, 535, 89, 5, True], [15, 505, 56, 5, True],\n     [0, 0, -15, 20, False], [5, 445, 3, 10, True], [0, 45, -30, 20, True], [35, 595, 89, 20, False]],\n    20, 30],\n   545),\n  ('normal control 3',\n   [[[30, 550, 25, 10, False], [20, 460, 20, 60, False], [25, 505, 40, 5, True], [10, 400, 0, 20, False]], 20,\n    30],\n   0),\n  ('normal control 4',\n   [[[0, 30, 33, 25, True], [10, 90, 33, 25, False], [20, 90, 18, 60, False], [25, 135, 18, 25, False],\n     [30, 165, 38, 60, True], [40, 210, 38, 20, True]],\n    20, 30],\n   0)]]\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"},"fixed":{"sha256":"ad1246ff94e444316cbfaeed043cc8c40e29434884c6e6900e1e10d3fe31e172","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(pings, max_acc, max_speed):\n    kept = []\n    seen = set()\n    for p in sorted(pings, key=lambda p: p[0]):\n        if p[3] > max_acc:\n            continue\n        if p[0] in seen:\n            continue\n        seen.add(p[0])\n        kept.append(p)\n    total = 0\n    anchor = None\n    for p in kept:\n        if anchor is None:\n            anchor = p\n            continue\n        d = math.isqrt((p[1] - anchor[1]) ** 2 + (p[2] - anchor[2]) ** 2)\n        dt = p[0] - anchor[0]\n        if d > max_speed * dt:\n            continue\n        if not (p[4] or anchor[4]):\n            total += d\n        anchor = p\n    return total\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: segment floor',\n   [[[20, 475, 38, 5, False], [5, 75, 53, 5, False], [30, 505, 71, 5, False], [10, 475, 53, 20, True],\n     [40, 610, 76, 5, False], [35, 565, 56, 10, False], [5, 45, 20, 60, False]],\n    20, 30],\n   554),\n  ('partial repair probe: segment floor',\n   [[[5, 45, 33, 10, False], [10, 90, 66, 10, False], [10, 135, 86, 20, False], [15, 535, 71, 25, False],\n     [20, 535, 104, 20, False]],\n    20, 30],\n   55),\n  ('second regression',\n   [[[20, 520, 38, 20, True], [5, 30, -15, 5, False], [30, 965, 104, 5, False], [15, 490, 38, 25, False],\n     [5, 90, 18, 5, False], [0, 0, -15, 20, False], [25, 565, 71, 5, False]],\n    20, 30],\n   571),\n  ('normal control 1',\n   [[[30, 980, 83, 5, False], [25, 520, 43, 10, True], [15, 60, 38, 10, True], [5, 60, 18, 25, False],\n     [25, 490, 58, 5, False], [20, 90, 38, 20, False], [5, 60, 33, 25, False], [25, 580, 63, 20, True]],\n    20, 30],\n   0),\n  ('normal control 2',\n   [[[25, 550, 43, 20, True], [5, 460, 40, 20, False], [20, 550, 58, 20, False], [35, 655, 48, 60, False],\n     [10, 520, 73, 60, False], [0, 60, 20, 10, True], [25, 595, 28, 20, False], [40, 700, 68, 60, False]],\n    20, 30],\n   0),\n  ('normal control 3',\n   [[[30, 520, 53, 20, True], [20, 120, 53, 25, False], [40, 1025, 78, 25, False], [35, 625, 58, 25, False],\n     [10, 45, 33, 20, False], [35, 580, 38, 20, False], [15, 75, 33, 25, False]],\n    20, 30],\n   0),\n  ('normal control 4',\n   [[[0, 400, 33, 25, False], [10, 445, 66, 20, False], [15, 845, 99, 10, False], [20, 875, 132, 20, True],\n     [25, 875, 117, 20, False]],\n    20, 30],\n   433)],\n [('regression: segment floor',\n   [[[10, 45, 33, 20, False], [10, 90, 18, 60, True], [15, 135, 38, 60, False], [15, 180, 38, 60, False],\n     [20, 180, 23, 20, False], [25, 225, 56, 20, False], [30, 225, 41, 20, True]],\n    20, 30],\n   190),\n  ('partial repair probe: segment floor',\n   [[[5, 30, 33, 10, False], [10, 30, 33, 25, False], [15, 90, 18, 10, False]], 20, 30], 61),\n  ('second regression',\n   [[[40, 1365, 21, 25, False], [35, 1335, 36, 20, False], [30, 1230, 3, 25, False],\n     [15, 800, -15, 60, False], [45, 1425, 54, 10, False], [20, 830, 18, 25, False], [10, 400, 0, 60, False],\n     [35, 1275, 3, 20, False]],\n    20, 30],\n   91),\n  ('normal control 1', [[[10, 400, 20, 5, False], [15, 800, 5, 60, False], [5, 0, 20, 10, True]], 20, 30], 0),\n  ('normal control 2',\n   [[[0, 45, -15, 10, False], [30, 1010, 177, 20, False], [0, 90, 38, 20, False], [15, 210, 111, 20, False],\n     [0, 45, 5, 25, False], [10, 150, 91, 20, True], [5, 120, 71, 20, False], [25, 610, 144, 20, False]],\n    20, 30],\n   114),\n  ('normal control 3',\n   [[[30, 460, 18, 60, False], [20, 400, 18, 10, False], [10, 400, -15, 20, False], [40, 1260, 36, 25, False],\n     [35, 860, 51, 60, True], [50, 1260, 36, 20, False]],\n    20, 30],\n   893),\n  ('normal control 4', [[[0, 400, 0, 20, True], [5, 800, 33, 20, True], [5, 830, 33, 5, False]], 20, 30], 0)],\n [('regression: segment floor',\n   [[[5, 75, 66, 60, True], [25, 180, 69, 20, False], [35, 285, 89, 10, False], [30, 240, 69, 25, True],\n     [10, 135, 51, 60, True], [0, 45, 33, 20, False], [45, 315, 122, 60, False], [20, 135, 84, 5, False]],\n    20, 30],\n   256),\n  ('partial repair probe: segment floor',\n   [[[30, 460, 23, 20, False], [10, 30, 18, 10, False], [25, 460, 23, 25, False], [15, 60, 3, 60, False],\n     [5, 0, 33, 10, False]],\n    20, 30],\n   463),\n  ('second regression',\n   [[[5, 0, 33, 20, False], [5, 30, 53, 60, True], [5, 60, 38, 20, False], [10, 105, 71, 5, False],\n     [15, 105, 104, 20, False], [20, 505, 137, 20, False]],\n    20, 30],\n   144),\n  ('normal control 1',\n   [[[25, 75, 60, 25, False], [25, 75, 40, 20, False], [10, 45, 20, 10, False], [20, 45, 40, 20, True]], 20,\n    30],\n   0),\n  ('normal control 2',\n   [[[20, 30, 20, 20, True], [25, 30, 53, 20, False], [10, 30, 20, 10, False], [35, 75, 73, 25, False]], 20,\n    30],\n   0),\n  ('normal control 3',\n   [[[30, 625, 139, 10, False], [0, 0, 20, 10, False], [25, 565, 106, 5, False], [10, 105, 53, 20, False],\n     [5, 45, 20, 20, False], [15, 505, 53, 10, False], [20, 565, 73, 5, False]],\n    20, 30],\n   640),\n  ('normal control 4',\n   [[[5, 400, 33, 20, True], [15, 445, 18, 60, False], [15, 445, 3, 5, False], [25, 445, 23, 25, False],\n     [35, 490, 23, 20, False]],\n    20, 30],\n   49)],\n [('regression: segment floor',\n   [[[5, 460, 38, 20, False], [20, 520, 56, 10, False], [5, 60, 53, 20, False], [10, 490, 23, 10, False],\n     [5, 0, 33, 5, True], [35, 565, 89, 20, False], [25, 565, 56, 20, False]],\n    20, 30],\n   155),\n  ('partial repair probe: segment floor',\n   [[[0, 30, 20, 10, False], [5, 75, 53, 20, False], [10, 75, 38, 20, False], [15, 105, 58, 20, False]], 20,\n    30],\n   106),\n  ('second regression', [[[10, 45, 0, 20, False], [15, 75, -15, 5, False], [15, 75, 5, 60, False]], 20, 30],\n   33),\n  ('normal control 1',\n   [[[10, 60, -15, 60, False], [15, 105, -15, 20, False], [20, 105, 18, 20, True], [20, 105, 18, 25, False],\n     [25, 505, 38, 10, False]],\n    20, 30],\n   0),\n  ('normal control 2',\n   [[[5, 400, 33, 25, False], [15, 800, 53, 60, False], [20, 1200, 86, 25, False]], 20, 30], 0),\n  ('normal control 3', [[[10, 430, 53, 20, True], [15, 475, 38, 25, False], [0, 30, 33, 20, False]], 20, 30],\n   0),\n  ('normal control 4',\n   [[[5, 60, -15, 25, False], [15, 105, -30, 20, False], [15, 150, 3, 20, False], [20, 550, 23, 10, False],\n     [25, 580, 23, 10, False], [35, 610, 56, 20, False]],\n    20, 30],\n   512)],\n [('regression: segment floor',\n   [[[5, 0, 20, 20, False], [15, 45, 53, 20, False], [20, 105, 86, 10, False], [20, 135, 71, 10, False],\n     [20, 180, 71, 10, False]],\n    20, 30],\n   123),\n  ('partial repair probe: segment floor',\n   [[[5, 45, 18, 25, False], [5, 0, -15, 5, False], [10, 45, 18, 5, False]], 20, 30], 55),\n  ('second regression',\n   [[[25, 550, 99, 10, False], [40, 995, 84, 20, False], [10, 105, 33, 10, False], [10, 45, 33, 25, False],\n     [30, 950, 99, 25, False], [5, 0, 0, 10, False], [15, 150, 66, 20, False], [40, 1040, 69, 10, True]],\n    20, 30],\n   165),\n  ('normal control 1',\n   [[[35, 595, 99, 20, False], [5, 400, 0, 25, True], [40, 700, 139, 5, False], [15, 430, 33, 10, False],\n     [30, 535, 99, 10, False], [25, 535, 99, 60, False], [35, 640, 119, 20, False], [20, 490, 66, 25, True]],\n    20, 30],\n   296),\n  ('normal control 2',\n   [[[20, 535, 89, 5, False], [10, 445, 23, 25, False], [30, 535, 89, 5, True], [15, 505, 56, 5, True],\n     [0, 0, -15, 20, False], [5, 445, 3, 10, True], [0, 45, -30, 20, True], [35, 595, 89, 20, False]],\n    20, 30],\n   545),\n  ('normal control 3',\n   [[[30, 550, 25, 10, False], [20, 460, 20, 60, False], [25, 505, 40, 5, True], [10, 400, 0, 20, False]], 20,\n    30],\n   0),\n  ('normal control 4',\n   [[[0, 30, 33, 25, True], [10, 90, 33, 25, False], [20, 90, 18, 60, False], [25, 135, 18, 25, False],\n     [30, 165, 38, 60, True], [40, 210, 38, 20, True]],\n    20, 30],\n   0)]]\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-gps-trace-distance-segment-floor","generated_at":"2026-09-29T14:50:41.278263+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.","repair":"Floor each segment to whole meters before summing.","root_cause":"Exact segment lengths are summed and only the total is floored.","sha256":"587a44ef4085aeb7a441aa6db291576370817f04324091df008f8e4c6d17f677","title":"Distance floored once on the trip total · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.599,"exit_code":1,"observations":[{"actual":556,"check":"regression: segment floor","expected":554,"passed":false},{"actual":56,"check":"partial repair probe: segment floor","expected":55,"passed":false},{"actual":572,"check":"second regression","expected":571,"passed":false},{"actual":0,"check":"normal control 1","expected":0,"passed":true},{"actual":0,"check":"normal control 2","expected":0,"passed":true},{"actual":0,"check":"normal control 3","expected":0,"passed":true},{"actual":433,"check":"normal control 4","expected":433,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: segment floor\", \"actual\": 556, \"expected\": 554, \"passed\": false}, {\"check\": \"partial repair probe: segment floor\", \"actual\": 56, \"expected\": 55, \"passed\": false}, {\"check\": \"second regression\", \"actual\": 572, \"expected\": 571, \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": 433, \"expected\": 433, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.588,"exit_code":1,"observations":[{"actual":555,"check":"regression: segment floor","expected":554,"passed":false},{"actual":55,"check":"partial repair probe: segment floor","expected":55,"passed":true},{"actual":571,"check":"second regression","expected":571,"passed":true},{"actual":0,"check":"normal control 1","expected":0,"passed":true},{"actual":0,"check":"normal control 2","expected":0,"passed":true},{"actual":0,"check":"normal control 3","expected":0,"passed":true},{"actual":433,"check":"normal control 4","expected":433,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: segment floor\", \"actual\": 555, \"expected\": 554, \"passed\": false}, {\"check\": \"partial repair probe: segment floor\", \"actual\": 55, \"expected\": 55, \"passed\": true}, {\"check\": \"second regression\", \"actual\": 571, \"expected\": 571, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": 433, \"expected\": 433, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.242,"exit_code":0,"observations":[{"actual":554,"check":"regression: segment floor","expected":554,"passed":true},{"actual":55,"check":"partial repair probe: segment floor","expected":55,"passed":true},{"actual":571,"check":"second regression","expected":571,"passed":true},{"actual":0,"check":"normal control 1","expected":0,"passed":true},{"actual":0,"check":"normal control 2","expected":0,"passed":true},{"actual":0,"check":"normal control 3","expected":0,"passed":true},{"actual":433,"check":"normal control 4","expected":433,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: segment floor\", \"actual\": 554, \"expected\": 554, \"passed\": true}, {\"check\": \"partial repair probe: segment floor\", \"actual\": 55, \"expected\": 55, \"passed\": true}, {\"check\": \"second regression\", \"actual\": 571, \"expected\": 571, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": 433, \"expected\": 433, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}