{"abstract":"Pay-by-plate invoice and tag discount returns a wrong result when invoice periods assume 1-based days.","category":"Toll and parking fee computation","checks":8,"contract":"Input {trips: [[day (0-based), base cents, tag|plate|exempt]], plate_surcharge_pct, tag_discount_pct, invoice_fee, cycle_days}. Exempt trips are ignored. Tag trips pay base minus a discount floored to cents. Plate trips pay base plus a surcharge rounded up to cents and are grouped into invoices by billing period day // cycle_days; each invoice adds one invoice_fee to the plate total. Return {tag, plate, invoices}.","contract_signature":"x","evaluation_group":"w2-toll_and_parking_fee_computation-plate-invoice","failed_approach":"Shifting to 1-based days moves day 0 and each period boundary into the wrong invoice.","family":"w2-toll_and_parking_fee_computation-plate-invoice-invoice-period","id":"FA-68591","implementations":{"attempt":{"sha256":"cc56c3b1e0a4fb1cb40c3112e291b4b9f28a7890f312a6bf2ed3e1161a357a1f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    tag = plate = 0\n    periods = set()\n    for day, base, method in x['trips']:\n        if method == 'exempt':\n            continue\n        if method == 'tag':\n            tag += base - base * x['tag_discount_pct'] // 100\n        else:\n            plate += base + -(-base * x['plate_surcharge_pct'] // 100)\n            periods.add((day - 1) // x['cycle_days'])\n    fees = len(periods) * x['invoice_fee']\n    return {'tag': tag, 'plate': plate + fees, 'invoices': len(periods)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'trips': [[14, 410, 'tag'], [35, 525, 'tag'], [37, 333, 'tag'], [82, 525, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1206, 'plate': 1057, 'invoices': 1}), ({'trips': [[92, 525, 'plate'], [25, 250, 'exempt'], [84, 525, 'plate'], [83, 175, 'tag'], [49, 410, 'plate'], [76, 250, 'plate'], [82, 250, 'plate'], [2, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 458, 'plate': 3848, 'invoices': 3}), ({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[85, 410, 'exempt'], [7, 410, 'plate'], [31, 175, 'plate'], [7, 410, 'exempt'], [58, 175, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 149, 'plate': 1532, 'invoices': 2}), ({'trips': [[83, 175, 'plate'], [80, 250, 'plate'], [2, 250, 'plate'], [84, 525, 'tag'], [1, 175, 'plate'], [14, 175, 'plate'], [4, 333, 'plate'], [76, 410, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 499, 'plate': 3454, 'invoices': 2}), ({'trips': [[49, 333, 'tag'], [86, 175, 'plate'], [46, 410, 'exempt'], [64, 333, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 568, 'plate': 419, 'invoices': 1}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[53, 410, 'tag'], [9, 250, 'plate'], [81, 525, 'exempt'], [50, 525, 'plate'], [44, 525, 'plate'], [88, 333, 'exempt']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 2156, 'invoices': 2})], [({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[5, 250, 'exempt'], [20, 333, 'tag'], [44, 333, 'plate'], [5, 175, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 484, 'plate': 650, 'invoices': 1}), ({'trips': [[37, 250, 'exempt'], [61, 525, 'tag'], [38, 410, 'plate'], [90, 333, 'plate'], [72, 250, 'plate'], [79, 410, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 447, 'plate': 2156, 'invoices': 2}), ({'trips': [[70, 333, 'plate'], [91, 525, 'tag'], [91, 410, 'tag'], [81, 175, 'plate'], [44, 175, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 945, 'plate': 1087, 'invoices': 1}), ({'trips': [[68, 175, 'plate'], [69, 175, 'plate'], [28, 175, 'exempt'], [45, 175, 'plate'], [80, 410, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 349, 'plate': 1111, 'invoices': 2}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[41, 333, 'plate'], [81, 250, 'plate'], [31, 525, 'plate'], [93, 333, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 284, 'plate': 2463, 'invoices': 2}), ({'trips': [[78, 410, 'tag'], [76, 410, 'tag'], [1, 525, 'tag'], [57, 410, 'plate'], [79, 410, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1580, 'plate': 913, 'invoices': 1})], [({'trips': [[30, 175, 'exempt']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 0, 'plate': 0, 'invoices': 0}), ({'trips': [[47, 333, 'plate'], [14, 525, 'tag'], [23, 333, 'exempt'], [70, 525, 'exempt'], [30, 250, 'plate'], [50, 410, 'plate'], [93, 175, 'tag'], [34, 525, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 1043, 'plate': 1443, 'invoices': 1}), ({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[8, 250, 'tag'], [67, 175, 'plate'], [78, 410, 'plate'], [94, 175, 'exempt'], [0, 333, 'tag'], [85, 175, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 683, 'plate': 882, 'invoices': 1}), ({'trips': [[75, 525, 'tag'], [36, 333, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 447, 'plate': 617, 'invoices': 1}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[72, 250, 'tag'], [80, 250, 'tag'], [50, 410, 'plate'], [26, 333, 'exempt'], [57, 250, 'tag'], [95, 250, 'tag'], [34, 525, 'plate'], [42, 333, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 1136, 'plate': 1570, 'invoices': 1}), ({'trips': [[66, 250, 'plate'], [47, 333, 'tag'], [83, 250, 'tag'], [80, 525, 'plate'], [46, 333, 'tag'], [94, 250, 'plate'], [40, 333, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 825, 'plate': 2285, 'invoices': 3})], [({'trips': [[68, 525, 'tag'], [24, 410, 'tag'], [73, 333, 'plate'], [7, 175, 'tag'], [24, 525, 'plate'], [28, 175, 'plate'], [56, 525, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 945, 'plate': 2705, 'invoices': 3}), ({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[66, 175, 'plate'], [90, 410, 'plate'], [22, 175, 'tag'], [32, 410, 'tag'], [12, 175, 'plate'], [1, 333, 'tag'], [7, 410, 'exempt'], [87, 250, 'exempt']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 827, 'plate': 1741, 'invoices': 3}), ({'trips': [[64, 525, 'plate'], [1, 410, 'tag'], [9, 333, 'plate'], [95, 333, 'tag'], [5, 410, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 707, 'plate': 2303, 'invoices': 2}), ({'trips': [[35, 410, 'tag'], [33, 175, 'tag'], [41, 175, 'tag'], [2, 175, 'tag'], [75, 250, 'tag'], [8, 525, 'plate'], [7, 525, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1541, 'plate': 1057, 'invoices': 1}), ({'trips': [[9, 525, 'tag'], [51, 525, 'exempt'], [55, 175, 'plate'], [71, 525, 'plate'], [83, 175, 'plate'], [84, 333, 'plate'], [9, 250, 'plate'], [31, 333, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 447, 'plate': 2692, 'invoices': 3}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[60, 333, 'exempt'], [43, 525, 'tag'], [18, 525, 'tag'], [30, 250, 'plate'], [73, 525, 'exempt'], [73, 333, 'exempt'], [83, 250, 'exempt']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 946, 'plate': 525, 'invoices': 1})], [({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[82, 525, 'plate'], [0, 525, 'tag'], [10, 175, 'exempt'], [72, 525, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 499, 'plate': 1514, 'invoices': 1}), ({'trips': [[32, 333, 'tag'], [38, 333, 'plate'], [80, 175, 'plate'], [48, 175, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 284, 'plate': 1655, 'invoices': 2}), ({'trips': [[73, 525, 'tag'], [84, 525, 'plate'], [90, 250, 'plate'], [15, 175, 'plate'], [29, 333, 'tag'], [61, 525, 'plate'], [71, 250, 'exempt'], [52, 175, 'exempt']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 816, 'plate': 2446, 'invoices': 3}), ({'trips': [[81, 250, 'plate'], [66, 525, 'plate'], [45, 333, 'tag'], [38, 333, 'plate'], [61, 410, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 707, 'plate': 1687, 'invoices': 2}), ({'trips': [[93, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 349, 'plate': 0, 'invoices': 0}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[66, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 317, 'plate': 0, 'invoices': 0})]]\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":"54bffd59cfe9b24956e232962c832eea0d87d6854d66aa74f2f811a370740ca6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    tag = plate = 0\n    periods = set()\n    for day, base, method in x['trips']:\n        if method == 'exempt':\n            continue\n        if method == 'tag':\n            tag += base - base * x['tag_discount_pct'] // 100\n        else:\n            plate += base + -(-base * x['plate_surcharge_pct'] // 100)\n            periods.add(day)\n    fees = len(periods) * x['invoice_fee']\n    return {'tag': tag, 'plate': plate + fees, 'invoices': len(periods)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'trips': [[14, 410, 'tag'], [35, 525, 'tag'], [37, 333, 'tag'], [82, 525, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1206, 'plate': 1057, 'invoices': 1}), ({'trips': [[92, 525, 'plate'], [25, 250, 'exempt'], [84, 525, 'plate'], [83, 175, 'tag'], [49, 410, 'plate'], [76, 250, 'plate'], [82, 250, 'plate'], [2, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 458, 'plate': 3848, 'invoices': 3}), ({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[85, 410, 'exempt'], [7, 410, 'plate'], [31, 175, 'plate'], [7, 410, 'exempt'], [58, 175, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 149, 'plate': 1532, 'invoices': 2}), ({'trips': [[83, 175, 'plate'], [80, 250, 'plate'], [2, 250, 'plate'], [84, 525, 'tag'], [1, 175, 'plate'], [14, 175, 'plate'], [4, 333, 'plate'], [76, 410, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 499, 'plate': 3454, 'invoices': 2}), ({'trips': [[49, 333, 'tag'], [86, 175, 'plate'], [46, 410, 'exempt'], [64, 333, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 568, 'plate': 419, 'invoices': 1}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[53, 410, 'tag'], [9, 250, 'plate'], [81, 525, 'exempt'], [50, 525, 'plate'], [44, 525, 'plate'], [88, 333, 'exempt']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 2156, 'invoices': 2})], [({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[5, 250, 'exempt'], [20, 333, 'tag'], [44, 333, 'plate'], [5, 175, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 484, 'plate': 650, 'invoices': 1}), ({'trips': [[37, 250, 'exempt'], [61, 525, 'tag'], [38, 410, 'plate'], [90, 333, 'plate'], [72, 250, 'plate'], [79, 410, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 447, 'plate': 2156, 'invoices': 2}), ({'trips': [[70, 333, 'plate'], [91, 525, 'tag'], [91, 410, 'tag'], [81, 175, 'plate'], [44, 175, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 945, 'plate': 1087, 'invoices': 1}), ({'trips': [[68, 175, 'plate'], [69, 175, 'plate'], [28, 175, 'exempt'], [45, 175, 'plate'], [80, 410, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 349, 'plate': 1111, 'invoices': 2}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[41, 333, 'plate'], [81, 250, 'plate'], [31, 525, 'plate'], [93, 333, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 284, 'plate': 2463, 'invoices': 2}), ({'trips': [[78, 410, 'tag'], [76, 410, 'tag'], [1, 525, 'tag'], [57, 410, 'plate'], [79, 410, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1580, 'plate': 913, 'invoices': 1})], [({'trips': [[30, 175, 'exempt']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 0, 'plate': 0, 'invoices': 0}), ({'trips': [[47, 333, 'plate'], [14, 525, 'tag'], [23, 333, 'exempt'], [70, 525, 'exempt'], [30, 250, 'plate'], [50, 410, 'plate'], [93, 175, 'tag'], [34, 525, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 1043, 'plate': 1443, 'invoices': 1}), ({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[8, 250, 'tag'], [67, 175, 'plate'], [78, 410, 'plate'], [94, 175, 'exempt'], [0, 333, 'tag'], [85, 175, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 683, 'plate': 882, 'invoices': 1}), ({'trips': [[75, 525, 'tag'], [36, 333, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 447, 'plate': 617, 'invoices': 1}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[72, 250, 'tag'], [80, 250, 'tag'], [50, 410, 'plate'], [26, 333, 'exempt'], [57, 250, 'tag'], [95, 250, 'tag'], [34, 525, 'plate'], [42, 333, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 1136, 'plate': 1570, 'invoices': 1}), ({'trips': [[66, 250, 'plate'], [47, 333, 'tag'], [83, 250, 'tag'], [80, 525, 'plate'], [46, 333, 'tag'], [94, 250, 'plate'], [40, 333, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 825, 'plate': 2285, 'invoices': 3})], [({'trips': [[68, 525, 'tag'], [24, 410, 'tag'], [73, 333, 'plate'], [7, 175, 'tag'], [24, 525, 'plate'], [28, 175, 'plate'], [56, 525, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 945, 'plate': 2705, 'invoices': 3}), ({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[66, 175, 'plate'], [90, 410, 'plate'], [22, 175, 'tag'], [32, 410, 'tag'], [12, 175, 'plate'], [1, 333, 'tag'], [7, 410, 'exempt'], [87, 250, 'exempt']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 827, 'plate': 1741, 'invoices': 3}), ({'trips': [[64, 525, 'plate'], [1, 410, 'tag'], [9, 333, 'plate'], [95, 333, 'tag'], [5, 410, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 707, 'plate': 2303, 'invoices': 2}), ({'trips': [[35, 410, 'tag'], [33, 175, 'tag'], [41, 175, 'tag'], [2, 175, 'tag'], [75, 250, 'tag'], [8, 525, 'plate'], [7, 525, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1541, 'plate': 1057, 'invoices': 1}), ({'trips': [[9, 525, 'tag'], [51, 525, 'exempt'], [55, 175, 'plate'], [71, 525, 'plate'], [83, 175, 'plate'], [84, 333, 'plate'], [9, 250, 'plate'], [31, 333, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 447, 'plate': 2692, 'invoices': 3}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[60, 333, 'exempt'], [43, 525, 'tag'], [18, 525, 'tag'], [30, 250, 'plate'], [73, 525, 'exempt'], [73, 333, 'exempt'], [83, 250, 'exempt']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 946, 'plate': 525, 'invoices': 1})], [({'trips': [[29, 250, 'plate'], [30, 250, 'plate'], [5, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 1076, 'invoices': 2}), ({'trips': [[82, 525, 'plate'], [0, 525, 'tag'], [10, 175, 'exempt'], [72, 525, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 499, 'plate': 1514, 'invoices': 1}), ({'trips': [[32, 333, 'tag'], [38, 333, 'plate'], [80, 175, 'plate'], [48, 175, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 284, 'plate': 1655, 'invoices': 2}), ({'trips': [[73, 525, 'tag'], [84, 525, 'plate'], [90, 250, 'plate'], [15, 175, 'plate'], [29, 333, 'tag'], [61, 525, 'plate'], [71, 250, 'exempt'], [52, 175, 'exempt']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 816, 'plate': 2446, 'invoices': 3}), ({'trips': [[81, 250, 'plate'], [66, 525, 'plate'], [45, 333, 'tag'], [38, 333, 'plate'], [61, 410, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 707, 'plate': 1687, 'invoices': 2}), ({'trips': [[93, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 349, 'plate': 0, 'invoices': 0}), ({'trips': [[3, 410, 'exempt'], [4, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 0, 'invoices': 0}), ({'trips': [[66, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 317, 'plate': 0, 'invoices': 0})]]\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-plate-invoice-invoice-period","generated_at":"2026-09-29T14:48:03.647670+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.","root_cause":"Each travel day becomes its own invoice, multiplying invoice fees.","sha256":"b82d983a6a73f009a22f50c9aba5866422ae20643412a94286bec24515eb71d1","title":"Pay-by-plate invoice and tag discount: invoice periods assume 1-based days · 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":41.925,"exit_code":1,"observations":[{"actual":{"invoices":1,"plate":1057,"tag":1206},"check":"fee oracle 0","expected":{"invoices":1,"plate":1057,"tag":1206},"passed":true},{"actual":{"invoices":3,"plate":3848,"tag":458},"check":"fee oracle 1","expected":{"invoices":3,"plate":3848,"tag":458},"passed":true},{"actual":{"invoices":1,"plate":876,"tag":284},"check":"fee oracle 2","expected":{"invoices":2,"plate":1076,"tag":284},"passed":false},{"actual":{"invoices":1,"plate":1132,"tag":149},"check":"fee oracle 3","expected":{"invoices":2,"plate":1532,"tag":149},"passed":false},{"actual":{"invoices":2,"plate":3454,"tag":499},"check":"fee oracle 4","expected":{"invoices":2,"plate":3454,"tag":499},"passed":true},{"actual":{"invoices":1,"plate":419,"tag":568},"check":"fee oracle 5","expected":{"invoices":1,"plate":419,"tag":568},"passed":true},{"actual":{"invoices":0,"plate":0,"tag":369},"check":"fee oracle 6","expected":{"invoices":0,"plate":0,"tag":369},"passed":true},{"actual":{"invoices":2,"plate":2156,"tag":369},"check":"fee oracle 7","expected":{"invoices":2,"plate":2156,"tag":369},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": {\"tag\": 1206, \"plate\": 1057, \"invoices\": 1}, \"expected\": {\"tag\": 1206, \"plate\": 1057, \"invoices\": 1}, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": {\"tag\": 458, \"plate\": 3848, \"invoices\": 3}, \"expected\": {\"tag\": 458, \"plate\": 3848, \"invoices\": 3}, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": {\"tag\": 284, \"plate\": 876, \"invoices\": 1}, \"expected\": {\"tag\": 284, \"plate\": 1076, \"invoices\": 2}, \"passed\": false}, {\"check\": \"fee oracle 3\", \"actual\": {\"tag\": 149, \"plate\": 1132, \"invoices\": 1}, \"expected\": {\"tag\": 149, \"plate\": 1532, \"invoices\": 2}, \"passed\": false}, {\"check\": \"fee oracle 4\", \"actual\": {\"tag\": 499, \"plate\": 3454, \"invoices\": 2}, \"expected\": {\"tag\": 499, \"plate\": 3454, \"invoices\": 2}, \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": {\"tag\": 568, \"plate\": 419, \"invoices\": 1}, \"expected\": {\"tag\": 568, \"plate\": 419, \"invoices\": 1}, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": {\"tag\": 369, \"plate\": 0, \"invoices\": 0}, \"expected\": {\"tag\": 369, \"plate\": 0, \"invoices\": 0}, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": {\"tag\": 369, \"plate\": 2156, \"invoices\": 2}, \"expected\": {\"tag\": 369, \"plate\": 2156, \"invoices\": 2}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.372,"exit_code":1,"observations":[{"actual":{"invoices":1,"plate":1057,"tag":1206},"check":"fee oracle 0","expected":{"invoices":1,"plate":1057,"tag":1206},"passed":true},{"actual":{"invoices":5,"plate":4648,"tag":458},"check":"fee oracle 1","expected":{"invoices":3,"plate":3848,"tag":458},"passed":false},{"actual":{"invoices":2,"plate":1076,"tag":284},"check":"fee oracle 2","expected":{"invoices":2,"plate":1076,"tag":284},"passed":true},{"actual":{"invoices":2,"plate":1532,"tag":149},"check":"fee oracle 3","expected":{"invoices":2,"plate":1532,"tag":149},"passed":true},{"actual":{"invoices":7,"plate":5454,"tag":499},"check":"fee oracle 4","expected":{"invoices":2,"plate":3454,"tag":499},"passed":false},{"actual":{"invoices":1,"plate":419,"tag":568},"check":"fee oracle 5","expected":{"invoices":1,"plate":419,"tag":568},"passed":true},{"actual":{"invoices":0,"plate":0,"tag":369},"check":"fee oracle 6","expected":{"invoices":0,"plate":0,"tag":369},"passed":true},{"actual":{"invoices":3,"plate":2356,"tag":369},"check":"fee oracle 7","expected":{"invoices":2,"plate":2156,"tag":369},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": {\"tag\": 1206, \"plate\": 1057, \"invoices\": 1}, \"expected\": {\"tag\": 1206, \"plate\": 1057, \"invoices\": 1}, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": {\"tag\": 458, \"plate\": 4648, \"invoices\": 5}, \"expected\": {\"tag\": 458, \"plate\": 3848, \"invoices\": 3}, \"passed\": false}, {\"check\": \"fee oracle 2\", \"actual\": {\"tag\": 284, \"plate\": 1076, \"invoices\": 2}, \"expected\": {\"tag\": 284, \"plate\": 1076, \"invoices\": 2}, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": {\"tag\": 149, \"plate\": 1532, \"invoices\": 2}, \"expected\": {\"tag\": 149, \"plate\": 1532, \"invoices\": 2}, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": {\"tag\": 499, \"plate\": 5454, \"invoices\": 7}, \"expected\": {\"tag\": 499, \"plate\": 3454, \"invoices\": 2}, \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": {\"tag\": 568, \"plate\": 419, \"invoices\": 1}, \"expected\": {\"tag\": 568, \"plate\": 419, \"invoices\": 1}, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": {\"tag\": 369, \"plate\": 0, \"invoices\": 0}, \"expected\": {\"tag\": 369, \"plate\": 0, \"invoices\": 0}, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": {\"tag\": 369, \"plate\": 2356, \"invoices\": 3}, \"expected\": {\"tag\": 369, \"plate\": 2156, \"invoices\": 2}, \"passed\": false}], \"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."}}