{"abstract":"A 1.5x fare on 12.35 shows 18.52 instead of 18.53.","category":"Ride-hailing fare and surge pricing","checks":7,"contract":"Cents throughout. Surge (tenths) multiplies only base+distance+time, rounded half up. A percentage promo discounts the surged amount (floor), capped at promo cap cents. The booking fee is added after the discount. Tax (basis points, rounded half up) applies to surged - discount + booking fee; tolls and airport fees are passed through untaxed and unsurged.","contract_signature":"parts, surge, promo, tax_bp","evaluation_group":"w2-ride-hailing-fare-surge-fare-composition","failed_approach":"Python round() sends exact half cents to the even cent, so half of them still round down.","family":"w2-ride-hailing-fare-surge-fare-composition-surge-product-rounding","id":"FA-85401","implementations":{"attempt":{"sha256":"c88def712572838345d55390dc29ecf929f818229f044235eaa7703918ee20c4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(parts, surge, promo, tax_bp):\n    def half_up(num, den):\n        return (num * 2 + den) // (den * 2)\n    core = parts['base'] + parts['distance'] + parts['time']\n    surged = round(core * surge / 10)\n    disc = 0\n    if promo:\n        disc = min(surged * promo['pct'] // 100, promo['cap'])\n    sub = surged - disc + parts['booking_fee']\n    tax = half_up(sub * tax_bp, 10000)\n    total = sub + tax + parts['tolls'] + parts['airport_fee']\n    return {'surged': surged, 'discount': disc, 'tax': tax, 'total': total}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: surge product rounding',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 0, 'distance': 1133, 'time': 346, 'tolls': 690}, 25,\n    {'cap': 1000, 'pct': 50}, 625],\n   {'discount': 1000, 'surged': 4323, 'tax': 208, 'total': 4221}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 175, 'distance': 2672, 'time': 63, 'tolls': 0}, 25, None,\n    625],\n   {'discount': 0, 'surged': 7213, 'tax': 462, 'total': 7850}),\n  ('second regression',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 245, 'distance': 915, 'time': 814, 'tolls': 375}, 12,\n    {'cap': 500, 'pct': 20}, 1000],\n   {'discount': 451, 'surged': 2255, 'tax': 205, 'total': 2629}),\n  ('normal control 1',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 1078, 'time': 847, 'tolls': 690}, 12,\n    {'cap': 500, 'pct': 20}, 1000],\n   {'discount': 498, 'surged': 2490, 'tax': 199, 'total': 2881}),\n  ('normal control 2',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 245, 'distance': 1178, 'time': 825, 'tolls': 0}, 17,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 3830, 'tax': 0, 'total': 4070}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 651, 'time': 574, 'tolls': 375}, 12,\n    {'cap': 1000, 'pct': 50}, 1000],\n   {'discount': 825, 'surged': 1650, 'tax': 83, 'total': 1283}),\n  ('normal control 4',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 2422, 'time': 315, 'tolls': 375}, 10, None,\n    825],\n   {'discount': 0, 'surged': 2887, 'tax': 238, 'total': 3500})],\n [('regression: surge product rounding',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 1959, 'time': 269, 'tolls': 0}, 17, None,\n    625],\n   {'discount': 0, 'surged': 4043, 'tax': 253, 'total': 4296}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 175, 'distance': 227, 'time': 722, 'tolls': 0}, 15,\n    {'cap': 5, 'pct': 15}, 625],\n   {'discount': 5, 'surged': 1799, 'tax': 123, 'total': 2092}),\n  ('second regression',\n   [{'airport_fee': 500, 'base': 250, 'booking_fee': 0, 'distance': 670, 'time': 311, 'tolls': 0}, 25,\n    {'cap': 500, 'pct': 20}, 1000],\n   {'discount': 500, 'surged': 3078, 'tax': 258, 'total': 3336}),\n  ('normal control 1',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 175, 'distance': 2869, 'time': 310, 'tolls': 0}, 10,\n    {'cap': 5, 'pct': 15}, 825],\n   {'discount': 5, 'surged': 3329, 'tax': 289, 'total': 4288}),\n  ('normal control 2',\n   [{'airport_fee': 500, 'base': 250, 'booking_fee': 175, 'distance': 2735, 'time': 367, 'tolls': 690}, 12,\n    {'cap': 500, 'pct': 20}, 825],\n   {'discount': 500, 'surged': 4022, 'tax': 305, 'total': 5192}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 245, 'distance': 1129, 'time': 187, 'tolls': 0}, 12, None,\n    625],\n   {'discount': 0, 'surged': 1759, 'tax': 125, 'total': 2129}),\n  ('normal control 4',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 0, 'distance': 2184, 'time': 136, 'tolls': 0}, 17,\n    {'cap': 1000, 'pct': 50}, 0],\n   {'discount': 1000, 'surged': 4199, 'tax': 0, 'total': 3699})],\n [('regression: surge product rounding',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 245, 'distance': 1137, 'time': 394, 'tolls': 0}, 15,\n    {'cap': 1000, 'pct': 50}, 625],\n   {'discount': 1000, 'surged': 2522, 'tax': 110, 'total': 2377}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 245, 'distance': 1239, 'time': 362, 'tolls': 375}, 15,\n    None, 625],\n   {'discount': 0, 'surged': 2777, 'tax': 189, 'total': 3586}),\n  ('second regression',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 175, 'distance': 2998, 'time': 169, 'tolls': 0}, 15,\n    {'cap': 5, 'pct': 15}, 625],\n   {'discount': 5, 'surged': 5126, 'tax': 331, 'total': 5627}),\n  ('normal control 1',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 978, 'time': 114, 'tolls': 690}, 25, None,\n    825],\n   {'discount': 0, 'surged': 3105, 'tax': 256, 'total': 4051}),\n  ('normal control 2',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 2383, 'time': 160, 'tolls': 0}, 17,\n    {'cap': 5, 'pct': 15}, 625],\n   {'discount': 5, 'surged': 4578, 'tax': 286, 'total': 4859}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 175, 'distance': 1266, 'time': 570, 'tolls': 0}, 17,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 3376, 'tax': 0, 'total': 3546}),\n  ('normal control 4',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 245, 'distance': 2592, 'time': 644, 'tolls': 0}, 10,\n    {'cap': 500, 'pct': 20}, 1000],\n   {'discount': 500, 'surged': 3386, 'tax': 313, 'total': 3444})],\n [('regression: surge product rounding',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 343, 'time': 325, 'tolls': 0}, 12,\n    {'cap': 500, 'pct': 20}, 625],\n   {'discount': 196, 'surged': 982, 'tax': 49, 'total': 835}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 500, 'base': 250, 'booking_fee': 245, 'distance': 401, 'time': 180, 'tolls': 375}, 15,\n    {'cap': 1000, 'pct': 50}, 1000],\n   {'discount': 623, 'surged': 1247, 'tax': 87, 'total': 1831}),\n  ('second regression',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 175, 'distance': 1525, 'time': 734, 'tolls': 690}, 15,\n    None, 625],\n   {'discount': 0, 'surged': 3614, 'tax': 237, 'total': 5216}),\n  ('normal control 1',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 245, 'distance': 1417, 'time': 611, 'tolls': 375}, 25,\n    {'cap': 500, 'pct': 20}, 825],\n   {'discount': 500, 'surged': 5695, 'tax': 449, 'total': 6264}),\n  ('normal control 2',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 0, 'distance': 2189, 'time': 343, 'tolls': 375}, 10,\n    {'cap': 1000, 'pct': 50}, 825],\n   {'discount': 1000, 'surged': 2782, 'tax': 147, 'total': 2304}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 175, 'distance': 986, 'time': 383, 'tolls': 375}, 10,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 1519, 'tax': 0, 'total': 2064}),\n  ('normal control 4',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 175, 'distance': 556, 'time': 727, 'tolls': 375}, 10,\n    {'cap': 500, 'pct': 20}, 625],\n   {'discount': 286, 'surged': 1433, 'tax': 83, 'total': 2280})],\n [('regression: surge product rounding',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 245, 'distance': 1239, 'time': 898, 'tolls': 690}, 15,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 3431, 'tax': 0, 'total': 4361}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 175, 'distance': 449, 'time': 856, 'tolls': 690}, 15,\n    {'cap': 1000, 'pct': 50}, 0],\n   {'discount': 1000, 'surged': 2183, 'tax': 0, 'total': 2548}),\n  ('second regression',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 175, 'distance': 253, 'time': 50, 'tolls': 375}, 15,\n    {'cap': 1000, 'pct': 50}, 1000],\n   {'discount': 415, 'surged': 830, 'tax': 59, 'total': 1024}),\n  ('normal control 1',\n   [{'airport_fee': 500, 'base': 250, 'booking_fee': 0, 'distance': 288, 'time': 608, 'tolls': 690}, 12,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 1375, 'tax': 0, 'total': 2560}),\n  ('normal control 2',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 0, 'distance': 1188, 'time': 261, 'tolls': 0}, 10,\n    {'cap': 500, 'pct': 20}, 825],\n   {'discount': 339, 'surged': 1699, 'tax': 112, 'total': 1472}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 239, 'time': 770, 'tolls': 375}, 17,\n    {'cap': 500, 'pct': 20}, 0],\n   {'discount': 394, 'surged': 1970, 'tax': 0, 'total': 1951}),\n  ('normal control 4',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 245, 'distance': 1284, 'time': 494, 'tolls': 690}, 10,\n    {'cap': 1000, 'pct': 50}, 0],\n   {'discount': 964, 'surged': 1928, 'tax': 0, 'total': 2399})]]\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":"6869679994633d8703cf0acdabf453fd1ae4c1feb0715942791805325fdf6f22","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(parts, surge, promo, tax_bp):\n    def half_up(num, den):\n        return (num * 2 + den) // (den * 2)\n    core = parts['base'] + parts['distance'] + parts['time']\n    surged = core * surge // 10\n    disc = 0\n    if promo:\n        disc = min(surged * promo['pct'] // 100, promo['cap'])\n    sub = surged - disc + parts['booking_fee']\n    tax = half_up(sub * tax_bp, 10000)\n    total = sub + tax + parts['tolls'] + parts['airport_fee']\n    return {'surged': surged, 'discount': disc, 'tax': tax, 'total': total}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: surge product rounding',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 0, 'distance': 1133, 'time': 346, 'tolls': 690}, 25,\n    {'cap': 1000, 'pct': 50}, 625],\n   {'discount': 1000, 'surged': 4323, 'tax': 208, 'total': 4221}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 175, 'distance': 2672, 'time': 63, 'tolls': 0}, 25, None,\n    625],\n   {'discount': 0, 'surged': 7213, 'tax': 462, 'total': 7850}),\n  ('second regression',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 245, 'distance': 915, 'time': 814, 'tolls': 375}, 12,\n    {'cap': 500, 'pct': 20}, 1000],\n   {'discount': 451, 'surged': 2255, 'tax': 205, 'total': 2629}),\n  ('normal control 1',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 1078, 'time': 847, 'tolls': 690}, 12,\n    {'cap': 500, 'pct': 20}, 1000],\n   {'discount': 498, 'surged': 2490, 'tax': 199, 'total': 2881}),\n  ('normal control 2',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 245, 'distance': 1178, 'time': 825, 'tolls': 0}, 17,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 3830, 'tax': 0, 'total': 4070}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 651, 'time': 574, 'tolls': 375}, 12,\n    {'cap': 1000, 'pct': 50}, 1000],\n   {'discount': 825, 'surged': 1650, 'tax': 83, 'total': 1283}),\n  ('normal control 4',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 2422, 'time': 315, 'tolls': 375}, 10, None,\n    825],\n   {'discount': 0, 'surged': 2887, 'tax': 238, 'total': 3500})],\n [('regression: surge product rounding',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 1959, 'time': 269, 'tolls': 0}, 17, None,\n    625],\n   {'discount': 0, 'surged': 4043, 'tax': 253, 'total': 4296}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 175, 'distance': 227, 'time': 722, 'tolls': 0}, 15,\n    {'cap': 5, 'pct': 15}, 625],\n   {'discount': 5, 'surged': 1799, 'tax': 123, 'total': 2092}),\n  ('second regression',\n   [{'airport_fee': 500, 'base': 250, 'booking_fee': 0, 'distance': 670, 'time': 311, 'tolls': 0}, 25,\n    {'cap': 500, 'pct': 20}, 1000],\n   {'discount': 500, 'surged': 3078, 'tax': 258, 'total': 3336}),\n  ('normal control 1',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 175, 'distance': 2869, 'time': 310, 'tolls': 0}, 10,\n    {'cap': 5, 'pct': 15}, 825],\n   {'discount': 5, 'surged': 3329, 'tax': 289, 'total': 4288}),\n  ('normal control 2',\n   [{'airport_fee': 500, 'base': 250, 'booking_fee': 175, 'distance': 2735, 'time': 367, 'tolls': 690}, 12,\n    {'cap': 500, 'pct': 20}, 825],\n   {'discount': 500, 'surged': 4022, 'tax': 305, 'total': 5192}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 245, 'distance': 1129, 'time': 187, 'tolls': 0}, 12, None,\n    625],\n   {'discount': 0, 'surged': 1759, 'tax': 125, 'total': 2129}),\n  ('normal control 4',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 0, 'distance': 2184, 'time': 136, 'tolls': 0}, 17,\n    {'cap': 1000, 'pct': 50}, 0],\n   {'discount': 1000, 'surged': 4199, 'tax': 0, 'total': 3699})],\n [('regression: surge product rounding',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 245, 'distance': 1137, 'time': 394, 'tolls': 0}, 15,\n    {'cap': 1000, 'pct': 50}, 625],\n   {'discount': 1000, 'surged': 2522, 'tax': 110, 'total': 2377}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 245, 'distance': 1239, 'time': 362, 'tolls': 375}, 15,\n    None, 625],\n   {'discount': 0, 'surged': 2777, 'tax': 189, 'total': 3586}),\n  ('second regression',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 175, 'distance': 2998, 'time': 169, 'tolls': 0}, 15,\n    {'cap': 5, 'pct': 15}, 625],\n   {'discount': 5, 'surged': 5126, 'tax': 331, 'total': 5627}),\n  ('normal control 1',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 978, 'time': 114, 'tolls': 690}, 25, None,\n    825],\n   {'discount': 0, 'surged': 3105, 'tax': 256, 'total': 4051}),\n  ('normal control 2',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 2383, 'time': 160, 'tolls': 0}, 17,\n    {'cap': 5, 'pct': 15}, 625],\n   {'discount': 5, 'surged': 4578, 'tax': 286, 'total': 4859}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 175, 'distance': 1266, 'time': 570, 'tolls': 0}, 17,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 3376, 'tax': 0, 'total': 3546}),\n  ('normal control 4',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 245, 'distance': 2592, 'time': 644, 'tolls': 0}, 10,\n    {'cap': 500, 'pct': 20}, 1000],\n   {'discount': 500, 'surged': 3386, 'tax': 313, 'total': 3444})],\n [('regression: surge product rounding',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 343, 'time': 325, 'tolls': 0}, 12,\n    {'cap': 500, 'pct': 20}, 625],\n   {'discount': 196, 'surged': 982, 'tax': 49, 'total': 835}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 500, 'base': 250, 'booking_fee': 245, 'distance': 401, 'time': 180, 'tolls': 375}, 15,\n    {'cap': 1000, 'pct': 50}, 1000],\n   {'discount': 623, 'surged': 1247, 'tax': 87, 'total': 1831}),\n  ('second regression',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 175, 'distance': 1525, 'time': 734, 'tolls': 690}, 15,\n    None, 625],\n   {'discount': 0, 'surged': 3614, 'tax': 237, 'total': 5216}),\n  ('normal control 1',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 245, 'distance': 1417, 'time': 611, 'tolls': 375}, 25,\n    {'cap': 500, 'pct': 20}, 825],\n   {'discount': 500, 'surged': 5695, 'tax': 449, 'total': 6264}),\n  ('normal control 2',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 0, 'distance': 2189, 'time': 343, 'tolls': 375}, 10,\n    {'cap': 1000, 'pct': 50}, 825],\n   {'discount': 1000, 'surged': 2782, 'tax': 147, 'total': 2304}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 175, 'distance': 986, 'time': 383, 'tolls': 375}, 10,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 1519, 'tax': 0, 'total': 2064}),\n  ('normal control 4',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 175, 'distance': 556, 'time': 727, 'tolls': 375}, 10,\n    {'cap': 500, 'pct': 20}, 625],\n   {'discount': 286, 'surged': 1433, 'tax': 83, 'total': 2280})],\n [('regression: surge product rounding',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 245, 'distance': 1239, 'time': 898, 'tolls': 690}, 15,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 3431, 'tax': 0, 'total': 4361}),\n  ('partial repair probe: surge product rounding',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 175, 'distance': 449, 'time': 856, 'tolls': 690}, 15,\n    {'cap': 1000, 'pct': 50}, 0],\n   {'discount': 1000, 'surged': 2183, 'tax': 0, 'total': 2548}),\n  ('second regression',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 175, 'distance': 253, 'time': 50, 'tolls': 375}, 15,\n    {'cap': 1000, 'pct': 50}, 1000],\n   {'discount': 415, 'surged': 830, 'tax': 59, 'total': 1024}),\n  ('normal control 1',\n   [{'airport_fee': 500, 'base': 250, 'booking_fee': 0, 'distance': 288, 'time': 608, 'tolls': 690}, 12,\n    {'cap': 5, 'pct': 15}, 0],\n   {'discount': 5, 'surged': 1375, 'tax': 0, 'total': 2560}),\n  ('normal control 2',\n   [{'airport_fee': 0, 'base': 250, 'booking_fee': 0, 'distance': 1188, 'time': 261, 'tolls': 0}, 10,\n    {'cap': 500, 'pct': 20}, 825],\n   {'discount': 339, 'surged': 1699, 'tax': 112, 'total': 1472}),\n  ('normal control 3',\n   [{'airport_fee': 0, 'base': 150, 'booking_fee': 0, 'distance': 239, 'time': 770, 'tolls': 375}, 17,\n    {'cap': 500, 'pct': 20}, 0],\n   {'discount': 394, 'surged': 1970, 'tax': 0, 'total': 1951}),\n  ('normal control 4',\n   [{'airport_fee': 500, 'base': 150, 'booking_fee': 245, 'distance': 1284, 'time': 494, 'tolls': 690}, 10,\n    {'cap': 1000, 'pct': 50}, 0],\n   {'discount': 964, 'surged': 1928, 'tax': 0, 'total': 2399})]]\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-fare-composition-surge-product-rounding","generated_at":"2026-09-29T14:50:39.976039+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":"The surge product is floor-divided.","sha256":"4b43f8bbd53bfe9121370f589d974936f8268fb1252f8cca593f40a6b4017091","title":"Surged fare truncated instead of rounded · 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":40.657,"exit_code":1,"observations":[{"actual":{"discount":1000,"surged":4322,"tax":208,"total":4220},"check":"regression: surge product rounding","expected":{"discount":1000,"surged":4323,"tax":208,"total":4221},"passed":false},{"actual":{"discount":0,"surged":7212,"tax":462,"total":7849},"check":"partial repair probe: surge product rounding","expected":{"discount":0,"surged":7213,"tax":462,"total":7850},"passed":false},{"actual":{"discount":451,"surged":2255,"tax":205,"total":2629},"check":"second regression","expected":{"discount":451,"surged":2255,"tax":205,"total":2629},"passed":true},{"actual":{"discount":498,"surged":2490,"tax":199,"total":2881},"check":"normal control 1","expected":{"discount":498,"surged":2490,"tax":199,"total":2881},"passed":true},{"actual":{"discount":5,"surged":3830,"tax":0,"total":4070},"check":"normal control 2","expected":{"discount":5,"surged":3830,"tax":0,"total":4070},"passed":true},{"actual":{"discount":825,"surged":1650,"tax":83,"total":1283},"check":"normal control 3","expected":{"discount":825,"surged":1650,"tax":83,"total":1283},"passed":true},{"actual":{"discount":0,"surged":2887,"tax":238,"total":3500},"check":"normal control 4","expected":{"discount":0,"surged":2887,"tax":238,"total":3500},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: surge product rounding\", \"actual\": {\"surged\": 4322, \"discount\": 1000, \"tax\": 208, \"total\": 4220}, \"expected\": {\"discount\": 1000, \"surged\": 4323, \"tax\": 208, \"total\": 4221}, \"passed\": false}, {\"check\": \"partial repair probe: surge product rounding\", \"actual\": {\"surged\": 7212, \"discount\": 0, \"tax\": 462, \"total\": 7849}, \"expected\": {\"discount\": 0, \"surged\": 7213, \"tax\": 462, \"total\": 7850}, \"passed\": false}, {\"check\": \"second regression\", \"actual\": {\"surged\": 2255, \"discount\": 451, \"tax\": 205, \"total\": 2629}, \"expected\": {\"discount\": 451, \"surged\": 2255, \"tax\": 205, \"total\": 2629}, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": {\"surged\": 2490, \"discount\": 498, \"tax\": 199, \"total\": 2881}, \"expected\": {\"discount\": 498, \"surged\": 2490, \"tax\": 199, \"total\": 2881}, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": {\"surged\": 3830, \"discount\": 5, \"tax\": 0, \"total\": 4070}, \"expected\": {\"discount\": 5, \"surged\": 3830, \"tax\": 0, \"total\": 4070}, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": {\"surged\": 1650, \"discount\": 825, \"tax\": 83, \"total\": 1283}, \"expected\": {\"discount\": 825, \"surged\": 1650, \"tax\": 83, \"total\": 1283}, \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": {\"surged\": 2887, \"discount\": 0, \"tax\": 238, \"total\": 3500}, \"expected\": {\"discount\": 0, \"surged\": 2887, \"tax\": 238, \"total\": 3500}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.606,"exit_code":1,"observations":[{"actual":{"discount":1000,"surged":4322,"tax":208,"total":4220},"check":"regression: surge product rounding","expected":{"discount":1000,"surged":4323,"tax":208,"total":4221},"passed":false},{"actual":{"discount":0,"surged":7212,"tax":462,"total":7849},"check":"partial repair probe: surge product rounding","expected":{"discount":0,"surged":7213,"tax":462,"total":7850},"passed":false},{"actual":{"discount":450,"surged":2254,"tax":205,"total":2629},"check":"second regression","expected":{"discount":451,"surged":2255,"tax":205,"total":2629},"passed":false},{"actual":{"discount":498,"surged":2490,"tax":199,"total":2881},"check":"normal control 1","expected":{"discount":498,"surged":2490,"tax":199,"total":2881},"passed":true},{"actual":{"discount":5,"surged":3830,"tax":0,"total":4070},"check":"normal control 2","expected":{"discount":5,"surged":3830,"tax":0,"total":4070},"passed":true},{"actual":{"discount":825,"surged":1650,"tax":83,"total":1283},"check":"normal control 3","expected":{"discount":825,"surged":1650,"tax":83,"total":1283},"passed":true},{"actual":{"discount":0,"surged":2887,"tax":238,"total":3500},"check":"normal control 4","expected":{"discount":0,"surged":2887,"tax":238,"total":3500},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: surge product rounding\", \"actual\": {\"surged\": 4322, \"discount\": 1000, \"tax\": 208, \"total\": 4220}, \"expected\": {\"discount\": 1000, \"surged\": 4323, \"tax\": 208, \"total\": 4221}, \"passed\": false}, {\"check\": \"partial repair probe: surge product rounding\", \"actual\": {\"surged\": 7212, \"discount\": 0, \"tax\": 462, \"total\": 7849}, \"expected\": {\"discount\": 0, \"surged\": 7213, \"tax\": 462, \"total\": 7850}, \"passed\": false}, {\"check\": \"second regression\", \"actual\": {\"surged\": 2254, \"discount\": 450, \"tax\": 205, \"total\": 2629}, \"expected\": {\"discount\": 451, \"surged\": 2255, \"tax\": 205, \"total\": 2629}, \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": {\"surged\": 2490, \"discount\": 498, \"tax\": 199, \"total\": 2881}, \"expected\": {\"discount\": 498, \"surged\": 2490, \"tax\": 199, \"total\": 2881}, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": {\"surged\": 3830, \"discount\": 5, \"tax\": 0, \"total\": 4070}, \"expected\": {\"discount\": 5, \"surged\": 3830, \"tax\": 0, \"total\": 4070}, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": {\"surged\": 1650, \"discount\": 825, \"tax\": 83, \"total\": 1283}, \"expected\": {\"discount\": 825, \"surged\": 1650, \"tax\": 83, \"total\": 1283}, \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": {\"surged\": 2887, \"discount\": 0, \"tax\": 238, \"total\": 3500}, \"expected\": {\"discount\": 0, \"surged\": 2887, \"tax\": 238, \"total\": 3500}, \"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."}}