{"abstract":"Time-of-day plan schedule returns a wrong result when events are compared at hour granularity.","category":"Traffic signal timing plans","checks":8,"contract":"Input {events: [[day mask (bit0 = Sunday), 'HH:MM', plan]], holidays: [[month, day, as_dow]], now: [dow, 'HH:MM', month, day]}. A holiday makes today's events come from its as_dow day type. The active plan is the event for today with the latest start <= now (later-listed wins at equal start). If none, the latest event of the most recent earlier real weekday that has events (up to 7 days back, same tie rule). Otherwise 'free'.","evaluation_group":"w2-traffic_signal_timing_plans-tod-schedule","failed_approach":"Comparing whole hours activates a 15:30 event already at 15:00.","family":"w2-traffic_signal_timing_plans-tod-schedule-start-boundary","id":"FA-68081","implementations":{"attempt":{"sha256":"5575b2566c21dc9c8c479069398224ed9dee331709740e717500ac432d3d3dd5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    def mins(s):\n        h, m = s.split(':')\n        return int(h) * 60 + int(m)\n    dow, hm, mo, dy = x['now']\n    t = mins(hm)\n    eff = dow\n    for hmo, hdy, as_dow in x['holidays']:\n        if hmo == mo and hdy == dy:\n            eff = as_dow\n    best = None\n    for mask, st, plan in x['events']:\n        if mask >> eff & 1 and mins(st) // 60 <= t // 60:\n            if best is None or mins(st) >= best[0]:\n                best = (mins(st), plan)\n    if best is not None:\n        return best[1]\n    for back in range(1, 8):\n        d = (dow - back) % 7\n        cand = [(mins(st), plan) for mask, st, plan in x['events'] if mask >> d & 1]\n        if cand:\n            return sorted(cand, key=lambda c: c[0])[-1][1]\n    return 'free'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'events': [[61, '04:00', 3], [1, '13:30', 2], [2, '23:15', 4], [65, '01:30', 2], [1, '06:45', 5], [125, '16:45', 1]], 'holidays': [], 'now': [0, '01:30', 5, 23]}, 2), ({'events': [[88, '03:00', 1], [96, '19:15', 6], [1, '04:30', 4], [65, '09:15', 3]], 'holidays': [[10, 20, 3], [9, 16, 0]], 'now': [0, '04:15', 4, 16]}, 6), ({'events': [[98, '09:45', 7], [96, '06:45', 5]], 'holidays': [], 'now': [5, '09:44', 4, 17]}, 5), ({'events': [[110, '21:45', 2], [62, '12:45', 2], [62, '03:15', 7]], 'holidays': [[12, 2, 0]], 'now': [4, '03:15', 6, 22]}, 7), ({'events': [[62, '21:45', 3], [1, '15:30', 5], [65, '17:15', 5]], 'holidays': [[10, 4, 4], [7, 21, 0]], 'now': [3, '04:15', 12, 27]}, 3), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[62, '22:00', 1], [65, '23:00', 9], [127, '05:00', 3]], 'holidays': [[1, 1, 0]], 'now': [1, '02:00', 1, 1]}, 9), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5)], [({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[127, '06:45', 5], [127, '16:15', 2], [2, '20:15', 6], [3, '00:00', 2]], 'holidays': [[7, 19, 1], [5, 21, 1]], 'now': [6, '03:45', 6, 9]}, 2), ({'events': [[62, '01:15', 9], [65, '10:30', 6], [47, '01:15', 4], [1, '12:30', 2], [3, '10:45', 3]], 'holidays': [], 'now': [4, '01:15', 3, 11]}, 9), ({'events': [[62, '21:00', 7], [29, '04:45', 8], [96, '20:45', 9], [104, '00:00', 8], [23, '15:45', 6]], 'holidays': [[1, 8, 3], [11, 6, 0]], 'now': [5, '04:45', 11, 6]}, 8), ({'events': [[62, '12:15', 4], [11, '05:30', 1], [32, '00:30', 6], [69, '12:00', 5], [65, '10:00', 6], [53, '16:00', 2]], 'holidays': [], 'now': [3, '05:15', 7, 25]}, 2), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[127, '12:45', 1], [127, '12:15', 3], [64, '17:15', 2], [32, '06:15', 3], [65, '09:15', 8]], 'holidays': [], 'now': [6, '17:00', 1, 5]}, 1)], [({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[96, '23:45', 9], [65, '21:45', 9], [62, '04:30', 2]], 'holidays': [], 'now': [5, '23:45', 4, 5]}, 9), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[64, '02:45', 9], [96, '22:00', 7], [3, '22:15', 5], [11, '08:00', 8], [32, '18:30', 3], [64, '21:15', 7]], 'holidays': [[9, 22, 2], [11, 12, 3]], 'now': [0, '08:00', 11, 12]}, 8), ({'events': [[122, '21:15', 2], [111, '21:45', 7]], 'holidays': [[7, 5, 1]], 'now': [6, '21:15', 2, 23]}, 2), ({'events': [[2, '14:15', 8], [32, '22:00', 3], [3, '03:45', 6]], 'holidays': [[6, 10, 2]], 'now': [1, '14:00', 11, 14]}, 6), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[96, '07:30', 2], [62, '16:45', 1], [3, '11:00', 6], [41, '00:30', 5], [33, '13:30', 4]], 'holidays': [], 'now': [2, '16:45', 4, 18]}, 1)], [({'events': [[71, '07:15', 7], [43, '07:45', 3], [64, '16:30', 2]], 'holidays': [], 'now': [0, '07:45', 6, 24]}, 3), ({'events': [[62, '22:00', 1], [65, '23:00', 9], [127, '05:00', 3]], 'holidays': [[1, 1, 0]], 'now': [1, '02:00', 1, 1]}, 9), ({'events': [[3, '16:15', 1], [32, '20:45', 7]], 'holidays': [], 'now': [0, '16:15', 6, 23]}, 1), ({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 2), ({'events': [[3, '02:45', 8], [27, '05:30', 9], [125, '10:00', 1], [1, '18:15', 1], [3, '01:15', 9]], 'holidays': [[9, 12, 5], [9, 7, 4]], 'now': [1, '05:30', 5, 26]}, 9), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[126, '23:30', 9], [2, '23:45', 9], [125, '20:45', 8], [38, '10:15', 5], [96, '23:00', 3], [65, '04:45', 9]], 'holidays': [[8, 7, 4], [5, 2, 3]], 'now': [1, '23:07', 8, 7]}, 8), ({'events': [[62, '14:15', 9], [1, '05:00', 1], [127, '10:30', 3], [3, '09:45', 6], [65, '04:45', 6]], 'holidays': [[1, 25, 1], [8, 20, 3]], 'now': [1, '09:30', 1, 25]}, 3)], [({'events': [[127, '15:15', 4], [99, '21:30', 1], [127, '15:45', 9]], 'holidays': [], 'now': [4, '15:15', 2, 11]}, 4), ({'events': [[16, '08:15', 6], [122, '03:15', 9], [62, '18:15', 5], [1, '02:15', 1], [1, '23:30', 9], [1, '06:15', 6]], 'holidays': [], 'now': [4, '03:15', 1, 12]}, 9), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 2), ({'events': [[96, '03:15', 3], [1, '02:00', 4], [32, '18:30', 4], [62, '10:00', 1], [13, '14:15', 1]], 'holidays': [], 'now': [0, '14:15', 7, 9]}, 1), ({'events': [[3, '15:00', 5], [2, '22:00', 1], [127, '00:15', 6], [2, '16:15', 5], [47, '11:15', 1], [99, '04:45', 4]], 'holidays': [[10, 23, 2]], 'now': [3, '00:00', 2, 2]}, 1), ({'events': [[127, '14:30', 1]], 'holidays': [[10, 11, 1]], 'now': [1, '14:30', 1, 16]}, 1)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('timing 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":"88091c6d7b09dbccaa24d75a686d8b5e5a70ac94890b339a74e2ba91ee1612ac","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    def mins(s):\n        h, m = s.split(':')\n        return int(h) * 60 + int(m)\n    dow, hm, mo, dy = x['now']\n    t = mins(hm)\n    eff = dow\n    for hmo, hdy, as_dow in x['holidays']:\n        if hmo == mo and hdy == dy:\n            eff = as_dow\n    best = None\n    for mask, st, plan in x['events']:\n        if mask >> eff & 1 and mins(st) < t:\n            if best is None or mins(st) >= best[0]:\n                best = (mins(st), plan)\n    if best is not None:\n        return best[1]\n    for back in range(1, 8):\n        d = (dow - back) % 7\n        cand = [(mins(st), plan) for mask, st, plan in x['events'] if mask >> d & 1]\n        if cand:\n            return sorted(cand, key=lambda c: c[0])[-1][1]\n    return 'free'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'events': [[61, '04:00', 3], [1, '13:30', 2], [2, '23:15', 4], [65, '01:30', 2], [1, '06:45', 5], [125, '16:45', 1]], 'holidays': [], 'now': [0, '01:30', 5, 23]}, 2), ({'events': [[88, '03:00', 1], [96, '19:15', 6], [1, '04:30', 4], [65, '09:15', 3]], 'holidays': [[10, 20, 3], [9, 16, 0]], 'now': [0, '04:15', 4, 16]}, 6), ({'events': [[98, '09:45', 7], [96, '06:45', 5]], 'holidays': [], 'now': [5, '09:44', 4, 17]}, 5), ({'events': [[110, '21:45', 2], [62, '12:45', 2], [62, '03:15', 7]], 'holidays': [[12, 2, 0]], 'now': [4, '03:15', 6, 22]}, 7), ({'events': [[62, '21:45', 3], [1, '15:30', 5], [65, '17:15', 5]], 'holidays': [[10, 4, 4], [7, 21, 0]], 'now': [3, '04:15', 12, 27]}, 3), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[62, '22:00', 1], [65, '23:00', 9], [127, '05:00', 3]], 'holidays': [[1, 1, 0]], 'now': [1, '02:00', 1, 1]}, 9), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5)], [({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[127, '06:45', 5], [127, '16:15', 2], [2, '20:15', 6], [3, '00:00', 2]], 'holidays': [[7, 19, 1], [5, 21, 1]], 'now': [6, '03:45', 6, 9]}, 2), ({'events': [[62, '01:15', 9], [65, '10:30', 6], [47, '01:15', 4], [1, '12:30', 2], [3, '10:45', 3]], 'holidays': [], 'now': [4, '01:15', 3, 11]}, 9), ({'events': [[62, '21:00', 7], [29, '04:45', 8], [96, '20:45', 9], [104, '00:00', 8], [23, '15:45', 6]], 'holidays': [[1, 8, 3], [11, 6, 0]], 'now': [5, '04:45', 11, 6]}, 8), ({'events': [[62, '12:15', 4], [11, '05:30', 1], [32, '00:30', 6], [69, '12:00', 5], [65, '10:00', 6], [53, '16:00', 2]], 'holidays': [], 'now': [3, '05:15', 7, 25]}, 2), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[127, '12:45', 1], [127, '12:15', 3], [64, '17:15', 2], [32, '06:15', 3], [65, '09:15', 8]], 'holidays': [], 'now': [6, '17:00', 1, 5]}, 1)], [({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[96, '23:45', 9], [65, '21:45', 9], [62, '04:30', 2]], 'holidays': [], 'now': [5, '23:45', 4, 5]}, 9), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[64, '02:45', 9], [96, '22:00', 7], [3, '22:15', 5], [11, '08:00', 8], [32, '18:30', 3], [64, '21:15', 7]], 'holidays': [[9, 22, 2], [11, 12, 3]], 'now': [0, '08:00', 11, 12]}, 8), ({'events': [[122, '21:15', 2], [111, '21:45', 7]], 'holidays': [[7, 5, 1]], 'now': [6, '21:15', 2, 23]}, 2), ({'events': [[2, '14:15', 8], [32, '22:00', 3], [3, '03:45', 6]], 'holidays': [[6, 10, 2]], 'now': [1, '14:00', 11, 14]}, 6), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[96, '07:30', 2], [62, '16:45', 1], [3, '11:00', 6], [41, '00:30', 5], [33, '13:30', 4]], 'holidays': [], 'now': [2, '16:45', 4, 18]}, 1)], [({'events': [[71, '07:15', 7], [43, '07:45', 3], [64, '16:30', 2]], 'holidays': [], 'now': [0, '07:45', 6, 24]}, 3), ({'events': [[62, '22:00', 1], [65, '23:00', 9], [127, '05:00', 3]], 'holidays': [[1, 1, 0]], 'now': [1, '02:00', 1, 1]}, 9), ({'events': [[3, '16:15', 1], [32, '20:45', 7]], 'holidays': [], 'now': [0, '16:15', 6, 23]}, 1), ({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 2), ({'events': [[3, '02:45', 8], [27, '05:30', 9], [125, '10:00', 1], [1, '18:15', 1], [3, '01:15', 9]], 'holidays': [[9, 12, 5], [9, 7, 4]], 'now': [1, '05:30', 5, 26]}, 9), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[126, '23:30', 9], [2, '23:45', 9], [125, '20:45', 8], [38, '10:15', 5], [96, '23:00', 3], [65, '04:45', 9]], 'holidays': [[8, 7, 4], [5, 2, 3]], 'now': [1, '23:07', 8, 7]}, 8), ({'events': [[62, '14:15', 9], [1, '05:00', 1], [127, '10:30', 3], [3, '09:45', 6], [65, '04:45', 6]], 'holidays': [[1, 25, 1], [8, 20, 3]], 'now': [1, '09:30', 1, 25]}, 3)], [({'events': [[127, '15:15', 4], [99, '21:30', 1], [127, '15:45', 9]], 'holidays': [], 'now': [4, '15:15', 2, 11]}, 4), ({'events': [[16, '08:15', 6], [122, '03:15', 9], [62, '18:15', 5], [1, '02:15', 1], [1, '23:30', 9], [1, '06:15', 6]], 'holidays': [], 'now': [4, '03:15', 1, 12]}, 9), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 2), ({'events': [[96, '03:15', 3], [1, '02:00', 4], [32, '18:30', 4], [62, '10:00', 1], [13, '14:15', 1]], 'holidays': [], 'now': [0, '14:15', 7, 9]}, 1), ({'events': [[3, '15:00', 5], [2, '22:00', 1], [127, '00:15', 6], [2, '16:15', 5], [47, '11:15', 1], [99, '04:45', 4]], 'holidays': [[10, 23, 2]], 'now': [3, '00:00', 2, 2]}, 1), ({'events': [[127, '14:30', 1]], 'holidays': [[10, 11, 1]], 'now': [1, '14:30', 1, 16]}, 1)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('timing 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":"fe0c80f0bdca2998976beb6fd60946a41795f8ca99f009d45a407abe6e6191ca","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    def mins(s):\n        h, m = s.split(':')\n        return int(h) * 60 + int(m)\n    dow, hm, mo, dy = x['now']\n    t = mins(hm)\n    eff = dow\n    for hmo, hdy, as_dow in x['holidays']:\n        if hmo == mo and hdy == dy:\n            eff = as_dow\n    best = None\n    for mask, st, plan in x['events']:\n        if mask >> eff & 1 and mins(st) <= t:\n            if best is None or mins(st) >= best[0]:\n                best = (mins(st), plan)\n    if best is not None:\n        return best[1]\n    for back in range(1, 8):\n        d = (dow - back) % 7\n        cand = [(mins(st), plan) for mask, st, plan in x['events'] if mask >> d & 1]\n        if cand:\n            return sorted(cand, key=lambda c: c[0])[-1][1]\n    return 'free'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'events': [[61, '04:00', 3], [1, '13:30', 2], [2, '23:15', 4], [65, '01:30', 2], [1, '06:45', 5], [125, '16:45', 1]], 'holidays': [], 'now': [0, '01:30', 5, 23]}, 2), ({'events': [[88, '03:00', 1], [96, '19:15', 6], [1, '04:30', 4], [65, '09:15', 3]], 'holidays': [[10, 20, 3], [9, 16, 0]], 'now': [0, '04:15', 4, 16]}, 6), ({'events': [[98, '09:45', 7], [96, '06:45', 5]], 'holidays': [], 'now': [5, '09:44', 4, 17]}, 5), ({'events': [[110, '21:45', 2], [62, '12:45', 2], [62, '03:15', 7]], 'holidays': [[12, 2, 0]], 'now': [4, '03:15', 6, 22]}, 7), ({'events': [[62, '21:45', 3], [1, '15:30', 5], [65, '17:15', 5]], 'holidays': [[10, 4, 4], [7, 21, 0]], 'now': [3, '04:15', 12, 27]}, 3), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[62, '22:00', 1], [65, '23:00', 9], [127, '05:00', 3]], 'holidays': [[1, 1, 0]], 'now': [1, '02:00', 1, 1]}, 9), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5)], [({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[127, '06:45', 5], [127, '16:15', 2], [2, '20:15', 6], [3, '00:00', 2]], 'holidays': [[7, 19, 1], [5, 21, 1]], 'now': [6, '03:45', 6, 9]}, 2), ({'events': [[62, '01:15', 9], [65, '10:30', 6], [47, '01:15', 4], [1, '12:30', 2], [3, '10:45', 3]], 'holidays': [], 'now': [4, '01:15', 3, 11]}, 9), ({'events': [[62, '21:00', 7], [29, '04:45', 8], [96, '20:45', 9], [104, '00:00', 8], [23, '15:45', 6]], 'holidays': [[1, 8, 3], [11, 6, 0]], 'now': [5, '04:45', 11, 6]}, 8), ({'events': [[62, '12:15', 4], [11, '05:30', 1], [32, '00:30', 6], [69, '12:00', 5], [65, '10:00', 6], [53, '16:00', 2]], 'holidays': [], 'now': [3, '05:15', 7, 25]}, 2), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[127, '12:45', 1], [127, '12:15', 3], [64, '17:15', 2], [32, '06:15', 3], [65, '09:15', 8]], 'holidays': [], 'now': [6, '17:00', 1, 5]}, 1)], [({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[96, '23:45', 9], [65, '21:45', 9], [62, '04:30', 2]], 'holidays': [], 'now': [5, '23:45', 4, 5]}, 9), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[64, '02:45', 9], [96, '22:00', 7], [3, '22:15', 5], [11, '08:00', 8], [32, '18:30', 3], [64, '21:15', 7]], 'holidays': [[9, 22, 2], [11, 12, 3]], 'now': [0, '08:00', 11, 12]}, 8), ({'events': [[122, '21:15', 2], [111, '21:45', 7]], 'holidays': [[7, 5, 1]], 'now': [6, '21:15', 2, 23]}, 2), ({'events': [[2, '14:15', 8], [32, '22:00', 3], [3, '03:45', 6]], 'holidays': [[6, 10, 2]], 'now': [1, '14:00', 11, 14]}, 6), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[96, '07:30', 2], [62, '16:45', 1], [3, '11:00', 6], [41, '00:30', 5], [33, '13:30', 4]], 'holidays': [], 'now': [2, '16:45', 4, 18]}, 1)], [({'events': [[71, '07:15', 7], [43, '07:45', 3], [64, '16:30', 2]], 'holidays': [], 'now': [0, '07:45', 6, 24]}, 3), ({'events': [[62, '22:00', 1], [65, '23:00', 9], [127, '05:00', 3]], 'holidays': [[1, 1, 0]], 'now': [1, '02:00', 1, 1]}, 9), ({'events': [[3, '16:15', 1], [32, '20:45', 7]], 'holidays': [], 'now': [0, '16:15', 6, 23]}, 1), ({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 2), ({'events': [[3, '02:45', 8], [27, '05:30', 9], [125, '10:00', 1], [1, '18:15', 1], [3, '01:15', 9]], 'holidays': [[9, 12, 5], [9, 7, 4]], 'now': [1, '05:30', 5, 26]}, 9), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[126, '23:30', 9], [2, '23:45', 9], [125, '20:45', 8], [38, '10:15', 5], [96, '23:00', 3], [65, '04:45', 9]], 'holidays': [[8, 7, 4], [5, 2, 3]], 'now': [1, '23:07', 8, 7]}, 8), ({'events': [[62, '14:15', 9], [1, '05:00', 1], [127, '10:30', 3], [3, '09:45', 6], [65, '04:45', 6]], 'holidays': [[1, 25, 1], [8, 20, 3]], 'now': [1, '09:30', 1, 25]}, 3)], [({'events': [[127, '15:15', 4], [99, '21:30', 1], [127, '15:45', 9]], 'holidays': [], 'now': [4, '15:15', 2, 11]}, 4), ({'events': [[16, '08:15', 6], [122, '03:15', 9], [62, '18:15', 5], [1, '02:15', 1], [1, '23:30', 9], [1, '06:15', 6]], 'holidays': [], 'now': [4, '03:15', 1, 12]}, 9), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 2), ({'events': [[96, '03:15', 3], [1, '02:00', 4], [32, '18:30', 4], [62, '10:00', 1], [13, '14:15', 1]], 'holidays': [], 'now': [0, '14:15', 7, 9]}, 1), ({'events': [[3, '15:00', 5], [2, '22:00', 1], [127, '00:15', 6], [2, '16:15', 5], [47, '11:15', 1], [99, '04:45', 4]], 'holidays': [[10, 23, 2]], 'now': [3, '00:00', 2, 2]}, 1), ({'events': [[127, '14:30', 1]], 'holidays': [[10, 11, 1]], 'now': [1, '14:30', 1, 16]}, 1)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('timing 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-traffic_signal_timing_plans-tod-schedule-start-boundary","generated_at":"2026-09-29T14:47:58.934722+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Signal timing arithmetic is exact and integer or rational; a wrong rule silently produces unsafe or inefficient timing plans.","repair":"Restore the event start boundary rule so that the step reads `mins(st) <= t`.","root_cause":"An event starting exactly at the current minute is not yet considered active, so the previous plan persists for one minute.","sha256":"c87575c24576d153f29e331bd2a1dd278b1a34caefa80462674f1f8d8e9de887","title":"Time-of-day plan schedule: events are compared at hour granularity · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.234,"exit_code":1,"observations":[{"actual":2,"check":"timing oracle 0","expected":2,"passed":true},{"actual":4,"check":"timing oracle 1","expected":6,"passed":false},{"actual":7,"check":"timing oracle 2","expected":5,"passed":false},{"actual":7,"check":"timing oracle 3","expected":7,"passed":true},{"actual":3,"check":"timing oracle 4","expected":3,"passed":true},{"actual":2,"check":"timing oracle 5","expected":2,"passed":true},{"actual":9,"check":"timing oracle 6","expected":9,"passed":true},{"actual":5,"check":"timing oracle 7","expected":5,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": 4, \"expected\": 6, \"passed\": false}, {\"check\": \"timing oracle 2\", \"actual\": 7, \"expected\": 5, \"passed\": false}, {\"check\": \"timing oracle 3\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.17,"exit_code":1,"observations":[{"actual":1,"check":"timing oracle 0","expected":2,"passed":false},{"actual":6,"check":"timing oracle 1","expected":6,"passed":true},{"actual":5,"check":"timing oracle 2","expected":5,"passed":true},{"actual":2,"check":"timing oracle 3","expected":7,"passed":false},{"actual":3,"check":"timing oracle 4","expected":3,"passed":true},{"actual":2,"check":"timing oracle 5","expected":2,"passed":true},{"actual":9,"check":"timing oracle 6","expected":9,"passed":true},{"actual":4,"check":"timing oracle 7","expected":5,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": 2, \"expected\": 7, \"passed\": false}, {\"check\": \"timing oracle 4\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": 4, \"expected\": 5, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.374,"exit_code":0,"observations":[{"actual":2,"check":"timing oracle 0","expected":2,"passed":true},{"actual":6,"check":"timing oracle 1","expected":6,"passed":true},{"actual":5,"check":"timing oracle 2","expected":5,"passed":true},{"actual":7,"check":"timing oracle 3","expected":7,"passed":true},{"actual":3,"check":"timing oracle 4","expected":3,"passed":true},{"actual":2,"check":"timing oracle 5","expected":2,"passed":true},{"actual":9,"check":"timing oracle 6","expected":9,"passed":true},{"actual":5,"check":"timing oracle 7","expected":5,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}