{"abstract":"Open-road gantry trip building returns a wrong result when a gap exactly equal to the maximum splits the trip.","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].","evaluation_group":"w2-toll_and_parking_fee_computation-gantry-trips","failed_approach":"Adding the dedupe window to the gap merges trips the contract separates.","family":"w2-toll_and_parking_fee_computation-gantry-trips-gap-boundary","id":"FA-68741","implementations":{"attempt":{"sha256":"bfd5abbedcfabd2a6c189f5f12c09063ceedfc29ec2eaa0bfb21d9a740fa41fc","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'] + x['dedupe']:\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 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': [[9, 0, 'S'], [144, 4, 'S'], [49, 5, 'N'], [14, 3, 'S'], [17, 3, 'S'], [82, 4, 'S'], [6, 0, 'S'], [19, 5, 'N'], [113, 1, 'S'], [79, 4, 'S'], [143, 4, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 200, 110, 110, 150, 75], 'trip_cap': 400}, [4, 1200]), ({'reads': [[87, 2, 'S'], [160, 1, 'S'], [36, 4, 'N'], [134, 2, 'S'], [86, 2, 'S'], [155, 3, 'S'], [135, 3, 'S'], [66, 4, 'N'], [170, 4, 'N'], [131, 5, 'S'], [38, 4, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 150, 75, 150, 150, 75], 'trip_cap': 900}, [4, 1125]), ({'reads': [[6, 4, 'N'], [16, 5, 'N'], [16, 5, 'N'], [47, 5, 'N'], [48, 5, 'N'], [78, 5, 'N'], [123, 3, 'N'], [124, 2, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 110, 200, 150, 150, 150], 'trip_cap': 900}, [4, 950]), ({'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': [[14, 5, 'S'], [19, 2, 'N'], [22, 2, 'N'], [22, 1, 'N'], [53, 3, 'S'], [63, 4, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 110, 200, 110, 150, 75], 'trip_cap': 600}, [3, 645]), ({'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': [[18, 2, 'S'], [38, 3, 'S'], [38, 3, 'S'], [69, 0, 'N'], [70, 0, 'N'], [114, 5, 'S'], [134, 4, 'S'], [134, 4, 'S'], [137, 4, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [200, 110, 150, 75, 75, 75], 'trip_cap': 600}, [3, 575]), ({'reads': [[78, 2, 'S'], [55, 0, 'N'], [58, 2, 'S'], [88, 2, 'S'], [81, 2, 'S'], [19, 2, 'S'], [50, 3, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 200, 110, 150, 75, 200], 'trip_cap': 900}, [3, 740])], [({'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': [[4, 0, 'S'], [49, 2, 'N'], [49, 2, 'N'], [50, 1, 'N'], [53, 1, 'N'], [53, 5, 'N'], [73, 3, 'N'], [75, 3, 'N'], [93, 3, 'N'], [124, 5, 'N'], [125, 1, 'N'], [128, 1, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 200, 200, 200, 200, 75], 'trip_cap': 400}, [3, 785]), ({'reads': [[9, 3, 'N'], [10, 3, 'N'], [10, 2, 'N'], [10, 2, 'N'], [30, 5, 'N'], [75, 4, 'N'], [120, 5, 'N'], [150, 1, 'N'], [152, 1, 'N'], [160, 4, 'N'], [191, 3, 'S'], [193, 3, 'S'], [196, 5, 'S'], [198, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 110, 150, 200, 75, 110], 'trip_cap': 400}, [5, 1080]), ({'reads': [[11, 4, 'N'], [12, 2, 'N'], [13, 3, 'N'], [58, 5, 'N'], [61, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 75, 150, 200, 75, 200], 'trip_cap': 400}, [2, 800]), ({'reads': [[0, 2, 'S'], [45, 0, 'S'], [55, 0, 'S'], [55, 0, 'S'], [65, 2, 'S'], [70, 2, 'N'], [72, 2, 'N'], [101, 2, 'N'], [132, 1, 'N'], [133, 1, 'N'], [162, 0, 'N'], [162, 0, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 150, 110, 150, 110, 75], 'trip_cap': 600}, [5, 1190]), ({'reads': [[8, 5, 'N'], [28, 4, 'N'], [58, 2, 'N'], [61, 2, 'N'], [88, 1, 'N'], [90, 1, 'N'], [119, 0, 'N'], [164, 1, 'N'], [167, 1, 'N'], [195, 0, 'N'], [225, 4, 'S'], [228, 1, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [110, 75, 75, 200, 110, 110], 'trip_cap': 400}, [4, 955]), ({'reads': [[100, 2, 'S'], [90, 4, 'S'], [44, 4, 'N'], [44, 4, 'N'], [89, 1, 'S'], [90, 4, 'S'], [92, 1, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 150, 75, 200, 150, 150], 'trip_cap': 400}, [2, 525])], [({'reads': [[16, 5, 'N'], [47, 2, 'N'], [47, 2, 'N'], [50, 0, 'N'], [70, 3, 'N'], [100, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 110, 75, 75, 200, 200], 'trip_cap': 400}, [2, 600]), ({'reads': [[98, 2, 'S'], [67, 5, 'S'], [36, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 200, 75, 75, 200, 110], 'trip_cap': 900}, [3, 385]), ({'reads': [[16, 4, 'S'], [26, 0, 'S'], [27, 4, 'S'], [30, 2, 'N'], [35, 1, 'N'], [45, 1, 'N'], [75, 4, 'N'], [80, 5, 'N'], [82, 5, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 200, 110, 150, 200, 75], 'trip_cap': 400}, [3, 1075]), ({'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': [[31, 1, 'N'], [34, 3, 'N'], [84, 2, 'N'], [54, 1, 'N'], [11, 2, 'N'], [11, 2, 'N'], [37, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 200, 110, 110, 110, 110], 'trip_cap': 600}, [1, 600]), ({'reads': [[33, 5, 'N'], [51, 5, 'N'], [46, 2, 'N'], [43, 0, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 110, 75, 200, 200, 200], 'trip_cap': 600}, [1, 600]), ({'reads': [[155, 4, 'S'], [108, 0, 'S'], [63, 3, 'S'], [31, 5, 'S'], [30, 5, 'S'], [40, 1, 'S'], [153, 4, 'S'], [60, 5, 'S'], [27, 1, 'N'], [198, 1, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [200, 75, 75, 75, 200, 75], 'trip_cap': 600}, [5, 850])], [({'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': [[19, 1, 'N'], [22, 4, 'N'], [23, 4, 'N'], [23, 5, 'N'], [23, 5, 'N'], [28, 3, 'N'], [38, 3, 'N'], [41, 3, 'N'], [58, 0, 'N'], [60, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [110, 150, 75, 200, 75, 110], 'trip_cap': 400}, [1, 400]), ({'reads': [[8, 5, 'S'], [10, 5, 'S'], [38, 3, 'S'], [83, 1, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 150, 75, 150, 75, 150], 'trip_cap': 600}, [3, 450]), ({'reads': [[45, 2, 'N'], [8, 4, 'N'], [195, 2, 'N'], [89, 4, 'N'], [119, 5, 'N'], [38, 0, 'N'], [164, 3, 'N'], [7, 4, 'N'], [43, 2, 'N'], [44, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 200, 150, 200, 200, 200], 'trip_cap': 600}, [5, 1410]), ({'reads': [[45, 5, 'N'], [75, 2, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [75, 200, 150, 110, 200, 200], 'trip_cap': 600}, [1, 350]), ({'reads': [[4, 2, 'N'], [4, 2, 'N'], [9, 2, 'S'], [10, 2, 'S'], [14, 1, 'S'], [17, 1, 'S'], [19, 1, 'S'], [39, 3, 'S'], [41, 3, 'S'], [84, 1, 'S'], [129, 4, 'N']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 75, 200, 150, 75, 110], 'trip_cap': 900}, [5, 850]), ({'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': [[127, 0, 'S'], [125, 0, 'S'], [107, 5, 'S'], [105, 3, 'S'], [34, 0, 'S'], [104, 5, 'S'], [200, 1, 'S'], [155, 4, 'S'], [64, 0, 'S'], [94, 1, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 150, 200, 110, 150, 200], 'trip_cap': 900}, [5, 1090])], [({'reads': [[104, 3, 'S'], [102, 2, 'S'], [102, 2, 'S'], [70, 2, 'S'], [106, 3, 'S'], [71, 4, 'S'], [103, 3, 'S'], [30, 1, 'S'], [60, 5, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 110, 200, 200, 150, 150], 'trip_cap': 400}, [2, 800]), ({'reads': [[18, 0, 'S'], [21, 0, 'S'], [23, 0, 'N'], [24, 0, 'N'], [28, 4, 'N'], [30, 4, 'N'], [38, 4, 'N'], [48, 2, 'N'], [48, 2, 'N'], [93, 3, 'N'], [96, 3, 'N'], [94, 2, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 200, 150, 150, 200, 110], 'trip_cap': 900}, [3, 1150]), ({'reads': [[142, 5, 'N'], [130, 3, 'S'], [55, 4, 'S'], [85, 2, 'S'], [31, 1, 'S'], [140, 5, 'N'], [34, 3, 'S'], [57, 1, 'S'], [54, 1, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 75, 150, 75, 200, 75], 'trip_cap': 600}, [4, 725]), ({'reads': [[22, 3, 'N'], [27, 0, 'N'], [30, 0, 'N'], [58, 4, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 200, 200, 200, 75, 150], 'trip_cap': 400}, [2, 425]), ({'reads': [[13, 5, 'N'], [14, 2, 'N'], [14, 2, 'N'], [59, 5, 'N'], [104, 2, 'N'], [105, 1, 'N'], [106, 2, 'N'], [109, 1, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 200, 110, 110, 150, 200], 'trip_cap': 600}, [3, 1020]), ({'reads': [[14, 3, 'N'], [70, 5, 'N'], [81, 0, 'N'], [19, 2, 'N'], [81, 2, 'N'], [75, 5, 'N'], [14, 3, 'N'], [39, 4, 'N'], [80, 2, 'N'], [91, 5, 'N'], [86, 0, 'N'], [75, 5, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [75, 75, 75, 200, 200, 150], 'trip_cap': 400}, [2, 800]), ({'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': [[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])]]\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":"2b9b23f42ad4205bca9ff686ebf61bfaa79e484a4bae54aec0489b5bc98a11b8","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 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': [[9, 0, 'S'], [144, 4, 'S'], [49, 5, 'N'], [14, 3, 'S'], [17, 3, 'S'], [82, 4, 'S'], [6, 0, 'S'], [19, 5, 'N'], [113, 1, 'S'], [79, 4, 'S'], [143, 4, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 200, 110, 110, 150, 75], 'trip_cap': 400}, [4, 1200]), ({'reads': [[87, 2, 'S'], [160, 1, 'S'], [36, 4, 'N'], [134, 2, 'S'], [86, 2, 'S'], [155, 3, 'S'], [135, 3, 'S'], [66, 4, 'N'], [170, 4, 'N'], [131, 5, 'S'], [38, 4, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 150, 75, 150, 150, 75], 'trip_cap': 900}, [4, 1125]), ({'reads': [[6, 4, 'N'], [16, 5, 'N'], [16, 5, 'N'], [47, 5, 'N'], [48, 5, 'N'], [78, 5, 'N'], [123, 3, 'N'], [124, 2, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 110, 200, 150, 150, 150], 'trip_cap': 900}, [4, 950]), ({'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': [[14, 5, 'S'], [19, 2, 'N'], [22, 2, 'N'], [22, 1, 'N'], [53, 3, 'S'], [63, 4, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 110, 200, 110, 150, 75], 'trip_cap': 600}, [3, 645]), ({'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': [[18, 2, 'S'], [38, 3, 'S'], [38, 3, 'S'], [69, 0, 'N'], [70, 0, 'N'], [114, 5, 'S'], [134, 4, 'S'], [134, 4, 'S'], [137, 4, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [200, 110, 150, 75, 75, 75], 'trip_cap': 600}, [3, 575]), ({'reads': [[78, 2, 'S'], [55, 0, 'N'], [58, 2, 'S'], [88, 2, 'S'], [81, 2, 'S'], [19, 2, 'S'], [50, 3, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 200, 110, 150, 75, 200], 'trip_cap': 900}, [3, 740])], [({'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': [[4, 0, 'S'], [49, 2, 'N'], [49, 2, 'N'], [50, 1, 'N'], [53, 1, 'N'], [53, 5, 'N'], [73, 3, 'N'], [75, 3, 'N'], [93, 3, 'N'], [124, 5, 'N'], [125, 1, 'N'], [128, 1, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 200, 200, 200, 200, 75], 'trip_cap': 400}, [3, 785]), ({'reads': [[9, 3, 'N'], [10, 3, 'N'], [10, 2, 'N'], [10, 2, 'N'], [30, 5, 'N'], [75, 4, 'N'], [120, 5, 'N'], [150, 1, 'N'], [152, 1, 'N'], [160, 4, 'N'], [191, 3, 'S'], [193, 3, 'S'], [196, 5, 'S'], [198, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 110, 150, 200, 75, 110], 'trip_cap': 400}, [5, 1080]), ({'reads': [[11, 4, 'N'], [12, 2, 'N'], [13, 3, 'N'], [58, 5, 'N'], [61, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 75, 150, 200, 75, 200], 'trip_cap': 400}, [2, 800]), ({'reads': [[0, 2, 'S'], [45, 0, 'S'], [55, 0, 'S'], [55, 0, 'S'], [65, 2, 'S'], [70, 2, 'N'], [72, 2, 'N'], [101, 2, 'N'], [132, 1, 'N'], [133, 1, 'N'], [162, 0, 'N'], [162, 0, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 150, 110, 150, 110, 75], 'trip_cap': 600}, [5, 1190]), ({'reads': [[8, 5, 'N'], [28, 4, 'N'], [58, 2, 'N'], [61, 2, 'N'], [88, 1, 'N'], [90, 1, 'N'], [119, 0, 'N'], [164, 1, 'N'], [167, 1, 'N'], [195, 0, 'N'], [225, 4, 'S'], [228, 1, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [110, 75, 75, 200, 110, 110], 'trip_cap': 400}, [4, 955]), ({'reads': [[100, 2, 'S'], [90, 4, 'S'], [44, 4, 'N'], [44, 4, 'N'], [89, 1, 'S'], [90, 4, 'S'], [92, 1, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 150, 75, 200, 150, 150], 'trip_cap': 400}, [2, 525])], [({'reads': [[16, 5, 'N'], [47, 2, 'N'], [47, 2, 'N'], [50, 0, 'N'], [70, 3, 'N'], [100, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 110, 75, 75, 200, 200], 'trip_cap': 400}, [2, 600]), ({'reads': [[98, 2, 'S'], [67, 5, 'S'], [36, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 200, 75, 75, 200, 110], 'trip_cap': 900}, [3, 385]), ({'reads': [[16, 4, 'S'], [26, 0, 'S'], [27, 4, 'S'], [30, 2, 'N'], [35, 1, 'N'], [45, 1, 'N'], [75, 4, 'N'], [80, 5, 'N'], [82, 5, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 200, 110, 150, 200, 75], 'trip_cap': 400}, [3, 1075]), ({'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': [[31, 1, 'N'], [34, 3, 'N'], [84, 2, 'N'], [54, 1, 'N'], [11, 2, 'N'], [11, 2, 'N'], [37, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 200, 110, 110, 110, 110], 'trip_cap': 600}, [1, 600]), ({'reads': [[33, 5, 'N'], [51, 5, 'N'], [46, 2, 'N'], [43, 0, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 110, 75, 200, 200, 200], 'trip_cap': 600}, [1, 600]), ({'reads': [[155, 4, 'S'], [108, 0, 'S'], [63, 3, 'S'], [31, 5, 'S'], [30, 5, 'S'], [40, 1, 'S'], [153, 4, 'S'], [60, 5, 'S'], [27, 1, 'N'], [198, 1, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [200, 75, 75, 75, 200, 75], 'trip_cap': 600}, [5, 850])], [({'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': [[19, 1, 'N'], [22, 4, 'N'], [23, 4, 'N'], [23, 5, 'N'], [23, 5, 'N'], [28, 3, 'N'], [38, 3, 'N'], [41, 3, 'N'], [58, 0, 'N'], [60, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [110, 150, 75, 200, 75, 110], 'trip_cap': 400}, [1, 400]), ({'reads': [[8, 5, 'S'], [10, 5, 'S'], [38, 3, 'S'], [83, 1, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 150, 75, 150, 75, 150], 'trip_cap': 600}, [3, 450]), ({'reads': [[45, 2, 'N'], [8, 4, 'N'], [195, 2, 'N'], [89, 4, 'N'], [119, 5, 'N'], [38, 0, 'N'], [164, 3, 'N'], [7, 4, 'N'], [43, 2, 'N'], [44, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 200, 150, 200, 200, 200], 'trip_cap': 600}, [5, 1410]), ({'reads': [[45, 5, 'N'], [75, 2, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [75, 200, 150, 110, 200, 200], 'trip_cap': 600}, [1, 350]), ({'reads': [[4, 2, 'N'], [4, 2, 'N'], [9, 2, 'S'], [10, 2, 'S'], [14, 1, 'S'], [17, 1, 'S'], [19, 1, 'S'], [39, 3, 'S'], [41, 3, 'S'], [84, 1, 'S'], [129, 4, 'N']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 75, 200, 150, 75, 110], 'trip_cap': 900}, [5, 850]), ({'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': [[127, 0, 'S'], [125, 0, 'S'], [107, 5, 'S'], [105, 3, 'S'], [34, 0, 'S'], [104, 5, 'S'], [200, 1, 'S'], [155, 4, 'S'], [64, 0, 'S'], [94, 1, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 150, 200, 110, 150, 200], 'trip_cap': 900}, [5, 1090])], [({'reads': [[104, 3, 'S'], [102, 2, 'S'], [102, 2, 'S'], [70, 2, 'S'], [106, 3, 'S'], [71, 4, 'S'], [103, 3, 'S'], [30, 1, 'S'], [60, 5, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 110, 200, 200, 150, 150], 'trip_cap': 400}, [2, 800]), ({'reads': [[18, 0, 'S'], [21, 0, 'S'], [23, 0, 'N'], [24, 0, 'N'], [28, 4, 'N'], [30, 4, 'N'], [38, 4, 'N'], [48, 2, 'N'], [48, 2, 'N'], [93, 3, 'N'], [96, 3, 'N'], [94, 2, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 200, 150, 150, 200, 110], 'trip_cap': 900}, [3, 1150]), ({'reads': [[142, 5, 'N'], [130, 3, 'S'], [55, 4, 'S'], [85, 2, 'S'], [31, 1, 'S'], [140, 5, 'N'], [34, 3, 'S'], [57, 1, 'S'], [54, 1, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 75, 150, 75, 200, 75], 'trip_cap': 600}, [4, 725]), ({'reads': [[22, 3, 'N'], [27, 0, 'N'], [30, 0, 'N'], [58, 4, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 200, 200, 200, 75, 150], 'trip_cap': 400}, [2, 425]), ({'reads': [[13, 5, 'N'], [14, 2, 'N'], [14, 2, 'N'], [59, 5, 'N'], [104, 2, 'N'], [105, 1, 'N'], [106, 2, 'N'], [109, 1, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 200, 110, 110, 150, 200], 'trip_cap': 600}, [3, 1020]), ({'reads': [[14, 3, 'N'], [70, 5, 'N'], [81, 0, 'N'], [19, 2, 'N'], [81, 2, 'N'], [75, 5, 'N'], [14, 3, 'N'], [39, 4, 'N'], [80, 2, 'N'], [91, 5, 'N'], [86, 0, 'N'], [75, 5, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [75, 75, 75, 200, 200, 150], 'trip_cap': 400}, [2, 800]), ({'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': [[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])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('fee oracle' + ' %d' % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"783fa26873798875be998ef6f52bd57cf5a53fe6c5e11f478a723a5f60308327","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 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': [[9, 0, 'S'], [144, 4, 'S'], [49, 5, 'N'], [14, 3, 'S'], [17, 3, 'S'], [82, 4, 'S'], [6, 0, 'S'], [19, 5, 'N'], [113, 1, 'S'], [79, 4, 'S'], [143, 4, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 200, 110, 110, 150, 75], 'trip_cap': 400}, [4, 1200]), ({'reads': [[87, 2, 'S'], [160, 1, 'S'], [36, 4, 'N'], [134, 2, 'S'], [86, 2, 'S'], [155, 3, 'S'], [135, 3, 'S'], [66, 4, 'N'], [170, 4, 'N'], [131, 5, 'S'], [38, 4, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 150, 75, 150, 150, 75], 'trip_cap': 900}, [4, 1125]), ({'reads': [[6, 4, 'N'], [16, 5, 'N'], [16, 5, 'N'], [47, 5, 'N'], [48, 5, 'N'], [78, 5, 'N'], [123, 3, 'N'], [124, 2, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 110, 200, 150, 150, 150], 'trip_cap': 900}, [4, 950]), ({'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': [[14, 5, 'S'], [19, 2, 'N'], [22, 2, 'N'], [22, 1, 'N'], [53, 3, 'S'], [63, 4, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 110, 200, 110, 150, 75], 'trip_cap': 600}, [3, 645]), ({'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': [[18, 2, 'S'], [38, 3, 'S'], [38, 3, 'S'], [69, 0, 'N'], [70, 0, 'N'], [114, 5, 'S'], [134, 4, 'S'], [134, 4, 'S'], [137, 4, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [200, 110, 150, 75, 75, 75], 'trip_cap': 600}, [3, 575]), ({'reads': [[78, 2, 'S'], [55, 0, 'N'], [58, 2, 'S'], [88, 2, 'S'], [81, 2, 'S'], [19, 2, 'S'], [50, 3, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 200, 110, 150, 75, 200], 'trip_cap': 900}, [3, 740])], [({'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': [[4, 0, 'S'], [49, 2, 'N'], [49, 2, 'N'], [50, 1, 'N'], [53, 1, 'N'], [53, 5, 'N'], [73, 3, 'N'], [75, 3, 'N'], [93, 3, 'N'], [124, 5, 'N'], [125, 1, 'N'], [128, 1, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 200, 200, 200, 200, 75], 'trip_cap': 400}, [3, 785]), ({'reads': [[9, 3, 'N'], [10, 3, 'N'], [10, 2, 'N'], [10, 2, 'N'], [30, 5, 'N'], [75, 4, 'N'], [120, 5, 'N'], [150, 1, 'N'], [152, 1, 'N'], [160, 4, 'N'], [191, 3, 'S'], [193, 3, 'S'], [196, 5, 'S'], [198, 5, 'S']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 110, 150, 200, 75, 110], 'trip_cap': 400}, [5, 1080]), ({'reads': [[11, 4, 'N'], [12, 2, 'N'], [13, 3, 'N'], [58, 5, 'N'], [61, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 75, 150, 200, 75, 200], 'trip_cap': 400}, [2, 800]), ({'reads': [[0, 2, 'S'], [45, 0, 'S'], [55, 0, 'S'], [55, 0, 'S'], [65, 2, 'S'], [70, 2, 'N'], [72, 2, 'N'], [101, 2, 'N'], [132, 1, 'N'], [133, 1, 'N'], [162, 0, 'N'], [162, 0, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 150, 110, 150, 110, 75], 'trip_cap': 600}, [5, 1190]), ({'reads': [[8, 5, 'N'], [28, 4, 'N'], [58, 2, 'N'], [61, 2, 'N'], [88, 1, 'N'], [90, 1, 'N'], [119, 0, 'N'], [164, 1, 'N'], [167, 1, 'N'], [195, 0, 'N'], [225, 4, 'S'], [228, 1, 'S']], 'dedupe': 2, 'max_gap': 30, 'price': [110, 75, 75, 200, 110, 110], 'trip_cap': 400}, [4, 955]), ({'reads': [[100, 2, 'S'], [90, 4, 'S'], [44, 4, 'N'], [44, 4, 'N'], [89, 1, 'S'], [90, 4, 'S'], [92, 1, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 150, 75, 200, 150, 150], 'trip_cap': 400}, [2, 525])], [({'reads': [[16, 5, 'N'], [47, 2, 'N'], [47, 2, 'N'], [50, 0, 'N'], [70, 3, 'N'], [100, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 110, 75, 75, 200, 200], 'trip_cap': 400}, [2, 600]), ({'reads': [[98, 2, 'S'], [67, 5, 'S'], [36, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [200, 200, 75, 75, 200, 110], 'trip_cap': 900}, [3, 385]), ({'reads': [[16, 4, 'S'], [26, 0, 'S'], [27, 4, 'S'], [30, 2, 'N'], [35, 1, 'N'], [45, 1, 'N'], [75, 4, 'N'], [80, 5, 'N'], [82, 5, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 200, 110, 150, 200, 75], 'trip_cap': 400}, [3, 1075]), ({'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': [[31, 1, 'N'], [34, 3, 'N'], [84, 2, 'N'], [54, 1, 'N'], [11, 2, 'N'], [11, 2, 'N'], [37, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 200, 110, 110, 110, 110], 'trip_cap': 600}, [1, 600]), ({'reads': [[33, 5, 'N'], [51, 5, 'N'], [46, 2, 'N'], [43, 0, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 110, 75, 200, 200, 200], 'trip_cap': 600}, [1, 600]), ({'reads': [[155, 4, 'S'], [108, 0, 'S'], [63, 3, 'S'], [31, 5, 'S'], [30, 5, 'S'], [40, 1, 'S'], [153, 4, 'S'], [60, 5, 'S'], [27, 1, 'N'], [198, 1, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [200, 75, 75, 75, 200, 75], 'trip_cap': 600}, [5, 850])], [({'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': [[19, 1, 'N'], [22, 4, 'N'], [23, 4, 'N'], [23, 5, 'N'], [23, 5, 'N'], [28, 3, 'N'], [38, 3, 'N'], [41, 3, 'N'], [58, 0, 'N'], [60, 0, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [110, 150, 75, 200, 75, 110], 'trip_cap': 400}, [1, 400]), ({'reads': [[8, 5, 'S'], [10, 5, 'S'], [38, 3, 'S'], [83, 1, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 150, 75, 150, 75, 150], 'trip_cap': 600}, [3, 450]), ({'reads': [[45, 2, 'N'], [8, 4, 'N'], [195, 2, 'N'], [89, 4, 'N'], [119, 5, 'N'], [38, 0, 'N'], [164, 3, 'N'], [7, 4, 'N'], [43, 2, 'N'], [44, 3, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [110, 200, 150, 200, 200, 200], 'trip_cap': 600}, [5, 1410]), ({'reads': [[45, 5, 'N'], [75, 2, 'N']], 'dedupe': 2, 'max_gap': 30, 'price': [75, 200, 150, 110, 200, 200], 'trip_cap': 600}, [1, 350]), ({'reads': [[4, 2, 'N'], [4, 2, 'N'], [9, 2, 'S'], [10, 2, 'S'], [14, 1, 'S'], [17, 1, 'S'], [19, 1, 'S'], [39, 3, 'S'], [41, 3, 'S'], [84, 1, 'S'], [129, 4, 'N']], 'dedupe': 2, 'max_gap': 20, 'price': [75, 75, 200, 150, 75, 110], 'trip_cap': 900}, [5, 850]), ({'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': [[127, 0, 'S'], [125, 0, 'S'], [107, 5, 'S'], [105, 3, 'S'], [34, 0, 'S'], [104, 5, 'S'], [200, 1, 'S'], [155, 4, 'S'], [64, 0, 'S'], [94, 1, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [110, 150, 200, 110, 150, 200], 'trip_cap': 900}, [5, 1090])], [({'reads': [[104, 3, 'S'], [102, 2, 'S'], [102, 2, 'S'], [70, 2, 'S'], [106, 3, 'S'], [71, 4, 'S'], [103, 3, 'S'], [30, 1, 'S'], [60, 5, 'S']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 110, 200, 200, 150, 150], 'trip_cap': 400}, [2, 800]), ({'reads': [[18, 0, 'S'], [21, 0, 'S'], [23, 0, 'N'], [24, 0, 'N'], [28, 4, 'N'], [30, 4, 'N'], [38, 4, 'N'], [48, 2, 'N'], [48, 2, 'N'], [93, 3, 'N'], [96, 3, 'N'], [94, 2, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 200, 150, 150, 200, 110], 'trip_cap': 900}, [3, 1150]), ({'reads': [[142, 5, 'N'], [130, 3, 'S'], [55, 4, 'S'], [85, 2, 'S'], [31, 1, 'S'], [140, 5, 'N'], [34, 3, 'S'], [57, 1, 'S'], [54, 1, 'S']], 'dedupe': 3, 'max_gap': 20, 'price': [150, 75, 150, 75, 200, 75], 'trip_cap': 600}, [4, 725]), ({'reads': [[22, 3, 'N'], [27, 0, 'N'], [30, 0, 'N'], [58, 4, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [150, 200, 200, 200, 75, 150], 'trip_cap': 400}, [2, 425]), ({'reads': [[13, 5, 'N'], [14, 2, 'N'], [14, 2, 'N'], [59, 5, 'N'], [104, 2, 'N'], [105, 1, 'N'], [106, 2, 'N'], [109, 1, 'N']], 'dedupe': 3, 'max_gap': 30, 'price': [200, 200, 110, 110, 150, 200], 'trip_cap': 600}, [3, 1020]), ({'reads': [[14, 3, 'N'], [70, 5, 'N'], [81, 0, 'N'], [19, 2, 'N'], [81, 2, 'N'], [75, 5, 'N'], [14, 3, 'N'], [39, 4, 'N'], [80, 2, 'N'], [91, 5, 'N'], [86, 0, 'N'], [75, 5, 'N']], 'dedupe': 3, 'max_gap': 20, 'price': [75, 75, 75, 200, 200, 150], 'trip_cap': 400}, [2, 800]), ({'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': [[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])]]\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-gap-boundary","generated_at":"2026-09-29T14:48:05.056636+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Fee engines bill customers in integer cents; a wrong boundary, rounding stage or cap scope silently over- or under-charges.","repair":"Restore the maximum gap boundary rule so that the step reads `t - trips[-1]['t'] <= x['max_gap']`.","root_cause":"Reads exactly max_gap apart start a new trip.","sha256":"e1461bf662aad9374b4335bd18f60559a659be1e41ef309f284df00d84e09fb8","title":"Open-road gantry trip building: a gap exactly equal to the maximum splits the trip · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.473,"exit_code":1,"observations":[{"actual":[3,950],"check":"fee oracle 0","expected":[4,1200],"passed":false},{"actual":[4,1125],"check":"fee oracle 1","expected":[4,1125],"passed":true},{"actual":[2,950],"check":"fee oracle 2","expected":[4,950],"passed":false},{"actual":[2,350],"check":"fee oracle 3","expected":[2,350],"passed":true},{"actual":[3,645],"check":"fee oracle 4","expected":[3,645],"passed":true},{"actual":[1,750],"check":"fee oracle 5","expected":[1,750],"passed":true},{"actual":[3,575],"check":"fee oracle 6","expected":[3,575],"passed":true},{"actual":[3,740],"check":"fee oracle 7","expected":[3,740],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": [3, 950], \"expected\": [4, 1200], \"passed\": false}, {\"check\": \"fee oracle 1\", \"actual\": [4, 1125], \"expected\": [4, 1125], \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": [2, 950], \"expected\": [4, 950], \"passed\": false}, {\"check\": \"fee oracle 3\", \"actual\": [2, 350], \"expected\": [2, 350], \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": [3, 645], \"expected\": [3, 645], \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": [1, 750], \"expected\": [1, 750], \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": [3, 575], \"expected\": [3, 575], \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": [3, 740], \"expected\": [3, 740], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.673,"exit_code":1,"observations":[{"actual":[6,1200],"check":"fee oracle 0","expected":[4,1200],"passed":false},{"actual":[5,1125],"check":"fee oracle 1","expected":[4,1125],"passed":false},{"actual":[4,950],"check":"fee oracle 2","expected":[4,950],"passed":true},{"actual":[2,350],"check":"fee oracle 3","expected":[2,350],"passed":true},{"actual":[3,645],"check":"fee oracle 4","expected":[3,645],"passed":true},{"actual":[1,750],"check":"fee oracle 5","expected":[1,750],"passed":true},{"actual":[5,575],"check":"fee oracle 6","expected":[3,575],"passed":false},{"actual":[4,740],"check":"fee oracle 7","expected":[3,740],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": [6, 1200], \"expected\": [4, 1200], \"passed\": false}, {\"check\": \"fee oracle 1\", \"actual\": [5, 1125], \"expected\": [4, 1125], \"passed\": false}, {\"check\": \"fee oracle 2\", \"actual\": [4, 950], \"expected\": [4, 950], \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": [2, 350], \"expected\": [2, 350], \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": [3, 645], \"expected\": [3, 645], \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": [1, 750], \"expected\": [1, 750], \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": [5, 575], \"expected\": [3, 575], \"passed\": false}, {\"check\": \"fee oracle 7\", \"actual\": [4, 740], \"expected\": [3, 740], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.563,"exit_code":0,"observations":[{"actual":[4,1200],"check":"fee oracle 0","expected":[4,1200],"passed":true},{"actual":[4,1125],"check":"fee oracle 1","expected":[4,1125],"passed":true},{"actual":[4,950],"check":"fee oracle 2","expected":[4,950],"passed":true},{"actual":[2,350],"check":"fee oracle 3","expected":[2,350],"passed":true},{"actual":[3,645],"check":"fee oracle 4","expected":[3,645],"passed":true},{"actual":[1,750],"check":"fee oracle 5","expected":[1,750],"passed":true},{"actual":[3,575],"check":"fee oracle 6","expected":[3,575],"passed":true},{"actual":[3,740],"check":"fee oracle 7","expected":[3,740],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": [4, 1200], \"expected\": [4, 1200], \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": [4, 1125], \"expected\": [4, 1125], \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": [4, 950], \"expected\": [4, 950], \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": [2, 350], \"expected\": [2, 350], \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": [3, 645], \"expected\": [3, 645], \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": [1, 750], \"expected\": [1, 750], \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": [3, 575], \"expected\": [3, 575], \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": [3, 740], \"expected\": [3, 740], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}