{"abstract":"Cordon congestion charge returns a wrong result when the peak window includes its end minute.","category":"Toll and parking fee computation","checks":8,"contract":"Input {crossings: [[day, minute]] unordered, peak: [[start, end)] windows, peak_fee, offpeak_fee, daily_cap, weekend_free, zero_emission, grace}. Zero-emission vehicles pay 0. Days with day % 7 in {5, 6} are free when weekend_free. Within a day, a crossing no more than grace minutes after the last charged crossing is free (the grace anchor is the charged crossing). Each charged crossing pays the peak fee inside a window else off-peak; each day's sum is capped at daily_cap.","evaluation_group":"w2-toll_and_parking_fee_computation-congestion-charge","failed_approach":"Shifting both edges charges the first peak minute off-peak and the minute after the peak as peak.","family":"w2-toll_and_parking_fee_computation-congestion-charge-peak-window","id":"FA-68541","implementations":{"attempt":{"sha256":"ea888eac7a684ce37edee6c91ad001d73580fed1b8e6921bc351fda487d3261e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if x['zero_emission']:\n        return 0\n    byday = {}\n    for d, m in sorted(x['crossings']):\n        byday.setdefault(d, []).append(m)\n    total = 0\n    for d, ms in byday.items():\n        if x['weekend_free'] and d % 7 >= 5:\n            continue\n        last = None\n        day_sum = 0\n        for m in ms:\n            if last is not None and m - last <= x['grace']:\n                continue\n            last = m\n            peak = any(s < m <= e for s, e in x['peak'])\n            day_sum += x['peak_fee'] if peak else x['offpeak_fee']\n        total += min(day_sum, x['daily_cap'])\n    return total\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'crossings': [[6, 406], [9, 1150], [9, 365], [9, 1140], [7, 883]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 600), ({'crossings': [[7, 419], [0, 577], [2, 538], [3, 418], [2, 1056], [1, 1275], [1, 303], [9, 333]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 1500, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 3650), ({'crossings': [[6, 1265], [2, 510], [3, 1249], [5, 658], [5, 673]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1150), ({'crossings': [[3, 805], [5, 356], [9, 391], [3, 810], [0, 368]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 750), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[7, 573], [3, 540], [5, 1030], [7, 739], [3, 960], [8, 906]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 3600), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900)], [({'crossings': [[1, 1172], [1, 565], [0, 799], [6, 1296], [1, 550], [1, 600], [1, 570]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 2900), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[4, 815], [3, 796], [6, 713], [4, 566], [3, 366], [1, 666], [5, 664], [4, 1087]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2600), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[3, 1140], [1, 924], [5, 1081], [0, 886], [1, 467], [1, 1255], [7, 1290], [1, 472], [1, 353]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2100), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900), ({'crossings': [[9, 1080], [8, 999], [9, 572], [8, 814], [7, 656]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 3100), ({'crossings': [[0, 1157], [1, 338], [3, 478], [1, 1304], [1, 1292], [4, 1195], [5, 620], [1, 793]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 2400)], [({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[9, 740], [3, 1230], [3, 1225]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 600), ({'crossings': [[9, 1224], [9, 685], [2, 831], [3, 1244], [9, 611], [9, 1204]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1800), ({'crossings': [[0, 598], [3, 426], [6, 1284], [6, 1274], [6, 330], [4, 420], [3, 444], [4, 1214]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 3800), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[4, 451], [5, 385], [6, 676], [4, 466], [9, 918], [2, 1010]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 3300), ({'crossings': [[0, 1120], [9, 1245], [0, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 1500), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900)], [({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900), ({'crossings': [[9, 1140], [6, 401], [1, 561], [1, 581], [1, 586]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2400), ({'crossings': [[3, 633], [7, 1147], [4, 1075], [2, 1207], [0, 952], [0, 932], [7, 754], [4, 306], [1, 1277]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 2600), ({'crossings': [[9, 898], [1, 377], [9, 1185], [7, 543], [9, 1195], [9, 1173], [2, 1261], [8, 806], [9, 1133]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 3300), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[0, 457], [0, 442], [0, 871]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1250), ({'crossings': [[6, 1192], [0, 573], [0, 625], [7, 449], [1, 600]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2400), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400)], [({'crossings': [[8, 1081], [8, 805]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1200), ({'crossings': [[2, 1101], [2, 600], [8, 434], [8, 439], [5, 601], [2, 1015]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2900), ({'crossings': [[7, 571], [1, 883], [1, 1152], [4, 405], [0, 1151], [9, 471], [9, 456], [3, 837], [9, 359]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 3600), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900), ({'crossings': [[7, 314], [8, 752], [4, 372], [8, 737]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 750), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[7, 600], [8, 992], [3, 436], [3, 983], [0, 965], [2, 862], [3, 441]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 4200), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('fee oracle' + ' %d' % i, 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":"ba34e9d177936273c40c909c3021b09a3c8104f1da7e960d7d4e8ef5a71349ee","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if x['zero_emission']:\n        return 0\n    byday = {}\n    for d, m in sorted(x['crossings']):\n        byday.setdefault(d, []).append(m)\n    total = 0\n    for d, ms in byday.items():\n        if x['weekend_free'] and d % 7 >= 5:\n            continue\n        last = None\n        day_sum = 0\n        for m in ms:\n            if last is not None and m - last <= x['grace']:\n                continue\n            last = m\n            peak = any(s <= m <= e for s, e in x['peak'])\n            day_sum += x['peak_fee'] if peak else x['offpeak_fee']\n        total += min(day_sum, x['daily_cap'])\n    return total\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'crossings': [[6, 406], [9, 1150], [9, 365], [9, 1140], [7, 883]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 600), ({'crossings': [[7, 419], [0, 577], [2, 538], [3, 418], [2, 1056], [1, 1275], [1, 303], [9, 333]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 1500, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 3650), ({'crossings': [[6, 1265], [2, 510], [3, 1249], [5, 658], [5, 673]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1150), ({'crossings': [[3, 805], [5, 356], [9, 391], [3, 810], [0, 368]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 750), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[7, 573], [3, 540], [5, 1030], [7, 739], [3, 960], [8, 906]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 3600), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900)], [({'crossings': [[1, 1172], [1, 565], [0, 799], [6, 1296], [1, 550], [1, 600], [1, 570]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 2900), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[4, 815], [3, 796], [6, 713], [4, 566], [3, 366], [1, 666], [5, 664], [4, 1087]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2600), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[3, 1140], [1, 924], [5, 1081], [0, 886], [1, 467], [1, 1255], [7, 1290], [1, 472], [1, 353]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2100), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900), ({'crossings': [[9, 1080], [8, 999], [9, 572], [8, 814], [7, 656]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 3100), ({'crossings': [[0, 1157], [1, 338], [3, 478], [1, 1304], [1, 1292], [4, 1195], [5, 620], [1, 793]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 2400)], [({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[9, 740], [3, 1230], [3, 1225]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 600), ({'crossings': [[9, 1224], [9, 685], [2, 831], [3, 1244], [9, 611], [9, 1204]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1800), ({'crossings': [[0, 598], [3, 426], [6, 1284], [6, 1274], [6, 330], [4, 420], [3, 444], [4, 1214]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 3800), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[4, 451], [5, 385], [6, 676], [4, 466], [9, 918], [2, 1010]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 3300), ({'crossings': [[0, 1120], [9, 1245], [0, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 1500), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900)], [({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900), ({'crossings': [[9, 1140], [6, 401], [1, 561], [1, 581], [1, 586]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2400), ({'crossings': [[3, 633], [7, 1147], [4, 1075], [2, 1207], [0, 952], [0, 932], [7, 754], [4, 306], [1, 1277]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 2600), ({'crossings': [[9, 898], [1, 377], [9, 1185], [7, 543], [9, 1195], [9, 1173], [2, 1261], [8, 806], [9, 1133]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 3300), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[0, 457], [0, 442], [0, 871]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1250), ({'crossings': [[6, 1192], [0, 573], [0, 625], [7, 449], [1, 600]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2400), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400)], [({'crossings': [[8, 1081], [8, 805]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1200), ({'crossings': [[2, 1101], [2, 600], [8, 434], [8, 439], [5, 601], [2, 1015]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2900), ({'crossings': [[7, 571], [1, 883], [1, 1152], [4, 405], [0, 1151], [9, 471], [9, 456], [3, 837], [9, 359]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 3600), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900), ({'crossings': [[7, 314], [8, 752], [4, 372], [8, 737]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 750), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[7, 600], [8, 992], [3, 436], [3, 983], [0, 965], [2, 862], [3, 441]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 4200), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('fee oracle' + ' %d' % i, 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":"41aecc6d620aedebc25558f131b4875064cd1ef818d794a959bb4d7b2b7b0fa2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if x['zero_emission']:\n        return 0\n    byday = {}\n    for d, m in sorted(x['crossings']):\n        byday.setdefault(d, []).append(m)\n    total = 0\n    for d, ms in byday.items():\n        if x['weekend_free'] and d % 7 >= 5:\n            continue\n        last = None\n        day_sum = 0\n        for m in ms:\n            if last is not None and m - last <= x['grace']:\n                continue\n            last = m\n            peak = any(s <= m < e for s, e in x['peak'])\n            day_sum += x['peak_fee'] if peak else x['offpeak_fee']\n        total += min(day_sum, x['daily_cap'])\n    return total\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'crossings': [[6, 406], [9, 1150], [9, 365], [9, 1140], [7, 883]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 600), ({'crossings': [[7, 419], [0, 577], [2, 538], [3, 418], [2, 1056], [1, 1275], [1, 303], [9, 333]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 1500, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 3650), ({'crossings': [[6, 1265], [2, 510], [3, 1249], [5, 658], [5, 673]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1150), ({'crossings': [[3, 805], [5, 356], [9, 391], [3, 810], [0, 368]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 750), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[7, 573], [3, 540], [5, 1030], [7, 739], [3, 960], [8, 906]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 3600), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900)], [({'crossings': [[1, 1172], [1, 565], [0, 799], [6, 1296], [1, 550], [1, 600], [1, 570]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 2900), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[4, 815], [3, 796], [6, 713], [4, 566], [3, 366], [1, 666], [5, 664], [4, 1087]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2600), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[3, 1140], [1, 924], [5, 1081], [0, 886], [1, 467], [1, 1255], [7, 1290], [1, 472], [1, 353]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2100), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900), ({'crossings': [[9, 1080], [8, 999], [9, 572], [8, 814], [7, 656]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 3100), ({'crossings': [[0, 1157], [1, 338], [3, 478], [1, 1304], [1, 1292], [4, 1195], [5, 620], [1, 793]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 2400)], [({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[9, 740], [3, 1230], [3, 1225]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 600), ({'crossings': [[9, 1224], [9, 685], [2, 831], [3, 1244], [9, 611], [9, 1204]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1800), ({'crossings': [[0, 598], [3, 426], [6, 1284], [6, 1274], [6, 330], [4, 420], [3, 444], [4, 1214]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 3800), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[4, 451], [5, 385], [6, 676], [4, 466], [9, 918], [2, 1010]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 3300), ({'crossings': [[0, 1120], [9, 1245], [0, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 1500), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900)], [({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900), ({'crossings': [[9, 1140], [6, 401], [1, 561], [1, 581], [1, 586]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2400), ({'crossings': [[3, 633], [7, 1147], [4, 1075], [2, 1207], [0, 952], [0, 932], [7, 754], [4, 306], [1, 1277]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 2600), ({'crossings': [[9, 898], [1, 377], [9, 1185], [7, 543], [9, 1195], [9, 1173], [2, 1261], [8, 806], [9, 1133]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 3300), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[0, 457], [0, 442], [0, 871]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1250), ({'crossings': [[6, 1192], [0, 573], [0, 625], [7, 449], [1, 600]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2400), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400)], [({'crossings': [[8, 1081], [8, 805]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1200), ({'crossings': [[2, 1101], [2, 600], [8, 434], [8, 439], [5, 601], [2, 1015]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2900), ({'crossings': [[7, 571], [1, 883], [1, 1152], [4, 405], [0, 1151], [9, 471], [9, 456], [3, 837], [9, 359]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 3600), ({'crossings': [[6, 500], [0, 500], [5, 500]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 900), ({'crossings': [[7, 314], [8, 752], [4, 372], [8, 737]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 750), ({'crossings': [[2, 600], [2, 420], [2, 1140]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1400), ({'crossings': [[7, 600], [8, 992], [3, 436], [3, 983], [0, 965], [2, 862], [3, 441]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 4200), ({'crossings': [[1, 500], [1, 508], [1, 516], [1, 530]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 5000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('fee oracle' + ' %d' % i, 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, bounded toy model with a stipulated contract; it makes no claim of conformance to any agency manual or standard. 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-toll_and_parking_fee_computation-congestion-charge-peak-window","generated_at":"2026-09-29T14:48:03.174311+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Fee engines bill customers in integer cents; a wrong boundary, rounding stage or cap scope silently over- or under-charges.","repair":"Restore the peak window edges rule so that the step reads `s <= m < e`.","root_cause":"A crossing at the minute the peak ends is charged the peak fee.","sha256":"1b8e59ecfeb90c69bd222a80b2ce24ffdc54edf6a9c12ca9655b9780e0b3be02","title":"Cordon congestion charge: the peak window includes its end minute · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.585,"exit_code":1,"observations":[{"actual":1300,"check":"fee oracle 0","expected":600,"passed":false},{"actual":3650,"check":"fee oracle 1","expected":3650,"passed":true},{"actual":1150,"check":"fee oracle 2","expected":1150,"passed":true},{"actual":750,"check":"fee oracle 3","expected":750,"passed":true},{"actual":2050,"check":"fee oracle 4","expected":1400,"passed":false},{"actual":2900,"check":"fee oracle 5","expected":3600,"passed":false},{"actual":2700,"check":"fee oracle 6","expected":2700,"passed":true},{"actual":900,"check":"fee oracle 7","expected":900,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 1300, \"expected\": 600, \"passed\": false}, {\"check\": \"fee oracle 1\", \"actual\": 3650, \"expected\": 3650, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 1150, \"expected\": 1150, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 750, \"expected\": 750, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": 2050, \"expected\": 1400, \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": 2900, \"expected\": 3600, \"passed\": false}, {\"check\": \"fee oracle 6\", \"actual\": 2700, \"expected\": 2700, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 900, \"expected\": 900, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.129,"exit_code":1,"observations":[{"actual":1300,"check":"fee oracle 0","expected":600,"passed":false},{"actual":3650,"check":"fee oracle 1","expected":3650,"passed":true},{"actual":1150,"check":"fee oracle 2","expected":1150,"passed":true},{"actual":750,"check":"fee oracle 3","expected":750,"passed":true},{"actual":2700,"check":"fee oracle 4","expected":1400,"passed":false},{"actual":3600,"check":"fee oracle 5","expected":3600,"passed":true},{"actual":2700,"check":"fee oracle 6","expected":2700,"passed":true},{"actual":900,"check":"fee oracle 7","expected":900,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 1300, \"expected\": 600, \"passed\": false}, {\"check\": \"fee oracle 1\", \"actual\": 3650, \"expected\": 3650, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 1150, \"expected\": 1150, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 750, \"expected\": 750, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": 2700, \"expected\": 1400, \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": 3600, \"expected\": 3600, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 2700, \"expected\": 2700, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 900, \"expected\": 900, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.417,"exit_code":0,"observations":[{"actual":600,"check":"fee oracle 0","expected":600,"passed":true},{"actual":3650,"check":"fee oracle 1","expected":3650,"passed":true},{"actual":1150,"check":"fee oracle 2","expected":1150,"passed":true},{"actual":750,"check":"fee oracle 3","expected":750,"passed":true},{"actual":1400,"check":"fee oracle 4","expected":1400,"passed":true},{"actual":3600,"check":"fee oracle 5","expected":3600,"passed":true},{"actual":2700,"check":"fee oracle 6","expected":2700,"passed":true},{"actual":900,"check":"fee oracle 7","expected":900,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 600, \"expected\": 600, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": 3650, \"expected\": 3650, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 1150, \"expected\": 1150, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 750, \"expected\": 750, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": 3600, \"expected\": 3600, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 2700, \"expected\": 2700, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 900, \"expected\": 900, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}