{"abstract":"Time-of-day plan schedule returns a wrong result when the carryover search looks back only one day.","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":"Six days back misses the same weekday one week earlier when today has only later events.","family":"w2-traffic_signal_timing_plans-tod-schedule-search-depth","id":"FA-68106","implementations":{"attempt":{"sha256":"fd5a9eee013bb5f5af384420c9cb0dc82446387c375981f5350960976346755b","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, 7):\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': [[2, '16:45', 2], [65, '09:30', 6], [3, '02:45', 7], [117, '23:00', 6], [71, '09:15', 2], [96, '07:30', 3]], 'holidays': [[3, 12, 3]], 'now': [4, '09:30', 12, 4]}, 6), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[96, '05:15', 6], [64, '10:45', 6], [96, '09:45', 1], [2, '12:15', 8]], 'holidays': [], 'now': [3, '10:45', 10, 12]}, 8), ({'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': [[1, '02:45', 1]], 'holidays': [[10, 23, 5]], 'now': [0, '02:15', 10, 23]}, 1), ({'events': [[109, '05:30', 6], [54, '02:30', 9], [65, '20:30', 8], [10, '13:15', 2], [65, '17:15', 9], [119, '20:30', 9]], 'holidays': [], 'now': [3, '20:30', 3, 22]}, 2)], [({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 2), ({'events': [[3, '05:30', 2]], 'holidays': [[2, 4, 0]], 'now': [5, '08:45', 7, 2]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[3, '09:30', 4], [2, '00:15', 6], [6, '11:45', 6], [104, '14:30', 8], [64, '02:45', 4]], 'holidays': [[9, 4, 5], [11, 19, 4]], 'now': [6, '15:30', 11, 24]}, 8), ({'events': [[2, '08:15', 5]], 'holidays': [[5, 27, 6]], 'now': [1, '14:45', 5, 27]}, 5), ({'events': [[70, '11:15', 8], [127, '18:00', 5], [65, '14:15', 8], [3, '08:30', 5], [1, '10:45', 8], [96, '00:30', 4]], 'holidays': [[7, 6, 5], [8, 2, 0]], 'now': [1, '12:15', 7, 6]}, 4), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[127, '13:45', 4], [2, '20:15', 7], [119, '13:15', 7], [93, '19:15', 1], [62, '03:00', 7]], 'holidays': [[8, 8, 0], [1, 15, 3]], 'now': [6, '03:44', 5, 19]}, 4)], [({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 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': [[85, '18:45', 2], [42, '03:00', 5], [100, '07:30', 8], [3, '05:00', 6], [127, '05:15', 9], [1, '12:15', 7]], 'holidays': [[6, 20, 2]], 'now': [2, '00:30', 6, 20]}, 9), ({'events': [[96, '19:00', 5]], 'holidays': [], 'now': [0, '19:00', 2, 26]}, 5), ({'events': [[64, '12:15', 2], [32, '10:15', 5], [62, '08:30', 6], [58, '07:00', 7], [32, '21:45', 7]], 'holidays': [[4, 10, 3], [4, 6, 3]], 'now': [4, '08:30', 4, 6]}, 6), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[32, '21:30', 8], [32, '00:00', 1]], 'holidays': [], 'now': [2, '00:00', 8, 17]}, 8), ({'events': [[2, '18:30', 5], [2, '23:00', 6], [1, '00:15', 7]], 'holidays': [[4, 14, 2]], 'now': [5, '18:30', 2, 12]}, 6)], [({'events': [[2, '00:15', 9], [96, '03:00', 1], [65, '08:30', 5]], 'holidays': [[1, 23, 6], [7, 18, 3]], 'now': [3, '03:00', 1, 21]}, 9), ({'events': [[2, '18:15', 6], [14, '04:45', 2], [96, '23:00', 5], [116, '16:45', 4], [32, '21:00', 1], [64, '08:15', 8]], 'holidays': [], 'now': [1, '08:15', 9, 3]}, 2), ({'events': [[3, '08:15', 1], [127, '04:30', 8], [3, '12:30', 4]], 'holidays': [[3, 23, 2]], 'now': [5, '04:30', 5, 15]}, 8), ({'events': [[87, '22:45', 4]], 'holidays': [[7, 23, 0], [12, 2, 6]], 'now': [5, '22:45', 1, 27]}, 4), ({'events': [[96, '21:00', 9], [1, '10:15', 3], [3, '23:45', 2]], 'holidays': [[9, 6, 3], [4, 25, 6]], 'now': [3, '14:15', 3, 28]}, 2), ({'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, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7)], [({'events': [[2, '16:45', 2], [65, '01:45', 3], [3, '07:30', 8]], 'holidays': [], 'now': [5, '14:30', 2, 20]}, 2), ({'events': [[3, '15:30', 5], [62, '17:00', 8], [3, '17:00', 8], [32, '17:00', 8], [65, '18:45', 7], [62, '14:15', 7]], 'holidays': [[2, 25, 3]], 'now': [5, '23:30', 10, 8]}, 8), ({'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': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[12, '19:30', 2], [31, '20:00', 9], [65, '04:30', 6]], 'holidays': [[12, 9, 3], [8, 9, 4]], 'now': [2, '23:15', 8, 9]}, 9), ({'events': [[96, '11:00', 9]], 'holidays': [], 'now': [1, '11:00', 1, 23]}, 9), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[1, '16:15', 8]], 'holidays': [[2, 15, 6]], 'now': [0, '10:45', 5, 11]}, 8)]]\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":"d0cb840623c70cba95fb210a637813eb09679986991fde9bf38598db5579edcc","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, 2):\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': [[2, '16:45', 2], [65, '09:30', 6], [3, '02:45', 7], [117, '23:00', 6], [71, '09:15', 2], [96, '07:30', 3]], 'holidays': [[3, 12, 3]], 'now': [4, '09:30', 12, 4]}, 6), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[96, '05:15', 6], [64, '10:45', 6], [96, '09:45', 1], [2, '12:15', 8]], 'holidays': [], 'now': [3, '10:45', 10, 12]}, 8), ({'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': [[1, '02:45', 1]], 'holidays': [[10, 23, 5]], 'now': [0, '02:15', 10, 23]}, 1), ({'events': [[109, '05:30', 6], [54, '02:30', 9], [65, '20:30', 8], [10, '13:15', 2], [65, '17:15', 9], [119, '20:30', 9]], 'holidays': [], 'now': [3, '20:30', 3, 22]}, 2)], [({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 2), ({'events': [[3, '05:30', 2]], 'holidays': [[2, 4, 0]], 'now': [5, '08:45', 7, 2]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[3, '09:30', 4], [2, '00:15', 6], [6, '11:45', 6], [104, '14:30', 8], [64, '02:45', 4]], 'holidays': [[9, 4, 5], [11, 19, 4]], 'now': [6, '15:30', 11, 24]}, 8), ({'events': [[2, '08:15', 5]], 'holidays': [[5, 27, 6]], 'now': [1, '14:45', 5, 27]}, 5), ({'events': [[70, '11:15', 8], [127, '18:00', 5], [65, '14:15', 8], [3, '08:30', 5], [1, '10:45', 8], [96, '00:30', 4]], 'holidays': [[7, 6, 5], [8, 2, 0]], 'now': [1, '12:15', 7, 6]}, 4), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[127, '13:45', 4], [2, '20:15', 7], [119, '13:15', 7], [93, '19:15', 1], [62, '03:00', 7]], 'holidays': [[8, 8, 0], [1, 15, 3]], 'now': [6, '03:44', 5, 19]}, 4)], [({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 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': [[85, '18:45', 2], [42, '03:00', 5], [100, '07:30', 8], [3, '05:00', 6], [127, '05:15', 9], [1, '12:15', 7]], 'holidays': [[6, 20, 2]], 'now': [2, '00:30', 6, 20]}, 9), ({'events': [[96, '19:00', 5]], 'holidays': [], 'now': [0, '19:00', 2, 26]}, 5), ({'events': [[64, '12:15', 2], [32, '10:15', 5], [62, '08:30', 6], [58, '07:00', 7], [32, '21:45', 7]], 'holidays': [[4, 10, 3], [4, 6, 3]], 'now': [4, '08:30', 4, 6]}, 6), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[32, '21:30', 8], [32, '00:00', 1]], 'holidays': [], 'now': [2, '00:00', 8, 17]}, 8), ({'events': [[2, '18:30', 5], [2, '23:00', 6], [1, '00:15', 7]], 'holidays': [[4, 14, 2]], 'now': [5, '18:30', 2, 12]}, 6)], [({'events': [[2, '00:15', 9], [96, '03:00', 1], [65, '08:30', 5]], 'holidays': [[1, 23, 6], [7, 18, 3]], 'now': [3, '03:00', 1, 21]}, 9), ({'events': [[2, '18:15', 6], [14, '04:45', 2], [96, '23:00', 5], [116, '16:45', 4], [32, '21:00', 1], [64, '08:15', 8]], 'holidays': [], 'now': [1, '08:15', 9, 3]}, 2), ({'events': [[3, '08:15', 1], [127, '04:30', 8], [3, '12:30', 4]], 'holidays': [[3, 23, 2]], 'now': [5, '04:30', 5, 15]}, 8), ({'events': [[87, '22:45', 4]], 'holidays': [[7, 23, 0], [12, 2, 6]], 'now': [5, '22:45', 1, 27]}, 4), ({'events': [[96, '21:00', 9], [1, '10:15', 3], [3, '23:45', 2]], 'holidays': [[9, 6, 3], [4, 25, 6]], 'now': [3, '14:15', 3, 28]}, 2), ({'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, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7)], [({'events': [[2, '16:45', 2], [65, '01:45', 3], [3, '07:30', 8]], 'holidays': [], 'now': [5, '14:30', 2, 20]}, 2), ({'events': [[3, '15:30', 5], [62, '17:00', 8], [3, '17:00', 8], [32, '17:00', 8], [65, '18:45', 7], [62, '14:15', 7]], 'holidays': [[2, 25, 3]], 'now': [5, '23:30', 10, 8]}, 8), ({'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': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[12, '19:30', 2], [31, '20:00', 9], [65, '04:30', 6]], 'holidays': [[12, 9, 3], [8, 9, 4]], 'now': [2, '23:15', 8, 9]}, 9), ({'events': [[96, '11:00', 9]], 'holidays': [], 'now': [1, '11:00', 1, 23]}, 9), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[1, '16:15', 8]], 'holidays': [[2, 15, 6]], 'now': [0, '10:45', 5, 11]}, 8)]]\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":"7be5fecc5e47f62ee9c2f74bab0ac21f310355a573b50b660ba26bb0c0bd3598","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': [[2, '16:45', 2], [65, '09:30', 6], [3, '02:45', 7], [117, '23:00', 6], [71, '09:15', 2], [96, '07:30', 3]], 'holidays': [[3, 12, 3]], 'now': [4, '09:30', 12, 4]}, 6), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[96, '05:15', 6], [64, '10:45', 6], [96, '09:45', 1], [2, '12:15', 8]], 'holidays': [], 'now': [3, '10:45', 10, 12]}, 8), ({'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': [[1, '02:45', 1]], 'holidays': [[10, 23, 5]], 'now': [0, '02:15', 10, 23]}, 1), ({'events': [[109, '05:30', 6], [54, '02:30', 9], [65, '20:30', 8], [10, '13:15', 2], [65, '17:15', 9], [119, '20:30', 9]], 'holidays': [], 'now': [3, '20:30', 3, 22]}, 2)], [({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 2), ({'events': [[3, '05:30', 2]], 'holidays': [[2, 4, 0]], 'now': [5, '08:45', 7, 2]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[3, '09:30', 4], [2, '00:15', 6], [6, '11:45', 6], [104, '14:30', 8], [64, '02:45', 4]], 'holidays': [[9, 4, 5], [11, 19, 4]], 'now': [6, '15:30', 11, 24]}, 8), ({'events': [[2, '08:15', 5]], 'holidays': [[5, 27, 6]], 'now': [1, '14:45', 5, 27]}, 5), ({'events': [[70, '11:15', 8], [127, '18:00', 5], [65, '14:15', 8], [3, '08:30', 5], [1, '10:45', 8], [96, '00:30', 4]], 'holidays': [[7, 6, 5], [8, 2, 0]], 'now': [1, '12:15', 7, 6]}, 4), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[127, '13:45', 4], [2, '20:15', 7], [119, '13:15', 7], [93, '19:15', 1], [62, '03:00', 7]], 'holidays': [[8, 8, 0], [1, 15, 3]], 'now': [6, '03:44', 5, 19]}, 4)], [({'events': [[127, '06:30', 2], [62, '06:00', 5]], 'holidays': [], 'now': [2, '06:45', 3, 3]}, 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': [[85, '18:45', 2], [42, '03:00', 5], [100, '07:30', 8], [3, '05:00', 6], [127, '05:15', 9], [1, '12:15', 7]], 'holidays': [[6, 20, 2]], 'now': [2, '00:30', 6, 20]}, 9), ({'events': [[96, '19:00', 5]], 'holidays': [], 'now': [0, '19:00', 2, 26]}, 5), ({'events': [[64, '12:15', 2], [32, '10:15', 5], [62, '08:30', 6], [58, '07:00', 7], [32, '21:45', 7]], 'holidays': [[4, 10, 3], [4, 6, 3]], 'now': [4, '08:30', 4, 6]}, 6), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[32, '21:30', 8], [32, '00:00', 1]], 'holidays': [], 'now': [2, '00:00', 8, 17]}, 8), ({'events': [[2, '18:30', 5], [2, '23:00', 6], [1, '00:15', 7]], 'holidays': [[4, 14, 2]], 'now': [5, '18:30', 2, 12]}, 6)], [({'events': [[2, '00:15', 9], [96, '03:00', 1], [65, '08:30', 5]], 'holidays': [[1, 23, 6], [7, 18, 3]], 'now': [3, '03:00', 1, 21]}, 9), ({'events': [[2, '18:15', 6], [14, '04:45', 2], [96, '23:00', 5], [116, '16:45', 4], [32, '21:00', 1], [64, '08:15', 8]], 'holidays': [], 'now': [1, '08:15', 9, 3]}, 2), ({'events': [[3, '08:15', 1], [127, '04:30', 8], [3, '12:30', 4]], 'holidays': [[3, 23, 2]], 'now': [5, '04:30', 5, 15]}, 8), ({'events': [[87, '22:45', 4]], 'holidays': [[7, 23, 0], [12, 2, 6]], 'now': [5, '22:45', 1, 27]}, 4), ({'events': [[96, '21:00', 9], [1, '10:15', 3], [3, '23:45', 2]], 'holidays': [[9, 6, 3], [4, 25, 6]], 'now': [3, '14:15', 3, 28]}, 2), ({'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, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7)], [({'events': [[2, '16:45', 2], [65, '01:45', 3], [3, '07:30', 8]], 'holidays': [], 'now': [5, '14:30', 2, 20]}, 2), ({'events': [[3, '15:30', 5], [62, '17:00', 8], [3, '17:00', 8], [32, '17:00', 8], [65, '18:45', 7], [62, '14:15', 7]], 'holidays': [[2, 25, 3]], 'now': [5, '23:30', 10, 8]}, 8), ({'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': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[12, '19:30', 2], [31, '20:00', 9], [65, '04:30', 6]], 'holidays': [[12, 9, 3], [8, 9, 4]], 'now': [2, '23:15', 8, 9]}, 9), ({'events': [[96, '11:00', 9]], 'holidays': [], 'now': [1, '11:00', 1, 23]}, 9), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5), ({'events': [[1, '16:15', 8]], 'holidays': [[2, 15, 6]], 'now': [0, '10:45', 5, 11]}, 8)]]\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-search-depth","generated_at":"2026-09-29T14:47:59.109864+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 carryover search depth rule so that the step reads `range(1, 8)`.","root_cause":"Only yesterday is searched, so a weekly program whose previous event was several days ago falls to free mode.","sha256":"abed3208c10ee984522596afdeac04e3c0be76dd2100dca67f574f04dec6935e","title":"Time-of-day plan schedule: the carryover search looks back only one day · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.253,"exit_code":1,"observations":[{"actual":6,"check":"timing oracle 0","expected":6,"passed":true},{"actual":2,"check":"timing oracle 1","expected":2,"passed":true},{"actual":5,"check":"timing oracle 2","expected":5,"passed":true},{"actual":"free","check":"timing oracle 3","expected":7,"passed":false},{"actual":8,"check":"timing oracle 4","expected":8,"passed":true},{"actual":9,"check":"timing oracle 5","expected":9,"passed":true},{"actual":"free","check":"timing oracle 6","expected":1,"passed":false},{"actual":2,"check":"timing oracle 7","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": \"free\", \"expected\": 7, \"passed\": false}, {\"check\": \"timing oracle 4\", \"actual\": 8, \"expected\": 8, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": \"free\", \"expected\": 1, \"passed\": false}, {\"check\": \"timing oracle 7\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.146,"exit_code":1,"observations":[{"actual":"free","check":"timing oracle 0","expected":6,"passed":false},{"actual":2,"check":"timing oracle 1","expected":2,"passed":true},{"actual":5,"check":"timing oracle 2","expected":5,"passed":true},{"actual":"free","check":"timing oracle 3","expected":7,"passed":false},{"actual":"free","check":"timing oracle 4","expected":8,"passed":false},{"actual":9,"check":"timing oracle 5","expected":9,"passed":true},{"actual":"free","check":"timing oracle 6","expected":1,"passed":false},{"actual":2,"check":"timing oracle 7","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": \"free\", \"expected\": 6, \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": \"free\", \"expected\": 7, \"passed\": false}, {\"check\": \"timing oracle 4\", \"actual\": \"free\", \"expected\": 8, \"passed\": false}, {\"check\": \"timing oracle 5\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": \"free\", \"expected\": 1, \"passed\": false}, {\"check\": \"timing oracle 7\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.556,"exit_code":0,"observations":[{"actual":6,"check":"timing oracle 0","expected":6,"passed":true},{"actual":2,"check":"timing oracle 1","expected":2,"passed":true},{"actual":5,"check":"timing oracle 2","expected":5,"passed":true},{"actual":7,"check":"timing oracle 3","expected":7,"passed":true},{"actual":8,"check":"timing oracle 4","expected":8,"passed":true},{"actual":9,"check":"timing oracle 5","expected":9,"passed":true},{"actual":1,"check":"timing oracle 6","expected":1,"passed":true},{"actual":2,"check":"timing oracle 7","expected":2,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": 2, \"expected\": 2, \"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\": 8, \"expected\": 8, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}