{"abstract":"Pay-by-plate invoice and tag discount returns a wrong result when exempt trips fall through to plate billing.","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":"Zeroing the base still opens a plate invoice and its fee for an exempt vehicle.","family":"w2-toll_and_parking_fee_computation-plate-invoice-exempt","id":"FA-68611","implementations":{"attempt":{"sha256":"be0aee9dcc1a0358af1cb6e805edd0f0b53c04ad0240cfac66e40e45b4fd45ec","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            base = 0\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 // 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': [[19, 525, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 447, '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': [[14, 175, 'tag'], [8, 333, 'plate'], [31, 333, 'tag'], [34, 333, 'tag'], [85, 525, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 1300, 'plate': 600, 'invoices': 1}), ({'trips': [[46, 250, 'plate'], [36, 175, 'tag'], [84, 250, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 149, 'plate': 976, 'invoices': 2}), ({'trips': [[28, 410, 'exempt'], [41, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 0, 'invoices': 0}), ({'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': [[86, 525, 'exempt'], [43, 525, 'plate'], [12, 410, 'plate'], [69, 525, 'plate'], [35, 410, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 0, 'plate': 2940, 'invoices': 3}), ({'trips': [[46, 250, 'exempt'], [13, 410, 'tag'], [29, 333, 'plate'], [27, 525, 'exempt']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 650, 'invoices': 1})], [({'trips': [[34, 410, 'plate'], [42, 410, 'tag'], [69, 525, 'plate'], [4, 525, 'tag'], [11, 250, 'exempt'], [87, 525, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1315, 'plate': 2063, 'invoices': 2}), ({'trips': [[77, 250, 'plate'], [50, 175, 'plate'], [14, 175, 'tag'], [81, 250, 'plate'], [89, 333, 'tag'], [61, 250, 'tag'], [19, 333, 'tag'], [9, 333, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 1356, 'plate': 1145, 'invoices': 2}), ({'trips': [[33, 333, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 0, 'plate': 650, 'invoices': 1}), ({'trips': [[76, 250, 'tag'], [39, 175, 'plate'], [95, 175, 'plate'], [20, 333, 'plate'], [78, 410, 'exempt'], [59, 250, 'plate'], [88, 410, 'tag'], [5, 175, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 628, 'plate': 1949, 'invoices': 3}), ({'trips': [[55, 410, 'exempt']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 0, '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': [[19, 525, 'plate'], [51, 410, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 0, 'plate': 1970, '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': [[40, 410, 'tag'], [72, 250, 'exempt'], [22, 410, 'tag'], [1, 525, 'exempt'], [12, 410, 'plate'], [67, 525, 'plate'], [31, 410, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 1170, 'plate': 1470, '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': [[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': [[52, 175, 'plate'], [89, 525, 'tag'], [15, 333, 'plate'], [70, 333, 'plate'], [65, 333, 'tag'], [45, 250, 'tag'], [80, 175, 'tag'], [82, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 1525, 'plate': 1713, 'invoices': 3}), ({'trips': [[12, 250, 'exempt'], [79, 175, 'plate'], [39, 175, 'plate'], [33, 175, 'plate'], [59, 525, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 447, 'plate': 1589, 'invoices': 2}), ({'trips': [[69, 525, 'tag'], [7, 525, 'plate'], [83, 410, 'plate'], [84, 333, 'tag'], [1, 175, 'plate'], [52, 175, 'plate'], [0, 525, 'plate'], [33, 410, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 773, 'plate': 3782, 'invoices': 3}), ({'trips': [[1, 525, 'plate'], [80, 333, 'tag'], [16, 250, 'tag'], [26, 525, 'plate'], [81, 410, 'tag'], [16, 525, 'plate'], [22, 250, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 945, 'plate': 2484, 'invoices': 1}), ({'trips': [[59, 410, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 0, 'plate': 815, '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': [[64, 410, 'tag'], [37, 250, 'plate'], [70, 410, 'exempt'], [69, 333, 'plate'], [15, 250, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 628, 'plate': 1188, 'invoices': 2}), ({'trips': [[39, 175, 'exempt'], [88, 250, 'exempt'], [26, 333, 'plate'], [38, 250, 'plate'], [87, 333, 'plate'], [91, 333, 'tag'], [95, 333, 'plate'], [21, 333, 'exempt']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 2675, 'invoices': 4}), ({'trips': [[89, 410, 'tag'], [63, 250, 'plate'], [89, 333, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 369, 'plate': 1025, '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': [[45, 175, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 0, 'plate': 619, 'invoices': 1}), ({'trips': [[21, 333, 'tag'], [53, 175, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 458, 'plate': 0, 'invoices': 0}), ({'trips': [[16, 410, 'tag'], [38, 333, 'plate'], [40, 175, 'plate'], [91, 250, 'exempt'], [67, 250, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 628, 'plate': 963, 'invoices': 1})], [({'trips': [[34, 175, 'plate'], [12, 175, 'plate'], [40, 250, 'plate'], [83, 525, 'tag'], [79, 250, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 473, 'plate': 1726, 'invoices': 3}), ({'trips': [[23, 175, 'plate'], [66, 525, 'plate'], [52, 410, 'plate'], [73, 175, 'plate'], [39, 410, 'exempt'], [44, 250, 'tag'], [20, 333, 'tag'], [66, 410, 'exempt']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 555, 'plate': 3129, 'invoices': 3}), ({'trips': [[83, 175, 'exempt'], [80, 333, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 0, 'plate': 900, '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': [[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': [[67, 525, 'tag'], [87, 525, 'exempt'], [47, 525, 'tag'], [12, 250, 'tag'], [26, 250, 'exempt']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1236, 'plate': 0, 'invoices': 0}), ({'trips': [[88, 175, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 167, 'plate': 0, 'invoices': 0}), ({'trips': [[92, 525, 'tag'], [74, 333, 'tag'], [73, 333, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 773, 'plate': 700, 'invoices': 1})]]\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":"2fba38db69fb5fbf93f7289d9551f69abcb54122e290b6786f87a528933d43af","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            pass\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 // 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': [[19, 525, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 447, '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': [[14, 175, 'tag'], [8, 333, 'plate'], [31, 333, 'tag'], [34, 333, 'tag'], [85, 525, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 1300, 'plate': 600, 'invoices': 1}), ({'trips': [[46, 250, 'plate'], [36, 175, 'tag'], [84, 250, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 149, 'plate': 976, 'invoices': 2}), ({'trips': [[28, 410, 'exempt'], [41, 333, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 0, 'invoices': 0}), ({'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': [[86, 525, 'exempt'], [43, 525, 'plate'], [12, 410, 'plate'], [69, 525, 'plate'], [35, 410, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 0, 'plate': 2940, 'invoices': 3}), ({'trips': [[46, 250, 'exempt'], [13, 410, 'tag'], [29, 333, 'plate'], [27, 525, 'exempt']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 369, 'plate': 650, 'invoices': 1})], [({'trips': [[34, 410, 'plate'], [42, 410, 'tag'], [69, 525, 'plate'], [4, 525, 'tag'], [11, 250, 'exempt'], [87, 525, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1315, 'plate': 2063, 'invoices': 2}), ({'trips': [[77, 250, 'plate'], [50, 175, 'plate'], [14, 175, 'tag'], [81, 250, 'plate'], [89, 333, 'tag'], [61, 250, 'tag'], [19, 333, 'tag'], [9, 333, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 1356, 'plate': 1145, 'invoices': 2}), ({'trips': [[33, 333, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 0, 'plate': 650, 'invoices': 1}), ({'trips': [[76, 250, 'tag'], [39, 175, 'plate'], [95, 175, 'plate'], [20, 333, 'plate'], [78, 410, 'exempt'], [59, 250, 'plate'], [88, 410, 'tag'], [5, 175, 'plate']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 628, 'plate': 1949, 'invoices': 3}), ({'trips': [[55, 410, 'exempt']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 0, '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': [[19, 525, 'plate'], [51, 410, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 0, 'plate': 1970, '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': [[40, 410, 'tag'], [72, 250, 'exempt'], [22, 410, 'tag'], [1, 525, 'exempt'], [12, 410, 'plate'], [67, 525, 'plate'], [31, 410, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 1170, 'plate': 1470, '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': [[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': [[52, 175, 'plate'], [89, 525, 'tag'], [15, 333, 'plate'], [70, 333, 'plate'], [65, 333, 'tag'], [45, 250, 'tag'], [80, 175, 'tag'], [82, 410, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 1525, 'plate': 1713, 'invoices': 3}), ({'trips': [[12, 250, 'exempt'], [79, 175, 'plate'], [39, 175, 'plate'], [33, 175, 'plate'], [59, 525, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 447, 'plate': 1589, 'invoices': 2}), ({'trips': [[69, 525, 'tag'], [7, 525, 'plate'], [83, 410, 'plate'], [84, 333, 'tag'], [1, 175, 'plate'], [52, 175, 'plate'], [0, 525, 'plate'], [33, 410, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 773, 'plate': 3782, 'invoices': 3}), ({'trips': [[1, 525, 'plate'], [80, 333, 'tag'], [16, 250, 'tag'], [26, 525, 'plate'], [81, 410, 'tag'], [16, 525, 'plate'], [22, 250, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 945, 'plate': 2484, 'invoices': 1}), ({'trips': [[59, 410, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 0, 'plate': 815, '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': [[64, 410, 'tag'], [37, 250, 'plate'], [70, 410, 'exempt'], [69, 333, 'plate'], [15, 250, 'tag']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 628, 'plate': 1188, 'invoices': 2}), ({'trips': [[39, 175, 'exempt'], [88, 250, 'exempt'], [26, 333, 'plate'], [38, 250, 'plate'], [87, 333, 'plate'], [91, 333, 'tag'], [95, 333, 'plate'], [21, 333, 'exempt']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 15, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 284, 'plate': 2675, 'invoices': 4}), ({'trips': [[89, 410, 'tag'], [63, 250, 'plate'], [89, 333, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 31}, {'tag': 369, 'plate': 1025, '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': [[45, 175, 'plate']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 0, 'plate': 619, 'invoices': 1}), ({'trips': [[21, 333, 'tag'], [53, 175, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 458, 'plate': 0, 'invoices': 0}), ({'trips': [[16, 410, 'tag'], [38, 333, 'plate'], [40, 175, 'plate'], [91, 250, 'exempt'], [67, 250, 'tag']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 5, 'invoice_fee': 200, 'cycle_days': 30}, {'tag': 628, 'plate': 963, 'invoices': 1})], [({'trips': [[34, 175, 'plate'], [12, 175, 'plate'], [40, 250, 'plate'], [83, 525, 'tag'], [79, 250, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 150, 'cycle_days': 30}, {'tag': 473, 'plate': 1726, 'invoices': 3}), ({'trips': [[23, 175, 'plate'], [66, 525, 'plate'], [52, 410, 'plate'], [73, 175, 'plate'], [39, 410, 'exempt'], [44, 250, 'tag'], [20, 333, 'tag'], [66, 410, 'exempt']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 555, 'plate': 3129, 'invoices': 3}), ({'trips': [[83, 175, 'exempt'], [80, 333, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 400, 'cycle_days': 31}, {'tag': 0, 'plate': 900, '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': [[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': [[67, 525, 'tag'], [87, 525, 'exempt'], [47, 525, 'tag'], [12, 250, 'tag'], [26, 250, 'exempt']], 'plate_surcharge_pct': 35, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 1236, 'plate': 0, 'invoices': 0}), ({'trips': [[88, 175, 'tag']], 'plate_surcharge_pct': 25, 'tag_discount_pct': 5, 'invoice_fee': 400, 'cycle_days': 30}, {'tag': 167, 'plate': 0, 'invoices': 0}), ({'trips': [[92, 525, 'tag'], [74, 333, 'tag'], [73, 333, 'plate']], 'plate_surcharge_pct': 50, 'tag_discount_pct': 10, 'invoice_fee': 200, 'cycle_days': 31}, {'tag': 773, 'plate': 700, 'invoices': 1})]]\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-exempt","generated_at":"2026-09-29T14:48:03.827450+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":"Exempt trips are billed as plate trips with surcharge and invoice.","sha256":"088283756421ad590e70aad58b6ddd176869852c4d2bf363f9a75759b9f20d21","title":"Pay-by-plate invoice and tag discount: exempt trips fall through to plate billing · 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":42.227,"exit_code":1,"observations":[{"actual":{"invoices":0,"plate":0,"tag":447},"check":"fee oracle 0","expected":{"invoices":0,"plate":0,"tag":447},"passed":true},{"actual":{"invoices":1,"plate":200,"tag":369},"check":"fee oracle 1","expected":{"invoices":0,"plate":0,"tag":369},"passed":false},{"actual":{"invoices":1,"plate":600,"tag":1300},"check":"fee oracle 2","expected":{"invoices":1,"plate":600,"tag":1300},"passed":true},{"actual":{"invoices":2,"plate":976,"tag":149},"check":"fee oracle 3","expected":{"invoices":2,"plate":976,"tag":149},"passed":true},{"actual":{"invoices":1,"plate":200,"tag":284},"check":"fee oracle 4","expected":{"invoices":0,"plate":0,"tag":284},"passed":false},{"actual":{"invoices":2,"plate":1076,"tag":284},"check":"fee oracle 5","expected":{"invoices":2,"plate":1076,"tag":284},"passed":true},{"actual":{"invoices":3,"plate":2940,"tag":0},"check":"fee oracle 6","expected":{"invoices":3,"plate":2940,"tag":0},"passed":true},{"actual":{"invoices":2,"plate":850,"tag":369},"check":"fee oracle 7","expected":{"invoices":1,"plate":650,"tag":369},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": {\"tag\": 447, \"plate\": 0, \"invoices\": 0}, \"expected\": {\"tag\": 447, \"plate\": 0, \"invoices\": 0}, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": {\"tag\": 369, \"plate\": 200, \"invoices\": 1}, \"expected\": {\"tag\": 369, \"plate\": 0, \"invoices\": 0}, \"passed\": false}, {\"check\": \"fee oracle 2\", \"actual\": {\"tag\": 1300, \"plate\": 600, \"invoices\": 1}, \"expected\": {\"tag\": 1300, \"plate\": 600, \"invoices\": 1}, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": {\"tag\": 149, \"plate\": 976, \"invoices\": 2}, \"expected\": {\"tag\": 149, \"plate\": 976, \"invoices\": 2}, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": {\"tag\": 284, \"plate\": 200, \"invoices\": 1}, \"expected\": {\"tag\": 284, \"plate\": 0, \"invoices\": 0}, \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": {\"tag\": 284, \"plate\": 1076, \"invoices\": 2}, \"expected\": {\"tag\": 284, \"plate\": 1076, \"invoices\": 2}, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": {\"tag\": 0, \"plate\": 2940, \"invoices\": 3}, \"expected\": {\"tag\": 0, \"plate\": 2940, \"invoices\": 3}, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": {\"tag\": 369, \"plate\": 850, \"invoices\": 2}, \"expected\": {\"tag\": 369, \"plate\": 650, \"invoices\": 1}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.575,"exit_code":1,"observations":[{"actual":{"invoices":0,"plate":0,"tag":447},"check":"fee oracle 0","expected":{"invoices":0,"plate":0,"tag":447},"passed":true},{"actual":{"invoices":1,"plate":815,"tag":369},"check":"fee oracle 1","expected":{"invoices":0,"plate":0,"tag":369},"passed":false},{"actual":{"invoices":1,"plate":600,"tag":1300},"check":"fee oracle 2","expected":{"invoices":1,"plate":600,"tag":1300},"passed":true},{"actual":{"invoices":2,"plate":976,"tag":149},"check":"fee oracle 3","expected":{"invoices":2,"plate":976,"tag":149},"passed":true},{"actual":{"invoices":1,"plate":754,"tag":284},"check":"fee oracle 4","expected":{"invoices":0,"plate":0,"tag":284},"passed":false},{"actual":{"invoices":2,"plate":1076,"tag":284},"check":"fee oracle 5","expected":{"invoices":2,"plate":1076,"tag":284},"passed":true},{"actual":{"invoices":3,"plate":3597,"tag":0},"check":"fee oracle 6","expected":{"invoices":3,"plate":2940,"tag":0},"passed":false},{"actual":{"invoices":2,"plate":1897,"tag":369},"check":"fee oracle 7","expected":{"invoices":1,"plate":650,"tag":369},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": {\"tag\": 447, \"plate\": 0, \"invoices\": 0}, \"expected\": {\"tag\": 447, \"plate\": 0, \"invoices\": 0}, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": {\"tag\": 369, \"plate\": 815, \"invoices\": 1}, \"expected\": {\"tag\": 369, \"plate\": 0, \"invoices\": 0}, \"passed\": false}, {\"check\": \"fee oracle 2\", \"actual\": {\"tag\": 1300, \"plate\": 600, \"invoices\": 1}, \"expected\": {\"tag\": 1300, \"plate\": 600, \"invoices\": 1}, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": {\"tag\": 149, \"plate\": 976, \"invoices\": 2}, \"expected\": {\"tag\": 149, \"plate\": 976, \"invoices\": 2}, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": {\"tag\": 284, \"plate\": 754, \"invoices\": 1}, \"expected\": {\"tag\": 284, \"plate\": 0, \"invoices\": 0}, \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": {\"tag\": 284, \"plate\": 1076, \"invoices\": 2}, \"expected\": {\"tag\": 284, \"plate\": 1076, \"invoices\": 2}, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": {\"tag\": 0, \"plate\": 3597, \"invoices\": 3}, \"expected\": {\"tag\": 0, \"plate\": 2940, \"invoices\": 3}, \"passed\": false}, {\"check\": \"fee oracle 7\", \"actual\": {\"tag\": 369, \"plate\": 1897, \"invoices\": 2}, \"expected\": {\"tag\": 369, \"plate\": 650, \"invoices\": 1}, \"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."}}