{"abstract":"Open-road gantry trip building returns a wrong result when the cap is applied to the whole statement.","category":"Toll and parking fee computation","checks":8,"contract":"Input {reads: [[minute, gantry, direction]] unordered, dedupe, max_gap, price per gantry, trip_cap}. Reads are sorted; a read of the same gantry within dedupe minutes (inclusive) of the last kept read of that gantry is dropped. Kept reads join the current trip when the direction matches and the gap from the trip's latest read is <= max_gap, else start a new trip. Each trip pays min(trip_cap, sum of its gantry prices). Return [trips, total].","contract_signature":"x","evaluation_group":"w2-toll_and_parking_fee_computation-gantry-trips","failed_approach":"Deduplicating gantries within a trip forgives legitimate repeat passages.","family":"w2-toll_and_parking_fee_computation-gantry-trips-trip-cap","id":"FA-68746","implementations":{"attempt":{"sha256":"4d58cbaf72357fe97bd5d2e0fe20e5d4af621ba9d34ce95dbfa37ae9072342dc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    reads = sorted(x['reads'])\n    kept = []\n    lastg = {}\n    for t, g, d in reads:\n        if g in lastg and t - lastg[g] <= x['dedupe']:\n            continue\n        lastg[g] = t\n        kept.append((t, g, d))\n    trips = []\n    for t, g, d in kept:\n        if trips and trips[-1]['d'] == d and t - trips[-1]['t'] <= x['max_gap']:\n            trips[-1]['g'].append(g)\n            trips[-1]['t'] = t\n        else:\n            trips.append({'d': d, 't': t, 'g': [g]})\n    total = sum(min(x['trip_cap'], sum(x['price'][g] for g in set(tr['g']))) for tr in trips)\n    return [len(trips), total]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'reads': [[85, 0, 'N'], [59, 3, 'S'], [64, 0, 'S'], [67, 0, 'S'], [65, 3, 'N'], [28, 0, 'S'], [29, 0, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [75, 200, 110, 200, 150, 150], 'trip_cap': 600}, [5, 700]), ({'reads': [[109, 2, 'N'], [15, 1, 'N'], [60, 2, 'N'], [12, 3, 'S'], [65, 3, 'N'], [108, 2, 'N'], [18, 1, 'N'], [139, 5, 'N'], [63, 3, 'N']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 75, 75, 110, 75, 110], 'trip_cap': 900}, [5, 630]), ({'reads': [[23, 3, 'N'], [25, 3, 'N'], [68, 0, 'N'], [71, 2, 'S'], [72, 3, 'S'], [75, 3, 'S'], [92, 0, 'S'], [112, 5, 'N'], [115, 5, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 110, 75, 75, 75, 200], 'trip_cap': 900}, [4, 825]), ({'reads': [[2, 3, 'N'], [47, 0, 'N'], [48, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [75, 110, 75, 200, 75, 75], 'trip_cap': 400}, [2, 275]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[123, 4, 'S'], [103, 4, 'S'], [70, 2, 'S'], [73, 5, 'S'], [103, 4, 'S'], [12, 3, 'N'], [22, 4, 'S'], [83, 5, 'S'], [25, 2, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [75, 110, 150, 150, 150, 150], 'trip_cap': 400}, [3, 850]), ({'reads': [[7, 2, 'S'], [7, 2, 'S'], [8, 2, 'S'], [39, 4, 'S'], [49, 2, 'S'], [50, 2, 'S'], [79, 0, 'S'], [124, 1, 'S'], [154, 1, 'S'], [155, 1, 'S'], [159, 5, 'S'], [159, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [150, 150, 150, 150, 150, 200], 'trip_cap': 900}, [5, 1100]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350])], [({'reads': [[28, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 200, 150, 110, 75, 75], 'trip_cap': 900}, [1, 200]), ({'reads': [[32, 5, 'S'], [33, 5, 'N'], [34, 5, 'N'], [38, 3, 'N'], [39, 1, 'N'], [59, 0, 'N'], [79, 1, 'N'], [80, 1, 'N'], [89, 2, 'S'], [119, 0, 'S'], [120, 5, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [75, 110, 200, 150, 150, 110], 'trip_cap': 900}, [3, 940]), ({'reads': [[28, 0, 'S'], [73, 2, 'N'], [75, 2, 'N'], [83, 1, 'N'], [84, 1, 'N'], [84, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [110, 200, 75, 150, 200, 110], 'trip_cap': 600}, [3, 495]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350]), ({'reads': [[34, 4, 'N'], [54, 0, 'N'], [57, 2, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [110, 110, 110, 75, 150, 200], 'trip_cap': 400}, [1, 370]), ({'reads': [[8, 4, 'N'], [38, 2, 'N'], [38, 2, 'N'], [58, 2, 'S'], [58, 2, 'S'], [68, 1, 'S'], [98, 1, 'S'], [98, 1, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 110, 150, 200, 200, 110], 'trip_cap': 400}, [4, 720]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[15, 0, 'N'], [18, 5, 'N'], [21, 0, 'N'], [52, 3, 'N'], [55, 5, 'N'], [86, 4, 'S'], [91, 3, 'N'], [93, 3, 'N'], [92, 1, 'N'], [92, 1, 'N'], [123, 1, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [75, 150, 75, 110, 110, 150], 'trip_cap': 600}, [5, 1080])], [({'reads': [[42, 4, 'S'], [62, 1, 'S'], [92, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [75, 150, 110, 200, 75, 200], 'trip_cap': 600}, [2, 300]), ({'reads': [[1, 1, 'N'], [32, 3, 'N'], [63, 5, 'N'], [108, 1, 'S'], [111, 1, 'S'], [111, 3, 'S'], [112, 3, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [110, 75, 110, 75, 75, 150], 'trip_cap': 400}, [4, 525]), ({'reads': [[28, 2, 'S'], [13, 4, 'S'], [18, 1, 'S'], [59, 5, 'S'], [59, 5, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 75, 200, 150, 150, 110], 'trip_cap': 400}, [2, 510]), ({'reads': [[32, 4, 'N'], [33, 4, 'N'], [78, 3, 'S'], [29, 1, 'N'], [24, 3, 'N'], [68, 1, 'S'], [63, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 75, 150, 200, 200, 150], 'trip_cap': 900}, [3, 950]), ({'reads': [[44, 1, 'S'], [64, 5, 'S'], [109, 1, 'N'], [154, 4, 'N'], [185, 2, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [150, 75, 200, 110, 200, 110], 'trip_cap': 900}, [4, 660]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350]), ({'reads': [[1, 4, 'N'], [31, 4, 'N'], [61, 3, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 150, 75, 75, 110, 110], 'trip_cap': 600}, [3, 295])], [({'reads': [[45, 5, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 200, 75, 200, 150, 150], 'trip_cap': 400}, [1, 150]), ({'reads': [[49, 3, 'N']], 'dedupe': 2, 'max_gap': 20, 'price': [200, 110, 200, 110, 110, 150], 'trip_cap': 600}, [1, 110]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350]), ({'reads': [[31, 4, 'S'], [34, 4, 'S'], [51, 2, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 150, 110, 200, 150, 75], 'trip_cap': 600}, [1, 260]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[47, 0, 'N'], [50, 0, 'S'], [52, 0, 'S'], [51, 2, 'S'], [61, 5, 'S'], [81, 0, 'S'], [91, 0, 'S'], [92, 5, 'S'], [112, 4, 'N'], [113, 4, 'N']], 'dedupe': 2, 'max_gap': 20, 'price': [150, 200, 150, 110, 75, 150], 'trip_cap': 600}, [3, 825]), ({'reads': [[37, 4, 'S'], [68, 2, 'S'], [88, 2, 'S'], [93, 5, 'S'], [113, 2, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 75, 150, 200, 75, 75], 'trip_cap': 400}, [2, 475]), ({'reads': [[50, 4, 'S'], [70, 3, 'S'], [73, 0, 'N'], [74, 0, 'N'], [103, 4, 'N'], [113, 1, 'S'], [113, 1, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 200, 75, 110, 150, 200], 'trip_cap': 400}, [4, 685])], [({'reads': [[25, 1, 'S'], [56, 1, 'S'], [56, 1, 'S'], [66, 3, 'S'], [35, 4, 'S'], [5, 3, 'S'], [36, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [150, 110, 75, 200, 75, 200], 'trip_cap': 400}, [1, 400]), ({'reads': [[18, 0, 'N'], [18, 0, 'N'], [19, 4, 'N'], [29, 2, 'N'], [59, 1, 'N'], [79, 0, 'N'], [79, 0, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [75, 75, 110, 110, 110, 75], 'trip_cap': 400}, [2, 445]), ({'reads': [[39, 0, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [75, 75, 110, 110, 110, 110], 'trip_cap': 600}, [1, 75]), ({'reads': [[2, 1, 'N'], [33, 0, 'N'], [33, 0, 'N'], [78, 3, 'N'], [88, 2, 'N'], [89, 2, 'N'], [91, 0, 'N'], [94, 5, 'N'], [99, 3, 'N'], [144, 1, 'S'], [189, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 200, 110, 110, 75, 200], 'trip_cap': 600}, [5, 1275]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350]), ({'reads': [[12, 1, 'S'], [43, 4, 'S'], [74, 1, 'S'], [119, 2, 'N'], [150, 0, 'N'], [151, 0, 'N'], [181, 3, 'S'], [182, 3, 'S'], [182, 1, 'S'], [185, 1, 'S'], [202, 1, 'S'], [232, 4, 'S'], [235, 4, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 75, 110, 150, 150, 75], 'trip_cap': 400}, [7, 1010]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[39, 2, 'S'], [84, 3, 'S'], [85, 3, 'S'], [87, 3, 'S'], [116, 2, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [200, 150, 75, 150, 75, 75], 'trip_cap': 900}, [3, 300])]]\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":"a7a99c7dfb5c4a14b7a0e5485f9559784efbd8e1901230d89e97eb4875a57dde","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    reads = sorted(x['reads'])\n    kept = []\n    lastg = {}\n    for t, g, d in reads:\n        if g in lastg and t - lastg[g] <= x['dedupe']:\n            continue\n        lastg[g] = t\n        kept.append((t, g, d))\n    trips = []\n    for t, g, d in kept:\n        if trips and trips[-1]['d'] == d and t - trips[-1]['t'] <= x['max_gap']:\n            trips[-1]['g'].append(g)\n            trips[-1]['t'] = t\n        else:\n            trips.append({'d': d, 't': t, 'g': [g]})\n    total = min(x['trip_cap'], sum(x['price'][g] for tr in trips for g in tr['g']))\n    return [len(trips), total]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'reads': [[85, 0, 'N'], [59, 3, 'S'], [64, 0, 'S'], [67, 0, 'S'], [65, 3, 'N'], [28, 0, 'S'], [29, 0, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [75, 200, 110, 200, 150, 150], 'trip_cap': 600}, [5, 700]), ({'reads': [[109, 2, 'N'], [15, 1, 'N'], [60, 2, 'N'], [12, 3, 'S'], [65, 3, 'N'], [108, 2, 'N'], [18, 1, 'N'], [139, 5, 'N'], [63, 3, 'N']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 75, 75, 110, 75, 110], 'trip_cap': 900}, [5, 630]), ({'reads': [[23, 3, 'N'], [25, 3, 'N'], [68, 0, 'N'], [71, 2, 'S'], [72, 3, 'S'], [75, 3, 'S'], [92, 0, 'S'], [112, 5, 'N'], [115, 5, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 110, 75, 75, 75, 200], 'trip_cap': 900}, [4, 825]), ({'reads': [[2, 3, 'N'], [47, 0, 'N'], [48, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [75, 110, 75, 200, 75, 75], 'trip_cap': 400}, [2, 275]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[123, 4, 'S'], [103, 4, 'S'], [70, 2, 'S'], [73, 5, 'S'], [103, 4, 'S'], [12, 3, 'N'], [22, 4, 'S'], [83, 5, 'S'], [25, 2, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [75, 110, 150, 150, 150, 150], 'trip_cap': 400}, [3, 850]), ({'reads': [[7, 2, 'S'], [7, 2, 'S'], [8, 2, 'S'], [39, 4, 'S'], [49, 2, 'S'], [50, 2, 'S'], [79, 0, 'S'], [124, 1, 'S'], [154, 1, 'S'], [155, 1, 'S'], [159, 5, 'S'], [159, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [150, 150, 150, 150, 150, 200], 'trip_cap': 900}, [5, 1100]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350])], [({'reads': [[28, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 200, 150, 110, 75, 75], 'trip_cap': 900}, [1, 200]), ({'reads': [[32, 5, 'S'], [33, 5, 'N'], [34, 5, 'N'], [38, 3, 'N'], [39, 1, 'N'], [59, 0, 'N'], [79, 1, 'N'], [80, 1, 'N'], [89, 2, 'S'], [119, 0, 'S'], [120, 5, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [75, 110, 200, 150, 150, 110], 'trip_cap': 900}, [3, 940]), ({'reads': [[28, 0, 'S'], [73, 2, 'N'], [75, 2, 'N'], [83, 1, 'N'], [84, 1, 'N'], [84, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [110, 200, 75, 150, 200, 110], 'trip_cap': 600}, [3, 495]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350]), ({'reads': [[34, 4, 'N'], [54, 0, 'N'], [57, 2, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [110, 110, 110, 75, 150, 200], 'trip_cap': 400}, [1, 370]), ({'reads': [[8, 4, 'N'], [38, 2, 'N'], [38, 2, 'N'], [58, 2, 'S'], [58, 2, 'S'], [68, 1, 'S'], [98, 1, 'S'], [98, 1, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 110, 150, 200, 200, 110], 'trip_cap': 400}, [4, 720]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[15, 0, 'N'], [18, 5, 'N'], [21, 0, 'N'], [52, 3, 'N'], [55, 5, 'N'], [86, 4, 'S'], [91, 3, 'N'], [93, 3, 'N'], [92, 1, 'N'], [92, 1, 'N'], [123, 1, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [75, 150, 75, 110, 110, 150], 'trip_cap': 600}, [5, 1080])], [({'reads': [[42, 4, 'S'], [62, 1, 'S'], [92, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [75, 150, 110, 200, 75, 200], 'trip_cap': 600}, [2, 300]), ({'reads': [[1, 1, 'N'], [32, 3, 'N'], [63, 5, 'N'], [108, 1, 'S'], [111, 1, 'S'], [111, 3, 'S'], [112, 3, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [110, 75, 110, 75, 75, 150], 'trip_cap': 400}, [4, 525]), ({'reads': [[28, 2, 'S'], [13, 4, 'S'], [18, 1, 'S'], [59, 5, 'S'], [59, 5, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 75, 200, 150, 150, 110], 'trip_cap': 400}, [2, 510]), ({'reads': [[32, 4, 'N'], [33, 4, 'N'], [78, 3, 'S'], [29, 1, 'N'], [24, 3, 'N'], [68, 1, 'S'], [63, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 75, 150, 200, 200, 150], 'trip_cap': 900}, [3, 950]), ({'reads': [[44, 1, 'S'], [64, 5, 'S'], [109, 1, 'N'], [154, 4, 'N'], [185, 2, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [150, 75, 200, 110, 200, 110], 'trip_cap': 900}, [4, 660]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350]), ({'reads': [[1, 4, 'N'], [31, 4, 'N'], [61, 3, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 150, 75, 75, 110, 110], 'trip_cap': 600}, [3, 295])], [({'reads': [[45, 5, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 200, 75, 200, 150, 150], 'trip_cap': 400}, [1, 150]), ({'reads': [[49, 3, 'N']], 'dedupe': 2, 'max_gap': 20, 'price': [200, 110, 200, 110, 110, 150], 'trip_cap': 600}, [1, 110]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350]), ({'reads': [[31, 4, 'S'], [34, 4, 'S'], [51, 2, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 150, 110, 200, 150, 75], 'trip_cap': 600}, [1, 260]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[47, 0, 'N'], [50, 0, 'S'], [52, 0, 'S'], [51, 2, 'S'], [61, 5, 'S'], [81, 0, 'S'], [91, 0, 'S'], [92, 5, 'S'], [112, 4, 'N'], [113, 4, 'N']], 'dedupe': 2, 'max_gap': 20, 'price': [150, 200, 150, 110, 75, 150], 'trip_cap': 600}, [3, 825]), ({'reads': [[37, 4, 'S'], [68, 2, 'S'], [88, 2, 'S'], [93, 5, 'S'], [113, 2, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 75, 150, 200, 75, 75], 'trip_cap': 400}, [2, 475]), ({'reads': [[50, 4, 'S'], [70, 3, 'S'], [73, 0, 'N'], [74, 0, 'N'], [103, 4, 'N'], [113, 1, 'S'], [113, 1, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 200, 75, 110, 150, 200], 'trip_cap': 400}, [4, 685])], [({'reads': [[25, 1, 'S'], [56, 1, 'S'], [56, 1, 'S'], [66, 3, 'S'], [35, 4, 'S'], [5, 3, 'S'], [36, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [150, 110, 75, 200, 75, 200], 'trip_cap': 400}, [1, 400]), ({'reads': [[18, 0, 'N'], [18, 0, 'N'], [19, 4, 'N'], [29, 2, 'N'], [59, 1, 'N'], [79, 0, 'N'], [79, 0, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [75, 75, 110, 110, 110, 75], 'trip_cap': 400}, [2, 445]), ({'reads': [[39, 0, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [75, 75, 110, 110, 110, 110], 'trip_cap': 600}, [1, 75]), ({'reads': [[2, 1, 'N'], [33, 0, 'N'], [33, 0, 'N'], [78, 3, 'N'], [88, 2, 'N'], [89, 2, 'N'], [91, 0, 'N'], [94, 5, 'N'], [99, 3, 'N'], [144, 1, 'S'], [189, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 200, 110, 110, 75, 200], 'trip_cap': 600}, [5, 1275]), ({'reads': [[10, 0, 'S'], [5, 4, 'N'], [12, 1, 'S'], [11, 0, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 400}, [2, 350]), ({'reads': [[12, 1, 'S'], [43, 4, 'S'], [74, 1, 'S'], [119, 2, 'N'], [150, 0, 'N'], [151, 0, 'N'], [181, 3, 'S'], [182, 3, 'S'], [182, 1, 'S'], [185, 1, 'S'], [202, 1, 'S'], [232, 4, 'S'], [235, 4, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 75, 110, 150, 150, 75], 'trip_cap': 400}, [7, 1010]), ({'reads': [[0, 1, 'N'], [2, 1, 'N'], [4, 1, 'N'], [30, 2, 'N'], [55, 3, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [100, 150, 200, 250, 100, 100], 'trip_cap': 900}, [1, 750]), ({'reads': [[39, 2, 'S'], [84, 3, 'S'], [85, 3, 'S'], [87, 3, 'S'], [116, 2, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [200, 150, 75, 150, 75, 75], 'trip_cap': 900}, [3, 300])]]\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-gantry-trips-trip-cap","generated_at":"2026-09-29T14:48:05.101892+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":"All trips share one cap, undercharging multi-trip statements.","sha256":"c43333fb93587fb19fbdda32bf8e8d75030dce846d48d206d6e521b6cf713a95","title":"Open-road gantry trip building: the cap is applied to the whole statement · 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":45.855,"exit_code":1,"observations":[{"actual":[5,700],"check":"fee oracle 0","expected":[5,700],"passed":true},{"actual":[5,555],"check":"fee oracle 1","expected":[5,630],"passed":false},{"actual":[4,825],"check":"fee oracle 2","expected":[4,825],"passed":true},{"actual":[2,275],"check":"fee oracle 3","expected":[2,275],"passed":true},{"actual":[1,600],"check":"fee oracle 4","expected":[1,750],"passed":false},{"actual":[3,850],"check":"fee oracle 5","expected":[3,850],"passed":true},{"actual":[5,1100],"check":"fee oracle 6","expected":[5,1100],"passed":true},{"actual":[2,350],"check":"fee oracle 7","expected":[2,350],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": [5, 700], \"expected\": [5, 700], \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": [5, 555], \"expected\": [5, 630], \"passed\": false}, {\"check\": \"fee oracle 2\", \"actual\": [4, 825], \"expected\": [4, 825], \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": [2, 275], \"expected\": [2, 275], \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": [1, 600], \"expected\": [1, 750], \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": [3, 850], \"expected\": [3, 850], \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": [5, 1100], \"expected\": [5, 1100], \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": [2, 350], \"expected\": [2, 350], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.043,"exit_code":1,"observations":[{"actual":[5,600],"check":"fee oracle 0","expected":[5,700],"passed":false},{"actual":[5,630],"check":"fee oracle 1","expected":[5,630],"passed":true},{"actual":[4,825],"check":"fee oracle 2","expected":[4,825],"passed":true},{"actual":[2,275],"check":"fee oracle 3","expected":[2,275],"passed":true},{"actual":[1,750],"check":"fee oracle 4","expected":[1,750],"passed":true},{"actual":[3,400],"check":"fee oracle 5","expected":[3,850],"passed":false},{"actual":[5,900],"check":"fee oracle 6","expected":[5,1100],"passed":false},{"actual":[2,350],"check":"fee oracle 7","expected":[2,350],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": [5, 600], \"expected\": [5, 700], \"passed\": false}, {\"check\": \"fee oracle 1\", \"actual\": [5, 630], \"expected\": [5, 630], \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": [4, 825], \"expected\": [4, 825], \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": [2, 275], \"expected\": [2, 275], \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": [1, 750], \"expected\": [1, 750], \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": [3, 400], \"expected\": [3, 850], \"passed\": false}, {\"check\": \"fee oracle 6\", \"actual\": [5, 900], \"expected\": [5, 1100], \"passed\": false}, {\"check\": \"fee oracle 7\", \"actual\": [2, 350], \"expected\": [2, 350], \"passed\": true}], \"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."}}