{"abstract":"Cordon congestion charge returns a wrong result when saturday is charged.","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":"Treating day 0 as Sunday exempts Monday and charges Saturday.","family":"w2-toll_and_parking_fee_computation-congestion-charge-weekend","id":"FA-68546","implementations":{"attempt":{"sha256":"0abe223c18792fdf62b2a91d794e28f2a2e6e9fdd75bbc3e6de1a14b368865d6","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 in (0, 6):\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': [[7, 1011], [2, 457], [5, 795], [8, 472], [5, 720], [4, 569], [0, 734], [8, 1142]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 4400), ({'crossings': [[7, 315], [4, 625], [7, 300], [6, 1179], [0, 470], [3, 1200], [7, 408], [9, 859]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[1, 1264], [8, 433], [8, 428], [7, 372], [6, 974], [3, 363], [0, 1276], [9, 442]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 4000), ({'crossings': [[2, 620], [4, 1014], [8, 1202], [5, 705]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 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': [[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, 715], [8, 886], [5, 1195], [7, 1063], [5, 1183], [5, 1173], [6, 1131], [3, 1187]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': True, 'grace': 15}, 0), ({'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': [[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': [[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': [[7, 1100], [7, 1151], [7, 1110], [4, 492], [8, 1149], [9, 300], [7, 1105]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2750), ({'crossings': [[2, 590], [0, 765], [6, 889], [0, 775], [8, 1250], [5, 861], [2, 345], [4, 936], [8, 801]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2150), ({'crossings': [[2, 1117], [4, 851], [3, 589], [8, 775], [6, 600], [0, 1194], [2, 1107], [6, 384]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, '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': [[9, 748], [0, 1184], [1, 874], [7, 1258], [6, 703], [7, 1268], [6, 939], [6, 799]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 800), ({'crossings': [[5, 786]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 0)], [({'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': [[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': [[3, 754], [3, 759], [0, 309], [2, 1116], [9, 1181], [5, 1282], [3, 734], [7, 419], [8, 971], [7, 931]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 3200), ({'crossings': [[0, 576], [0, 566]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 1000), ({'crossings': [[0, 1137], [0, 1132], [0, 1127], [5, 1045], [3, 734]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1300), ({'crossings': [[2, 449], [2, 645]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': True, 'grace': 10}, 0), ({'crossings': [[5, 1131], [9, 680], [4, 409], [6, 1038], [9, 350], [6, 1048], [1, 697], [2, 718], [0, 372]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 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': [[0, 938], [5, 366], [3, 483], [5, 1185], [9, 605], [5, 356], [7, 1233], [0, 756]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1700), ({'crossings': [[9, 806], [9, 791]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 500), ({'crossings': [[6, 665], [6, 653]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 0), ({'crossings': [[6, 1222], [4, 460], [2, 1209], [5, 936], [3, 638], [2, 940], [2, 524], [2, 648]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 2600), ({'crossings': [[7, 446], [9, 991]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 2000), ({'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': [[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': [[1, 547], [1, 869], [7, 1218], [2, 625], [9, 660], [2, 929], [1, 881], [6, 885]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2100), ({'crossings': [[4, 934], [2, 398], [7, 1029], [4, 924], [0, 1175], [4, 939], [2, 362]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': True, 'grace': 10}, 0), ({'crossings': [[9, 1270], [5, 335], [0, 685], [0, 1088], [9, 1258]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1500), ({'crossings': [[7, 916], [7, 402], [1, 613], [6, 519], [1, 623], [1, 628], [0, 750], [5, 734]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2150), ({'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': [[0, 320], [5, 385], [2, 1238], [0, 315]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 600), ({'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, 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":"859f8442e13179039fd3080f25b249e24878714b7ad80a410b7f1d44694102b1","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': [[7, 1011], [2, 457], [5, 795], [8, 472], [5, 720], [4, 569], [0, 734], [8, 1142]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 4400), ({'crossings': [[7, 315], [4, 625], [7, 300], [6, 1179], [0, 470], [3, 1200], [7, 408], [9, 859]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[1, 1264], [8, 433], [8, 428], [7, 372], [6, 974], [3, 363], [0, 1276], [9, 442]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 4000), ({'crossings': [[2, 620], [4, 1014], [8, 1202], [5, 705]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 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': [[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, 715], [8, 886], [5, 1195], [7, 1063], [5, 1183], [5, 1173], [6, 1131], [3, 1187]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': True, 'grace': 15}, 0), ({'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': [[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': [[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': [[7, 1100], [7, 1151], [7, 1110], [4, 492], [8, 1149], [9, 300], [7, 1105]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2750), ({'crossings': [[2, 590], [0, 765], [6, 889], [0, 775], [8, 1250], [5, 861], [2, 345], [4, 936], [8, 801]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2150), ({'crossings': [[2, 1117], [4, 851], [3, 589], [8, 775], [6, 600], [0, 1194], [2, 1107], [6, 384]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, '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': [[9, 748], [0, 1184], [1, 874], [7, 1258], [6, 703], [7, 1268], [6, 939], [6, 799]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 800), ({'crossings': [[5, 786]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 0)], [({'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': [[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': [[3, 754], [3, 759], [0, 309], [2, 1116], [9, 1181], [5, 1282], [3, 734], [7, 419], [8, 971], [7, 931]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 3200), ({'crossings': [[0, 576], [0, 566]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 1000), ({'crossings': [[0, 1137], [0, 1132], [0, 1127], [5, 1045], [3, 734]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1300), ({'crossings': [[2, 449], [2, 645]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': True, 'grace': 10}, 0), ({'crossings': [[5, 1131], [9, 680], [4, 409], [6, 1038], [9, 350], [6, 1048], [1, 697], [2, 718], [0, 372]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 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': [[0, 938], [5, 366], [3, 483], [5, 1185], [9, 605], [5, 356], [7, 1233], [0, 756]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1700), ({'crossings': [[9, 806], [9, 791]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 500), ({'crossings': [[6, 665], [6, 653]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 0), ({'crossings': [[6, 1222], [4, 460], [2, 1209], [5, 936], [3, 638], [2, 940], [2, 524], [2, 648]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 2600), ({'crossings': [[7, 446], [9, 991]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 2000), ({'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': [[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': [[1, 547], [1, 869], [7, 1218], [2, 625], [9, 660], [2, 929], [1, 881], [6, 885]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2100), ({'crossings': [[4, 934], [2, 398], [7, 1029], [4, 924], [0, 1175], [4, 939], [2, 362]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': True, 'grace': 10}, 0), ({'crossings': [[9, 1270], [5, 335], [0, 685], [0, 1088], [9, 1258]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1500), ({'crossings': [[7, 916], [7, 402], [1, 613], [6, 519], [1, 623], [1, 628], [0, 750], [5, 734]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2150), ({'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': [[0, 320], [5, 385], [2, 1238], [0, 315]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 600), ({'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, 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":"ab04d040c84839e4fec6104d0c803dd4797685214a34da0f163561dfa6a8c68d","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': [[7, 1011], [2, 457], [5, 795], [8, 472], [5, 720], [4, 569], [0, 734], [8, 1142]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 4400), ({'crossings': [[7, 315], [4, 625], [7, 300], [6, 1179], [0, 470], [3, 1200], [7, 408], [9, 859]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2700), ({'crossings': [[1, 1264], [8, 433], [8, 428], [7, 372], [6, 974], [3, 363], [0, 1276], [9, 442]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 4000), ({'crossings': [[2, 620], [4, 1014], [8, 1202], [5, 705]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 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': [[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, 715], [8, 886], [5, 1195], [7, 1063], [5, 1183], [5, 1173], [6, 1131], [3, 1187]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': True, 'grace': 15}, 0), ({'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': [[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': [[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': [[7, 1100], [7, 1151], [7, 1110], [4, 492], [8, 1149], [9, 300], [7, 1105]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2750), ({'crossings': [[2, 590], [0, 765], [6, 889], [0, 775], [8, 1250], [5, 861], [2, 345], [4, 936], [8, 801]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2150), ({'crossings': [[2, 1117], [4, 851], [3, 589], [8, 775], [6, 600], [0, 1194], [2, 1107], [6, 384]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, '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': [[9, 748], [0, 1184], [1, 874], [7, 1258], [6, 703], [7, 1268], [6, 939], [6, 799]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 800), ({'crossings': [[5, 786]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 0)], [({'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': [[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': [[3, 754], [3, 759], [0, 309], [2, 1116], [9, 1181], [5, 1282], [3, 734], [7, 419], [8, 971], [7, 931]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 200, 'daily_cap': 2000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 3200), ({'crossings': [[0, 576], [0, 566]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 250, 'daily_cap': 2000, 'weekend_free': False, 'zero_emission': False, 'grace': 10}, 1000), ({'crossings': [[0, 1137], [0, 1132], [0, 1127], [5, 1045], [3, 734]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1300), ({'crossings': [[2, 449], [2, 645]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': True, 'grace': 10}, 0), ({'crossings': [[5, 1131], [9, 680], [4, 409], [6, 1038], [9, 350], [6, 1048], [1, 697], [2, 718], [0, 372]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 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': [[0, 938], [5, 366], [3, 483], [5, 1185], [9, 605], [5, 356], [7, 1233], [0, 756]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 1700), ({'crossings': [[9, 806], [9, 791]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 500), ({'crossings': [[6, 665], [6, 653]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 0), ({'crossings': [[6, 1222], [4, 460], [2, 1209], [5, 936], [3, 638], [2, 940], [2, 524], [2, 648]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 2600), ({'crossings': [[7, 446], [9, 991]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 1000, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 2000), ({'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': [[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': [[1, 547], [1, 869], [7, 1218], [2, 625], [9, 660], [2, 929], [1, 881], [6, 885]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 10}, 2100), ({'crossings': [[4, 934], [2, 398], [7, 1029], [4, 924], [0, 1175], [4, 939], [2, 362]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 200, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': True, 'grace': 10}, 0), ({'crossings': [[9, 1270], [5, 335], [0, 685], [0, 1088], [9, 1258]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 3000, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 1500), ({'crossings': [[7, 916], [7, 402], [1, 613], [6, 519], [1, 623], [1, 628], [0, 750], [5, 734]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 250, 'daily_cap': 3000, 'weekend_free': False, 'zero_emission': False, 'grace': 15}, 2150), ({'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': [[0, 320], [5, 385], [2, 1238], [0, 315]], 'peak': [[420, 600], [960, 1140]], 'peak_fee': 900, 'offpeak_fee': 300, 'daily_cap': 1500, 'weekend_free': True, 'zero_emission': False, 'grace': 15}, 600), ({'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, 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-weekend","generated_at":"2026-09-29T14:48:03.185221+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 weekend exemption rule so that the step reads `d % 7 >= 5`.","root_cause":"Only day index 6 is exempt, so Saturday crossings are charged.","sha256":"f8597d9cf996d755cb831b54fc4df54825ee58513b8cabcd138d58da3c762b10","title":"Cordon congestion charge: Saturday is charged · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.57,"exit_code":1,"observations":[{"actual":3600,"check":"fee oracle 0","expected":4400,"passed":false},{"actual":900,"check":"fee oracle 1","expected":2700,"passed":false},{"actual":4000,"check":"fee oracle 2","expected":4000,"passed":true},{"actual":1800,"check":"fee oracle 3","expected":1500,"passed":false},{"actual":900,"check":"fee oracle 4","expected":900,"passed":true},{"actual":2700,"check":"fee oracle 5","expected":2700,"passed":true},{"actual":0,"check":"fee oracle 6","expected":0,"passed":true},{"actual":1400,"check":"fee oracle 7","expected":1400,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 3600, \"expected\": 4400, \"passed\": false}, {\"check\": \"fee oracle 1\", \"actual\": 900, \"expected\": 2700, \"passed\": false}, {\"check\": \"fee oracle 2\", \"actual\": 4000, \"expected\": 4000, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 1800, \"expected\": 1500, \"passed\": false}, {\"check\": \"fee oracle 4\", \"actual\": 900, \"expected\": 900, \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": 2700, \"expected\": 2700, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.189,"exit_code":1,"observations":[{"actual":4800,"check":"fee oracle 0","expected":4400,"passed":false},{"actual":2700,"check":"fee oracle 1","expected":2700,"passed":true},{"actual":4000,"check":"fee oracle 2","expected":4000,"passed":true},{"actual":1800,"check":"fee oracle 3","expected":1500,"passed":false},{"actual":1800,"check":"fee oracle 4","expected":900,"passed":false},{"actual":2700,"check":"fee oracle 5","expected":2700,"passed":true},{"actual":0,"check":"fee oracle 6","expected":0,"passed":true},{"actual":1400,"check":"fee oracle 7","expected":1400,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 4800, \"expected\": 4400, \"passed\": false}, {\"check\": \"fee oracle 1\", \"actual\": 2700, \"expected\": 2700, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 4000, \"expected\": 4000, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 1800, \"expected\": 1500, \"passed\": false}, {\"check\": \"fee oracle 4\", \"actual\": 1800, \"expected\": 900, \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": 2700, \"expected\": 2700, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.042,"exit_code":0,"observations":[{"actual":4400,"check":"fee oracle 0","expected":4400,"passed":true},{"actual":2700,"check":"fee oracle 1","expected":2700,"passed":true},{"actual":4000,"check":"fee oracle 2","expected":4000,"passed":true},{"actual":1500,"check":"fee oracle 3","expected":1500,"passed":true},{"actual":900,"check":"fee oracle 4","expected":900,"passed":true},{"actual":2700,"check":"fee oracle 5","expected":2700,"passed":true},{"actual":0,"check":"fee oracle 6","expected":0,"passed":true},{"actual":1400,"check":"fee oracle 7","expected":1400,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 4400, \"expected\": 4400, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": 2700, \"expected\": 2700, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 4000, \"expected\": 4000, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 1500, \"expected\": 1500, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": 900, \"expected\": 900, \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": 2700, \"expected\": 2700, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}