{"abstract":"Time-of-day plan schedule returns a wrong result when holidays are matched by day of month alone.","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":"An or-condition still matches every day of the holiday month.","family":"w2-traffic_signal_timing_plans-tod-schedule-holiday-match","id":"FA-68096","implementations":{"attempt":{"sha256":"4e8757caa424a08269dfd929136fbdb596d022d69f290356838d3f1eef66ab08","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 or 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': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[107, '09:30', 7], [65, '16:45', 5], [2, '15:45', 9], [1, '07:15', 9], [96, '14:00', 7], [62, '14:15', 7]], 'holidays': [[3, 22, 2], [9, 28, 0]], 'now': [4, '16:45', 2, 28]}, 7), ({'events': [[127, '21:30', 6], [25, '04:45', 5], [62, '15:00', 1]], 'holidays': [[10, 22, 5], [6, 20, 0]], 'now': [2, '04:45', 6, 16]}, 6), ({'events': [[1, '21:45', 6], [1, '18:30', 8], [69, '08:15', 4]], 'holidays': [[2, 10, 3], [10, 19, 2]], 'now': [4, '20:07', 10, 19]}, 4), ({'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': [[127, '10:30', 7], [62, '21:30', 6]], 'holidays': [], 'now': [2, '07:30', 7, 13]}, 6), ({'events': [[31, '11:45', 9], [54, '05:00', 7]], 'holidays': [[2, 10, 3], [5, 4, 1]], 'now': [5, '13:00', 11, 4]}, 7), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5)], [({'events': [[64, '15:30', 9], [2, '11:00', 3], [25, '03:45', 7]], 'holidays': [[12, 11, 2], [10, 8, 1]], 'now': [0, '13:30', 9, 11]}, 7), ({'events': [[3, '03:00', 1], [127, '22:15', 8]], 'holidays': [[3, 13, 0]], 'now': [6, '15:07', 11, 13]}, 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': [[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': [[29, '17:45', 2], [65, '17:15', 6], [94, '09:45', 5], [65, '22:45', 7]], 'holidays': [], 'now': [0, '13:30', 8, 15]}, 7), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[1, '21:00', 3], [64, '01:45', 4]], 'holidays': [], 'now': [1, '20:07', 4, 8]}, 3)], [({'events': [[96, '23:45', 3], [96, '04:45', 6], [127, '11:45', 5], [44, '12:15', 4], [2, '18:30', 5], [3, '22:00', 6]], 'holidays': [[5, 19, 2], [2, 25, 1]], 'now': [2, '23:15', 2, 22]}, 4), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[37, '17:45', 1], [2, '12:00', 2], [62, '18:30', 1]], 'holidays': [[7, 17, 6]], 'now': [2, '05:30', 7, 17]}, 1), ({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[64, '00:30', 6], [65, '19:30', 9], [32, '07:00', 5], [32, '02:00', 2]], 'holidays': [[1, 13, 3], [3, 23, 1]], 'now': [5, '08:45', 3, 14]}, 5), ({'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': [[64, '10:45', 5], [13, '04:30', 3], [8, '15:45', 4], [64, '16:45', 7]], 'holidays': [[3, 3, 2], [6, 4, 1]], 'now': [2, '16:15', 10, 18]}, 3)], [({'events': [[65, '04:00', 3]], 'holidays': [[7, 19, 5], [11, 17, 0]], 'now': [0, '12:30', 6, 28]}, 3), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[64, '13:45', 5], [96, '00:15', 7]], 'holidays': [[7, 6, 4], [2, 7, 3]], 'now': [5, '02:30', 6, 6]}, 7), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[60, '18:45', 8], [64, '12:45', 7], [1, '14:15', 8]], 'holidays': [[12, 7, 1], [12, 8, 0]], 'now': [6, '20:00', 12, 23]}, 7), ({'events': [[64, '05:45', 6]], 'holidays': [[12, 16, 0]], 'now': [2, '21:45', 12, 16]}, 6), ({'events': [[70, '05:45', 7], [62, '13:45', 4], [9, '02:45', 5], [2, '17:30', 5]], 'holidays': [[7, 23, 1], [6, 14, 1]], 'now': [6, '21:45', 7, 14]}, 7)], [({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[101, '20:15', 3], [1, '23:45', 5], [62, '20:15', 1]], 'holidays': [[3, 3, 0]], 'now': [1, '23:00', 10, 3]}, 1), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[64, '17:15', 6], [1, '03:15', 8], [6, '21:00', 8], [117, '19:15', 7], [1, '23:15', 8]], 'holidays': [[5, 26, 1]], 'now': [0, '11:44', 3, 26]}, 8), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[65, '06:45', 1], [1, '04:45', 2], [62, '21:00', 3]], 'holidays': [[12, 23, 4]], 'now': [3, '03:30', 9, 20]}, 3), ({'events': [[37, '17:15', 8]], 'holidays': [[1, 20, 6], [8, 15, 5]], 'now': [2, '21:00', 11, 8]}, 8), ({'events': [[120, '07:15', 7], [99, '16:45', 3]], 'holidays': [[12, 13, 0]], 'now': [5, '19:00', 12, 13]}, 3)]]\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":"1129833b85a332954669c1916e9b309154cd6978d58519a758e5874ebb29191a","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 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': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[107, '09:30', 7], [65, '16:45', 5], [2, '15:45', 9], [1, '07:15', 9], [96, '14:00', 7], [62, '14:15', 7]], 'holidays': [[3, 22, 2], [9, 28, 0]], 'now': [4, '16:45', 2, 28]}, 7), ({'events': [[127, '21:30', 6], [25, '04:45', 5], [62, '15:00', 1]], 'holidays': [[10, 22, 5], [6, 20, 0]], 'now': [2, '04:45', 6, 16]}, 6), ({'events': [[1, '21:45', 6], [1, '18:30', 8], [69, '08:15', 4]], 'holidays': [[2, 10, 3], [10, 19, 2]], 'now': [4, '20:07', 10, 19]}, 4), ({'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': [[127, '10:30', 7], [62, '21:30', 6]], 'holidays': [], 'now': [2, '07:30', 7, 13]}, 6), ({'events': [[31, '11:45', 9], [54, '05:00', 7]], 'holidays': [[2, 10, 3], [5, 4, 1]], 'now': [5, '13:00', 11, 4]}, 7), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5)], [({'events': [[64, '15:30', 9], [2, '11:00', 3], [25, '03:45', 7]], 'holidays': [[12, 11, 2], [10, 8, 1]], 'now': [0, '13:30', 9, 11]}, 7), ({'events': [[3, '03:00', 1], [127, '22:15', 8]], 'holidays': [[3, 13, 0]], 'now': [6, '15:07', 11, 13]}, 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': [[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': [[29, '17:45', 2], [65, '17:15', 6], [94, '09:45', 5], [65, '22:45', 7]], 'holidays': [], 'now': [0, '13:30', 8, 15]}, 7), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[1, '21:00', 3], [64, '01:45', 4]], 'holidays': [], 'now': [1, '20:07', 4, 8]}, 3)], [({'events': [[96, '23:45', 3], [96, '04:45', 6], [127, '11:45', 5], [44, '12:15', 4], [2, '18:30', 5], [3, '22:00', 6]], 'holidays': [[5, 19, 2], [2, 25, 1]], 'now': [2, '23:15', 2, 22]}, 4), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[37, '17:45', 1], [2, '12:00', 2], [62, '18:30', 1]], 'holidays': [[7, 17, 6]], 'now': [2, '05:30', 7, 17]}, 1), ({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[64, '00:30', 6], [65, '19:30', 9], [32, '07:00', 5], [32, '02:00', 2]], 'holidays': [[1, 13, 3], [3, 23, 1]], 'now': [5, '08:45', 3, 14]}, 5), ({'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': [[64, '10:45', 5], [13, '04:30', 3], [8, '15:45', 4], [64, '16:45', 7]], 'holidays': [[3, 3, 2], [6, 4, 1]], 'now': [2, '16:15', 10, 18]}, 3)], [({'events': [[65, '04:00', 3]], 'holidays': [[7, 19, 5], [11, 17, 0]], 'now': [0, '12:30', 6, 28]}, 3), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[64, '13:45', 5], [96, '00:15', 7]], 'holidays': [[7, 6, 4], [2, 7, 3]], 'now': [5, '02:30', 6, 6]}, 7), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[60, '18:45', 8], [64, '12:45', 7], [1, '14:15', 8]], 'holidays': [[12, 7, 1], [12, 8, 0]], 'now': [6, '20:00', 12, 23]}, 7), ({'events': [[64, '05:45', 6]], 'holidays': [[12, 16, 0]], 'now': [2, '21:45', 12, 16]}, 6), ({'events': [[70, '05:45', 7], [62, '13:45', 4], [9, '02:45', 5], [2, '17:30', 5]], 'holidays': [[7, 23, 1], [6, 14, 1]], 'now': [6, '21:45', 7, 14]}, 7)], [({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[101, '20:15', 3], [1, '23:45', 5], [62, '20:15', 1]], 'holidays': [[3, 3, 0]], 'now': [1, '23:00', 10, 3]}, 1), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[64, '17:15', 6], [1, '03:15', 8], [6, '21:00', 8], [117, '19:15', 7], [1, '23:15', 8]], 'holidays': [[5, 26, 1]], 'now': [0, '11:44', 3, 26]}, 8), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[65, '06:45', 1], [1, '04:45', 2], [62, '21:00', 3]], 'holidays': [[12, 23, 4]], 'now': [3, '03:30', 9, 20]}, 3), ({'events': [[37, '17:15', 8]], 'holidays': [[1, 20, 6], [8, 15, 5]], 'now': [2, '21:00', 11, 8]}, 8), ({'events': [[120, '07:15', 7], [99, '16:45', 3]], 'holidays': [[12, 13, 0]], 'now': [5, '19:00', 12, 13]}, 3)]]\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":"1f0f67a34db8fc36a1f374935c432c41dfe45b0df8375b39a65f3b6ccbcccc00","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': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[107, '09:30', 7], [65, '16:45', 5], [2, '15:45', 9], [1, '07:15', 9], [96, '14:00', 7], [62, '14:15', 7]], 'holidays': [[3, 22, 2], [9, 28, 0]], 'now': [4, '16:45', 2, 28]}, 7), ({'events': [[127, '21:30', 6], [25, '04:45', 5], [62, '15:00', 1]], 'holidays': [[10, 22, 5], [6, 20, 0]], 'now': [2, '04:45', 6, 16]}, 6), ({'events': [[1, '21:45', 6], [1, '18:30', 8], [69, '08:15', 4]], 'holidays': [[2, 10, 3], [10, 19, 2]], 'now': [4, '20:07', 10, 19]}, 4), ({'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': [[127, '10:30', 7], [62, '21:30', 6]], 'holidays': [], 'now': [2, '07:30', 7, 13]}, 6), ({'events': [[31, '11:45', 9], [54, '05:00', 7]], 'holidays': [[2, 10, 3], [5, 4, 1]], 'now': [5, '13:00', 11, 4]}, 7), ({'events': [[2, '06:00', 3], [2, '09:00', 4], [2, '15:30', 5]], 'holidays': [], 'now': [1, '15:30', 5, 5]}, 5)], [({'events': [[64, '15:30', 9], [2, '11:00', 3], [25, '03:45', 7]], 'holidays': [[12, 11, 2], [10, 8, 1]], 'now': [0, '13:30', 9, 11]}, 7), ({'events': [[3, '03:00', 1], [127, '22:15', 8]], 'holidays': [[3, 13, 0]], 'now': [6, '15:07', 11, 13]}, 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': [[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': [[29, '17:45', 2], [65, '17:15', 6], [94, '09:45', 5], [65, '22:45', 7]], 'holidays': [], 'now': [0, '13:30', 8, 15]}, 7), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[1, '21:00', 3], [64, '01:45', 4]], 'holidays': [], 'now': [1, '20:07', 4, 8]}, 3)], [({'events': [[96, '23:45', 3], [96, '04:45', 6], [127, '11:45', 5], [44, '12:15', 4], [2, '18:30', 5], [3, '22:00', 6]], 'holidays': [[5, 19, 2], [2, 25, 1]], 'now': [2, '23:15', 2, 22]}, 4), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[37, '17:45', 1], [2, '12:00', 2], [62, '18:30', 1]], 'holidays': [[7, 17, 6]], 'now': [2, '05:30', 7, 17]}, 1), ({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[64, '00:30', 6], [65, '19:30', 9], [32, '07:00', 5], [32, '02:00', 2]], 'holidays': [[1, 13, 3], [3, 23, 1]], 'now': [5, '08:45', 3, 14]}, 5), ({'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': [[64, '10:45', 5], [13, '04:30', 3], [8, '15:45', 4], [64, '16:45', 7]], 'holidays': [[3, 3, 2], [6, 4, 1]], 'now': [2, '16:15', 10, 18]}, 3)], [({'events': [[65, '04:00', 3]], 'holidays': [[7, 19, 5], [11, 17, 0]], 'now': [0, '12:30', 6, 28]}, 3), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[64, '13:45', 5], [96, '00:15', 7]], 'holidays': [[7, 6, 4], [2, 7, 3]], 'now': [5, '02:30', 6, 6]}, 7), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[60, '18:45', 8], [64, '12:45', 7], [1, '14:15', 8]], 'holidays': [[12, 7, 1], [12, 8, 0]], 'now': [6, '20:00', 12, 23]}, 7), ({'events': [[64, '05:45', 6]], 'holidays': [[12, 16, 0]], 'now': [2, '21:45', 12, 16]}, 6), ({'events': [[70, '05:45', 7], [62, '13:45', 4], [9, '02:45', 5], [2, '17:30', 5]], 'holidays': [[7, 23, 1], [6, 14, 1]], 'now': [6, '21:45', 7, 14]}, 7)], [({'events': [[62, '06:00', 2], [65, '08:00', 6]], 'holidays': [[7, 4, 0]], 'now': [4, '07:00', 7, 4]}, 2), ({'events': [[101, '20:15', 3], [1, '23:45', 5], [62, '20:15', 1]], 'holidays': [[3, 3, 0]], 'now': [1, '23:00', 10, 3]}, 1), ({'events': [[8, '21:00', 7]], 'holidays': [], 'now': [3, '20:59', 1, 2]}, 7), ({'events': [[64, '17:15', 6], [1, '03:15', 8], [6, '21:00', 8], [117, '19:15', 7], [1, '23:15', 8]], 'holidays': [[5, 26, 1]], 'now': [0, '11:44', 3, 26]}, 8), ({'events': [[62, '06:00', 2], [65, '06:00', 6]], 'holidays': [[12, 25, 0]], 'now': [3, '08:00', 6, 25]}, 2), ({'events': [[65, '06:45', 1], [1, '04:45', 2], [62, '21:00', 3]], 'holidays': [[12, 23, 4]], 'now': [3, '03:30', 9, 20]}, 3), ({'events': [[37, '17:15', 8]], 'holidays': [[1, 20, 6], [8, 15, 5]], 'now': [2, '21:00', 11, 8]}, 8), ({'events': [[120, '07:15', 7], [99, '16:45', 3]], 'holidays': [[12, 13, 0]], 'now': [5, '19:00', 12, 13]}, 3)]]\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-holiday-match","generated_at":"2026-09-29T14:47:59.014976+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 holiday date match rule so that the step reads `if hmo == mo and hdy == dy:`.","root_cause":"Any date with the same day of month triggers the holiday program.","sha256":"4f1c632f62aba14fc2a6487c535fba3479b80d8e4e3db48741d265dbff9882aa","title":"Time-of-day plan schedule: holidays are matched by day of month alone · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.286,"exit_code":1,"observations":[{"actual":6,"check":"timing oracle 0","expected":2,"passed":false},{"actual":5,"check":"timing oracle 1","expected":7,"passed":false},{"actual":5,"check":"timing oracle 2","expected":6,"passed":false},{"actual":4,"check":"timing oracle 3","expected":4,"passed":true},{"actual":9,"check":"timing oracle 4","expected":9,"passed":true},{"actual":6,"check":"timing oracle 5","expected":6,"passed":true},{"actual":9,"check":"timing oracle 6","expected":7,"passed":false},{"actual":5,"check":"timing oracle 7","expected":5,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": 6, \"expected\": 2, \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": 5, \"expected\": 7, \"passed\": false}, {\"check\": \"timing oracle 2\", \"actual\": 5, \"expected\": 6, \"passed\": false}, {\"check\": \"timing oracle 3\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": 9, \"expected\": 7, \"passed\": false}, {\"check\": \"timing oracle 7\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.968,"exit_code":1,"observations":[{"actual":6,"check":"timing oracle 0","expected":2,"passed":false},{"actual":5,"check":"timing oracle 1","expected":7,"passed":false},{"actual":6,"check":"timing oracle 2","expected":6,"passed":true},{"actual":4,"check":"timing oracle 3","expected":4,"passed":true},{"actual":9,"check":"timing oracle 4","expected":9,"passed":true},{"actual":6,"check":"timing oracle 5","expected":6,"passed":true},{"actual":9,"check":"timing oracle 6","expected":7,"passed":false},{"actual":5,"check":"timing oracle 7","expected":5,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": 6, \"expected\": 2, \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": 5, \"expected\": 7, \"passed\": false}, {\"check\": \"timing oracle 2\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": 9, \"expected\": 7, \"passed\": false}, {\"check\": \"timing oracle 7\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.914,"exit_code":0,"observations":[{"actual":2,"check":"timing oracle 0","expected":2,"passed":true},{"actual":7,"check":"timing oracle 1","expected":7,"passed":true},{"actual":6,"check":"timing oracle 2","expected":6,"passed":true},{"actual":4,"check":"timing oracle 3","expected":4,"passed":true},{"actual":9,"check":"timing oracle 4","expected":9,"passed":true},{"actual":6,"check":"timing oracle 5","expected":6,"passed":true},{"actual":7,"check":"timing oracle 6","expected":7,"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\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}