FA-68591 / Toll and parking fee computation / Open access
Pay-by-plate invoice and tag discount: invoice periods assume 1-based days · case 01
Pay-by-plate invoice and tag discount returns a wrong result when invoice periods assume 1-based days.
ROOT CAUSE
Each travel day becomes its own invoice, multiplying invoice fees.
VERIFIED REPAIR
Restore the invoice grouping rule so that the step reads `periods.add(day // x['cycle_days'])`.
Unsuccessful approach: Shifting to 1-based days moves day 0 and each period boundary into the wrong invoice.
Case 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}.
Why this case matters
Fee engines bill customers in integer cents; a wrong boundary, rounding stage or cap scope silently over- or under-charges.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
tag = plate = 0
periods = set()
for day, base, method in x['trips']:
if method == 'exempt':
continue
if method == 'tag':
tag += base - base * x['tag_discount_pct'] // 100
else:
plate += base + -(-base * x['plate_surcharge_pct'] // 100)
periods.add(day)
fees = len(periods) * x['invoice_fee']
return {'tag': tag, 'plate': plate + fees, 'invoices': len(periods)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'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})]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check('fee oracle' + ' %d' % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fee oracle 0 | {'invoices': 1, 'plate': 1057, 'tag': 1206} | {'invoices': 1, 'plate': 1057, 'tag': 1206} | Passed |
| fee oracle 1 | {'invoices': 5, 'plate': 4648, 'tag': 458} | {'invoices': 3, 'plate': 3848, 'tag': 458} | Failed |
| fee oracle 2 | {'invoices': 2, 'plate': 1076, 'tag': 284} | {'invoices': 2, 'plate': 1076, 'tag': 284} | Passed |
| fee oracle 3 | {'invoices': 2, 'plate': 1532, 'tag': 149} | {'invoices': 2, 'plate': 1532, 'tag': 149} | Passed |
| fee oracle 4 | {'invoices': 7, 'plate': 5454, 'tag': 499} | {'invoices': 2, 'plate': 3454, 'tag': 499} | Failed |
| fee oracle 5 | {'invoices': 1, 'plate': 419, 'tag': 568} | {'invoices': 1, 'plate': 419, 'tag': 568} | Passed |
| fee oracle 6 | {'invoices': 0, 'plate': 0, 'tag': 369} | {'invoices': 0, 'plate': 0, 'tag': 369} | Passed |
| fee oracle 7 | {'invoices': 3, 'plate': 2356, 'tag': 369} | {'invoices': 2, 'plate': 2156, 'tag': 369} | Failed |
SHA-256 / 54bffd59cfe9b24956e232962c832eea0d87d6854d66aa74f2f811a370740ca6
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
tag = plate = 0
periods = set()
for day, base, method in x['trips']:
if method == 'exempt':
continue
if method == 'tag':
tag += base - base * x['tag_discount_pct'] // 100
else:
plate += base + -(-base * x['plate_surcharge_pct'] // 100)
periods.add((day - 1) // x['cycle_days'])
fees = len(periods) * x['invoice_fee']
return {'tag': tag, 'plate': plate + fees, 'invoices': len(periods)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'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})]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check('fee oracle' + ' %d' % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fee oracle 0 | {'invoices': 1, 'plate': 1057, 'tag': 1206} | {'invoices': 1, 'plate': 1057, 'tag': 1206} | Passed |
| fee oracle 1 | {'invoices': 3, 'plate': 3848, 'tag': 458} | {'invoices': 3, 'plate': 3848, 'tag': 458} | Passed |
| fee oracle 2 | {'invoices': 1, 'plate': 876, 'tag': 284} | {'invoices': 2, 'plate': 1076, 'tag': 284} | Failed |
| fee oracle 3 | {'invoices': 1, 'plate': 1132, 'tag': 149} | {'invoices': 2, 'plate': 1532, 'tag': 149} | Failed |
| fee oracle 4 | {'invoices': 2, 'plate': 3454, 'tag': 499} | {'invoices': 2, 'plate': 3454, 'tag': 499} | Passed |
| fee oracle 5 | {'invoices': 1, 'plate': 419, 'tag': 568} | {'invoices': 1, 'plate': 419, 'tag': 568} | Passed |
| fee oracle 6 | {'invoices': 0, 'plate': 0, 'tag': 369} | {'invoices': 0, 'plate': 0, 'tag': 369} | Passed |
| fee oracle 7 | {'invoices': 2, 'plate': 2156, 'tag': 369} | {'invoices': 2, 'plate': 2156, 'tag': 369} | Passed |
SHA-256 / cc56c3b1e0a4fb1cb40c3112e291b4b9f28a7890f312a6bf2ed3e1161a357a1f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
tag = plate = 0
periods = set()
for day, base, method in x['trips']:
if method == 'exempt':
continue
if method == 'tag':
tag += base - base * x['tag_discount_pct'] // 100
else:
plate += base + -(-base * x['plate_surcharge_pct'] // 100)
periods.add(day // x['cycle_days'])
fees = len(periods) * x['invoice_fee']
return {'tag': tag, 'plate': plate + fees, 'invoices': len(periods)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'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})]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check('fee oracle' + ' %d' % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fee oracle 0 | {'invoices': 1, 'plate': 1057, 'tag': 1206} | {'invoices': 1, 'plate': 1057, 'tag': 1206} | Passed |
| fee oracle 1 | {'invoices': 3, 'plate': 3848, 'tag': 458} | {'invoices': 3, 'plate': 3848, 'tag': 458} | Passed |
| fee oracle 2 | {'invoices': 2, 'plate': 1076, 'tag': 284} | {'invoices': 2, 'plate': 1076, 'tag': 284} | Passed |
| fee oracle 3 | {'invoices': 2, 'plate': 1532, 'tag': 149} | {'invoices': 2, 'plate': 1532, 'tag': 149} | Passed |
| fee oracle 4 | {'invoices': 2, 'plate': 3454, 'tag': 499} | {'invoices': 2, 'plate': 3454, 'tag': 499} | Passed |
| fee oracle 5 | {'invoices': 1, 'plate': 419, 'tag': 568} | {'invoices': 1, 'plate': 419, 'tag': 568} | Passed |
| fee oracle 6 | {'invoices': 0, 'plate': 0, 'tag': 369} | {'invoices': 0, 'plate': 0, 'tag': 369} | Passed |
| fee oracle 7 | {'invoices': 2, 'plate': 2156, 'tag': 369} | {'invoices': 2, 'plate': 2156, 'tag': 369} | Passed |
SHA-256 / 7afd06f8ceae532f98e7ad74841375689ad35758d33df91c7db8290a50feec8d
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:48:03.647670+00:00.
Case digest / 0e23aedf29b40c74e4997e39074587ab8ed3d6e88dc2025cca3e4da3ff548e25