{"abstract":"Actuated phase gap-out and max-out returns a wrong result when a phase that gapped out before the call ends before the call arrives.","category":"Traffic signal timing plans","checks":8,"contract":"Input {min_green, gap, max_green, actuations: integer seconds since green start (any order), conflict_call: seconds or null}. Each actuation at a keeps the phase eligible until a+gap; an actuation exactly at expiry extends; actuations during min green always extend. Gap-out time = max(min_green, final expiry). With no conflicting call return ['rest', gap time]. The max timer starts at the call (a call before green start counts as 0); max-out at call+max_green. If gap time <= max-out the phase ends by 'gap-out' at max(gap time, call), else by 'max-out'.","evaluation_group":"w2-traffic_signal_timing_plans-gap-max-out","failed_approach":"Clamping to min green does not model resting until the call time.","family":"w2-traffic_signal_timing_plans-gap-max-out-rest-until-call","id":"FA-67981","implementations":{"attempt":{"sha256":"7f9f551ffc56bd177af8d599d7b990b84aaee34d5c7cbf8f8c35c6e5781e23e4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    m, p, M = x['min_green'], x['gap'], x['max_green']\n    exp = 0\n    for a in sorted(x['actuations']):\n        if a > exp and a > m:\n            break\n        exp = max(exp, a + p)\n    gap_end = max(m, exp)\n    tc = x['conflict_call']\n    if tc is None:\n        return ['rest', gap_end]\n    tc = max(tc, 0)\n    max_end = tc + M\n    if gap_end <= max_end:\n        return ['gap-out', max(gap_end, m)]\n    return ['max-out', max_end]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'min_green': 10, 'gap': 5, 'max_green': 32, 'actuations': [2, 3, 16, 24, 25, 29, 40, 41, 42, 46, 53, 56, 58], 'conflict_call': 0}, ['gap-out', 10]), ({'min_green': 6, 'gap': 2, 'max_green': 38, 'actuations': [2, 5, 6, 7, 10, 12, 13, 16, 18, 19, 25, 26, 30, 33, 35, 40, 43, 48, 50], 'conflict_call': 11}, ['gap-out', 11]), ({'min_green': 4, 'gap': 2, 'max_green': 42, 'actuations': [39, 51, 53], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 9, 'gap': 4, 'max_green': 42, 'actuations': [4, 7, 8, 12, 16, 17, 18, 20, 24, 25, 26, 28, 32, 33, 34, 35, 38, 40, 41, 45, 46, 48, 49, 50, 53, 54, 56, 57, 59], 'conflict_call': 27}, ['gap-out', 63]), ({'min_green': 10, 'gap': 2, 'max_green': 23, 'actuations': [30, 24, 8, 40, 7, 3, 26, 39, 54, 36, 53, 49, 16, 37, 17, 15, 18, 47, 25, 57, 11, 34, 28, 58, 38, 10, 51, 1, 4], 'conflict_call': 5}, ['gap-out', 13]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 6, 'gap': 2, 'max_green': 15, 'actuations': [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38], 'conflict_call': -3}, ['max-out', 15]), ({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3])], [({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 4, 'gap': 2, 'max_green': 17, 'actuations': [2, 4, 21, 22, 42, 50, 54, 57, 59], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 4, 'gap': 5, 'max_green': 16, 'actuations': [5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 18, 23, 25, 33, 34, 35, 36, 39, 45, 46, 47, 48, 51, 53, 54, 55, 57, 59], 'conflict_call': 29}, ['gap-out', 29]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 4, 'gap': 4, 'max_green': 22, 'actuations': [0, 6, 7, 15, 16, 31, 35, 38, 42], 'conflict_call': None}, ['rest', 4]), ({'min_green': 4, 'gap': 5, 'max_green': 19, 'actuations': [4, 5, 8, 14, 18, 21, 22, 23, 29, 32, 35, 37, 41, 43, 44, 45, 48, 56, 59], 'conflict_call': 22}, ['gap-out', 22]), ({'min_green': 5, 'gap': 4, 'max_green': 23, 'actuations': [9, 13, 14, 15, 26, 27, 31, 32, 37, 39, 45, 47, 48, 49, 50, 54, 55], 'conflict_call': 8}, ['gap-out', 8])], [({'min_green': 4, 'gap': 3, 'max_green': 27, 'actuations': [14, 0, 50, 31, 17, 52, 19, 58, 40, 28, 59, 7, 24, 12, 29, 5, 57, 18, 51, 4, 34, 32, 47, 35, 41, 54, 23, 9, 44, 36, 21, 22, 45], 'conflict_call': 27}, ['gap-out', 27]), ({'min_green': 5, 'gap': 5, 'max_green': 34, 'actuations': [0, 2, 7, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26, 27, 32, 33, 34, 35, 36, 37, 39, 42, 45, 46, 51, 53, 54, 55, 56, 58, 59], 'conflict_call': 16}, ['max-out', 50]), ({'min_green': 7, 'gap': 3, 'max_green': 43, 'actuations': [4, 9, 16, 26, 35, 36, 39, 44, 51], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 3, 'max_green': 27, 'actuations': [4, 7, 13, 26, 27, 28, 34, 37, 44, 45, 48, 54, 58], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 5, 'gap': 3, 'max_green': 20, 'actuations': [1, 4, 7, 10, 13], 'conflict_call': 2}, ['gap-out', 16]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 10, 'gap': 3, 'max_green': 36, 'actuations': [7, 17, 20, 30, 54, 59], 'conflict_call': 31}, ['gap-out', 31])], [({'min_green': 7, 'gap': 2, 'max_green': 29, 'actuations': [1, 3, 18, 19, 27, 31, 41, 45, 47, 54], 'conflict_call': -2}, ['gap-out', 7]), ({'min_green': 8, 'gap': 3, 'max_green': 36, 'actuations': [5, 9, 19, 21, 40, 41, 45, 48, 53, 54], 'conflict_call': None}, ['rest', 8]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 7, 'gap': 4, 'max_green': 27, 'actuations': [0, 3, 16, 20, 40, 41, 44], 'conflict_call': 26}, ['gap-out', 26]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 9, 'gap': 2, 'max_green': 15, 'actuations': [0, 1, 3, 15, 16, 21, 23, 24, 25, 28, 31, 34, 42, 49, 50, 53, 56, 58], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 10, 'gap': 4, 'max_green': 27, 'actuations': [34, 19, 18, 33, 27, 55, 13, 32, 10, 49, 41, 46, 26, 16, 37, 7, 31, 29, 48, 51, 2, 14, 21, 52, 35, 20, 38, 15, 30, 54, 44, 40], 'conflict_call': 25}, ['gap-out', 25])], [({'min_green': 6, 'gap': 2, 'max_green': 42, 'actuations': [1, 5, 7, 8, 9, 11, 13, 14, 16, 37, 38, 39, 40, 44, 47, 48, 49, 50, 52, 56, 57], 'conflict_call': 9}, ['gap-out', 18]), ({'min_green': 6, 'gap': 4, 'max_green': 37, 'actuations': [1, 2, 5, 6, 11, 14, 16, 17, 22, 23, 25, 27, 33, 36, 37, 42, 43, 47, 48, 49, 50, 56, 57, 58], 'conflict_call': 18}, ['gap-out', 18]), ({'min_green': 8, 'gap': 4, 'max_green': 19, 'actuations': [1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 16, 17, 20, 25, 30, 32, 33, 34, 35, 41, 42, 47, 48, 49, 51, 52, 53, 55, 56], 'conflict_call': 19}, ['gap-out', 24]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 6, 'gap': 3, 'max_green': 36, 'actuations': [0, 1, 4, 6, 7, 9, 11, 12, 13, 17, 19, 21, 23, 24, 25, 26, 29, 30, 35, 36, 38, 40, 41, 43, 44, 45, 46, 47, 50, 52, 53, 57, 58], 'conflict_call': 17}, ['gap-out', 17]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 8, 'gap': 2, 'max_green': 22, 'actuations': [13, 43, 30, 47, 53, 33, 59, 49, 35, 26, 55], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12])]]\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":"f4e661cf1032ff1b426dc1b04cf10fc84c416bb8e3dbd73a37d9fe0428d67c40","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    m, p, M = x['min_green'], x['gap'], x['max_green']\n    exp = 0\n    for a in sorted(x['actuations']):\n        if a > exp and a > m:\n            break\n        exp = max(exp, a + p)\n    gap_end = max(m, exp)\n    tc = x['conflict_call']\n    if tc is None:\n        return ['rest', gap_end]\n    tc = max(tc, 0)\n    max_end = tc + M\n    if gap_end <= max_end:\n        return ['gap-out', gap_end]\n    return ['max-out', max_end]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'min_green': 10, 'gap': 5, 'max_green': 32, 'actuations': [2, 3, 16, 24, 25, 29, 40, 41, 42, 46, 53, 56, 58], 'conflict_call': 0}, ['gap-out', 10]), ({'min_green': 6, 'gap': 2, 'max_green': 38, 'actuations': [2, 5, 6, 7, 10, 12, 13, 16, 18, 19, 25, 26, 30, 33, 35, 40, 43, 48, 50], 'conflict_call': 11}, ['gap-out', 11]), ({'min_green': 4, 'gap': 2, 'max_green': 42, 'actuations': [39, 51, 53], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 9, 'gap': 4, 'max_green': 42, 'actuations': [4, 7, 8, 12, 16, 17, 18, 20, 24, 25, 26, 28, 32, 33, 34, 35, 38, 40, 41, 45, 46, 48, 49, 50, 53, 54, 56, 57, 59], 'conflict_call': 27}, ['gap-out', 63]), ({'min_green': 10, 'gap': 2, 'max_green': 23, 'actuations': [30, 24, 8, 40, 7, 3, 26, 39, 54, 36, 53, 49, 16, 37, 17, 15, 18, 47, 25, 57, 11, 34, 28, 58, 38, 10, 51, 1, 4], 'conflict_call': 5}, ['gap-out', 13]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 6, 'gap': 2, 'max_green': 15, 'actuations': [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38], 'conflict_call': -3}, ['max-out', 15]), ({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3])], [({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 4, 'gap': 2, 'max_green': 17, 'actuations': [2, 4, 21, 22, 42, 50, 54, 57, 59], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 4, 'gap': 5, 'max_green': 16, 'actuations': [5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 18, 23, 25, 33, 34, 35, 36, 39, 45, 46, 47, 48, 51, 53, 54, 55, 57, 59], 'conflict_call': 29}, ['gap-out', 29]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 4, 'gap': 4, 'max_green': 22, 'actuations': [0, 6, 7, 15, 16, 31, 35, 38, 42], 'conflict_call': None}, ['rest', 4]), ({'min_green': 4, 'gap': 5, 'max_green': 19, 'actuations': [4, 5, 8, 14, 18, 21, 22, 23, 29, 32, 35, 37, 41, 43, 44, 45, 48, 56, 59], 'conflict_call': 22}, ['gap-out', 22]), ({'min_green': 5, 'gap': 4, 'max_green': 23, 'actuations': [9, 13, 14, 15, 26, 27, 31, 32, 37, 39, 45, 47, 48, 49, 50, 54, 55], 'conflict_call': 8}, ['gap-out', 8])], [({'min_green': 4, 'gap': 3, 'max_green': 27, 'actuations': [14, 0, 50, 31, 17, 52, 19, 58, 40, 28, 59, 7, 24, 12, 29, 5, 57, 18, 51, 4, 34, 32, 47, 35, 41, 54, 23, 9, 44, 36, 21, 22, 45], 'conflict_call': 27}, ['gap-out', 27]), ({'min_green': 5, 'gap': 5, 'max_green': 34, 'actuations': [0, 2, 7, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26, 27, 32, 33, 34, 35, 36, 37, 39, 42, 45, 46, 51, 53, 54, 55, 56, 58, 59], 'conflict_call': 16}, ['max-out', 50]), ({'min_green': 7, 'gap': 3, 'max_green': 43, 'actuations': [4, 9, 16, 26, 35, 36, 39, 44, 51], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 3, 'max_green': 27, 'actuations': [4, 7, 13, 26, 27, 28, 34, 37, 44, 45, 48, 54, 58], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 5, 'gap': 3, 'max_green': 20, 'actuations': [1, 4, 7, 10, 13], 'conflict_call': 2}, ['gap-out', 16]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 10, 'gap': 3, 'max_green': 36, 'actuations': [7, 17, 20, 30, 54, 59], 'conflict_call': 31}, ['gap-out', 31])], [({'min_green': 7, 'gap': 2, 'max_green': 29, 'actuations': [1, 3, 18, 19, 27, 31, 41, 45, 47, 54], 'conflict_call': -2}, ['gap-out', 7]), ({'min_green': 8, 'gap': 3, 'max_green': 36, 'actuations': [5, 9, 19, 21, 40, 41, 45, 48, 53, 54], 'conflict_call': None}, ['rest', 8]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 7, 'gap': 4, 'max_green': 27, 'actuations': [0, 3, 16, 20, 40, 41, 44], 'conflict_call': 26}, ['gap-out', 26]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 9, 'gap': 2, 'max_green': 15, 'actuations': [0, 1, 3, 15, 16, 21, 23, 24, 25, 28, 31, 34, 42, 49, 50, 53, 56, 58], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 10, 'gap': 4, 'max_green': 27, 'actuations': [34, 19, 18, 33, 27, 55, 13, 32, 10, 49, 41, 46, 26, 16, 37, 7, 31, 29, 48, 51, 2, 14, 21, 52, 35, 20, 38, 15, 30, 54, 44, 40], 'conflict_call': 25}, ['gap-out', 25])], [({'min_green': 6, 'gap': 2, 'max_green': 42, 'actuations': [1, 5, 7, 8, 9, 11, 13, 14, 16, 37, 38, 39, 40, 44, 47, 48, 49, 50, 52, 56, 57], 'conflict_call': 9}, ['gap-out', 18]), ({'min_green': 6, 'gap': 4, 'max_green': 37, 'actuations': [1, 2, 5, 6, 11, 14, 16, 17, 22, 23, 25, 27, 33, 36, 37, 42, 43, 47, 48, 49, 50, 56, 57, 58], 'conflict_call': 18}, ['gap-out', 18]), ({'min_green': 8, 'gap': 4, 'max_green': 19, 'actuations': [1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 16, 17, 20, 25, 30, 32, 33, 34, 35, 41, 42, 47, 48, 49, 51, 52, 53, 55, 56], 'conflict_call': 19}, ['gap-out', 24]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 6, 'gap': 3, 'max_green': 36, 'actuations': [0, 1, 4, 6, 7, 9, 11, 12, 13, 17, 19, 21, 23, 24, 25, 26, 29, 30, 35, 36, 38, 40, 41, 43, 44, 45, 46, 47, 50, 52, 53, 57, 58], 'conflict_call': 17}, ['gap-out', 17]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 8, 'gap': 2, 'max_green': 22, 'actuations': [13, 43, 30, 47, 53, 33, 59, 49, 35, 26, 55], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12])]]\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":"4e6e3d5d0fd4ec7ad8bd0a0f316f2fed9a032b101c09efaefec2809111b2e363","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    m, p, M = x['min_green'], x['gap'], x['max_green']\n    exp = 0\n    for a in sorted(x['actuations']):\n        if a > exp and a > m:\n            break\n        exp = max(exp, a + p)\n    gap_end = max(m, exp)\n    tc = x['conflict_call']\n    if tc is None:\n        return ['rest', gap_end]\n    tc = max(tc, 0)\n    max_end = tc + M\n    if gap_end <= max_end:\n        return ['gap-out', max(gap_end, tc)]\n    return ['max-out', max_end]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'min_green': 10, 'gap': 5, 'max_green': 32, 'actuations': [2, 3, 16, 24, 25, 29, 40, 41, 42, 46, 53, 56, 58], 'conflict_call': 0}, ['gap-out', 10]), ({'min_green': 6, 'gap': 2, 'max_green': 38, 'actuations': [2, 5, 6, 7, 10, 12, 13, 16, 18, 19, 25, 26, 30, 33, 35, 40, 43, 48, 50], 'conflict_call': 11}, ['gap-out', 11]), ({'min_green': 4, 'gap': 2, 'max_green': 42, 'actuations': [39, 51, 53], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 9, 'gap': 4, 'max_green': 42, 'actuations': [4, 7, 8, 12, 16, 17, 18, 20, 24, 25, 26, 28, 32, 33, 34, 35, 38, 40, 41, 45, 46, 48, 49, 50, 53, 54, 56, 57, 59], 'conflict_call': 27}, ['gap-out', 63]), ({'min_green': 10, 'gap': 2, 'max_green': 23, 'actuations': [30, 24, 8, 40, 7, 3, 26, 39, 54, 36, 53, 49, 16, 37, 17, 15, 18, 47, 25, 57, 11, 34, 28, 58, 38, 10, 51, 1, 4], 'conflict_call': 5}, ['gap-out', 13]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 6, 'gap': 2, 'max_green': 15, 'actuations': [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38], 'conflict_call': -3}, ['max-out', 15]), ({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3])], [({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 4, 'gap': 2, 'max_green': 17, 'actuations': [2, 4, 21, 22, 42, 50, 54, 57, 59], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 4, 'gap': 5, 'max_green': 16, 'actuations': [5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 18, 23, 25, 33, 34, 35, 36, 39, 45, 46, 47, 48, 51, 53, 54, 55, 57, 59], 'conflict_call': 29}, ['gap-out', 29]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 4, 'gap': 4, 'max_green': 22, 'actuations': [0, 6, 7, 15, 16, 31, 35, 38, 42], 'conflict_call': None}, ['rest', 4]), ({'min_green': 4, 'gap': 5, 'max_green': 19, 'actuations': [4, 5, 8, 14, 18, 21, 22, 23, 29, 32, 35, 37, 41, 43, 44, 45, 48, 56, 59], 'conflict_call': 22}, ['gap-out', 22]), ({'min_green': 5, 'gap': 4, 'max_green': 23, 'actuations': [9, 13, 14, 15, 26, 27, 31, 32, 37, 39, 45, 47, 48, 49, 50, 54, 55], 'conflict_call': 8}, ['gap-out', 8])], [({'min_green': 4, 'gap': 3, 'max_green': 27, 'actuations': [14, 0, 50, 31, 17, 52, 19, 58, 40, 28, 59, 7, 24, 12, 29, 5, 57, 18, 51, 4, 34, 32, 47, 35, 41, 54, 23, 9, 44, 36, 21, 22, 45], 'conflict_call': 27}, ['gap-out', 27]), ({'min_green': 5, 'gap': 5, 'max_green': 34, 'actuations': [0, 2, 7, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26, 27, 32, 33, 34, 35, 36, 37, 39, 42, 45, 46, 51, 53, 54, 55, 56, 58, 59], 'conflict_call': 16}, ['max-out', 50]), ({'min_green': 7, 'gap': 3, 'max_green': 43, 'actuations': [4, 9, 16, 26, 35, 36, 39, 44, 51], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 3, 'max_green': 27, 'actuations': [4, 7, 13, 26, 27, 28, 34, 37, 44, 45, 48, 54, 58], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 5, 'gap': 3, 'max_green': 20, 'actuations': [1, 4, 7, 10, 13], 'conflict_call': 2}, ['gap-out', 16]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 10, 'gap': 3, 'max_green': 36, 'actuations': [7, 17, 20, 30, 54, 59], 'conflict_call': 31}, ['gap-out', 31])], [({'min_green': 7, 'gap': 2, 'max_green': 29, 'actuations': [1, 3, 18, 19, 27, 31, 41, 45, 47, 54], 'conflict_call': -2}, ['gap-out', 7]), ({'min_green': 8, 'gap': 3, 'max_green': 36, 'actuations': [5, 9, 19, 21, 40, 41, 45, 48, 53, 54], 'conflict_call': None}, ['rest', 8]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 7, 'gap': 4, 'max_green': 27, 'actuations': [0, 3, 16, 20, 40, 41, 44], 'conflict_call': 26}, ['gap-out', 26]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 9, 'gap': 2, 'max_green': 15, 'actuations': [0, 1, 3, 15, 16, 21, 23, 24, 25, 28, 31, 34, 42, 49, 50, 53, 56, 58], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 10, 'gap': 4, 'max_green': 27, 'actuations': [34, 19, 18, 33, 27, 55, 13, 32, 10, 49, 41, 46, 26, 16, 37, 7, 31, 29, 48, 51, 2, 14, 21, 52, 35, 20, 38, 15, 30, 54, 44, 40], 'conflict_call': 25}, ['gap-out', 25])], [({'min_green': 6, 'gap': 2, 'max_green': 42, 'actuations': [1, 5, 7, 8, 9, 11, 13, 14, 16, 37, 38, 39, 40, 44, 47, 48, 49, 50, 52, 56, 57], 'conflict_call': 9}, ['gap-out', 18]), ({'min_green': 6, 'gap': 4, 'max_green': 37, 'actuations': [1, 2, 5, 6, 11, 14, 16, 17, 22, 23, 25, 27, 33, 36, 37, 42, 43, 47, 48, 49, 50, 56, 57, 58], 'conflict_call': 18}, ['gap-out', 18]), ({'min_green': 8, 'gap': 4, 'max_green': 19, 'actuations': [1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 16, 17, 20, 25, 30, 32, 33, 34, 35, 41, 42, 47, 48, 49, 51, 52, 53, 55, 56], 'conflict_call': 19}, ['gap-out', 24]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 6, 'gap': 3, 'max_green': 36, 'actuations': [0, 1, 4, 6, 7, 9, 11, 12, 13, 17, 19, 21, 23, 24, 25, 26, 29, 30, 35, 36, 38, 40, 41, 43, 44, 45, 46, 47, 50, 52, 53, 57, 58], 'conflict_call': 17}, ['gap-out', 17]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 8, 'gap': 2, 'max_green': 22, 'actuations': [13, 43, 30, 47, 53, 33, 59, 49, 35, 26, 55], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12])]]\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-gap-max-out-rest-until-call","generated_at":"2026-09-29T14:47:57.887084+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 resting before the call rule so that the step reads `max(gap_end, tc)`.","root_cause":"The termination time ignores that the phase rests in green until a conflicting call exists.","sha256":"e3b7268f65793d4038fa2adcbeaa43771c84c8ba8ecf0e0331c76af282acb384","title":"Actuated phase gap-out and max-out: a phase that gapped out before the call ends before the call arrives · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.578,"exit_code":1,"observations":[{"actual":["gap-out",10],"check":"timing oracle 0","expected":["gap-out",10],"passed":true},{"actual":["gap-out",9],"check":"timing oracle 1","expected":["gap-out",11],"passed":false},{"actual":["gap-out",4],"check":"timing oracle 2","expected":["gap-out",31],"passed":false},{"actual":["gap-out",63],"check":"timing oracle 3","expected":["gap-out",63],"passed":true},{"actual":["gap-out",13],"check":"timing oracle 4","expected":["gap-out",13],"passed":true},{"actual":["gap-out",9],"check":"timing oracle 5","expected":["gap-out",20],"passed":false},{"actual":["max-out",15],"check":"timing oracle 6","expected":["max-out",15],"passed":true},{"actual":["max-out",3],"check":"timing oracle 7","expected":["max-out",3],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [\"gap-out\", 10], \"expected\": [\"gap-out\", 10], \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": [\"gap-out\", 9], \"expected\": [\"gap-out\", 11], \"passed\": false}, {\"check\": \"timing oracle 2\", \"actual\": [\"gap-out\", 4], \"expected\": [\"gap-out\", 31], \"passed\": false}, {\"check\": \"timing oracle 3\", \"actual\": [\"gap-out\", 63], \"expected\": [\"gap-out\", 63], \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": [\"gap-out\", 13], \"expected\": [\"gap-out\", 13], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [\"gap-out\", 9], \"expected\": [\"gap-out\", 20], \"passed\": false}, {\"check\": \"timing oracle 6\", \"actual\": [\"max-out\", 15], \"expected\": [\"max-out\", 15], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [\"max-out\", 3], \"expected\": [\"max-out\", 3], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.465,"exit_code":1,"observations":[{"actual":["gap-out",10],"check":"timing oracle 0","expected":["gap-out",10],"passed":true},{"actual":["gap-out",9],"check":"timing oracle 1","expected":["gap-out",11],"passed":false},{"actual":["gap-out",4],"check":"timing oracle 2","expected":["gap-out",31],"passed":false},{"actual":["gap-out",63],"check":"timing oracle 3","expected":["gap-out",63],"passed":true},{"actual":["gap-out",13],"check":"timing oracle 4","expected":["gap-out",13],"passed":true},{"actual":["gap-out",9],"check":"timing oracle 5","expected":["gap-out",20],"passed":false},{"actual":["max-out",15],"check":"timing oracle 6","expected":["max-out",15],"passed":true},{"actual":["max-out",3],"check":"timing oracle 7","expected":["max-out",3],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [\"gap-out\", 10], \"expected\": [\"gap-out\", 10], \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": [\"gap-out\", 9], \"expected\": [\"gap-out\", 11], \"passed\": false}, {\"check\": \"timing oracle 2\", \"actual\": [\"gap-out\", 4], \"expected\": [\"gap-out\", 31], \"passed\": false}, {\"check\": \"timing oracle 3\", \"actual\": [\"gap-out\", 63], \"expected\": [\"gap-out\", 63], \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": [\"gap-out\", 13], \"expected\": [\"gap-out\", 13], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [\"gap-out\", 9], \"expected\": [\"gap-out\", 20], \"passed\": false}, {\"check\": \"timing oracle 6\", \"actual\": [\"max-out\", 15], \"expected\": [\"max-out\", 15], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [\"max-out\", 3], \"expected\": [\"max-out\", 3], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.101,"exit_code":0,"observations":[{"actual":["gap-out",10],"check":"timing oracle 0","expected":["gap-out",10],"passed":true},{"actual":["gap-out",11],"check":"timing oracle 1","expected":["gap-out",11],"passed":true},{"actual":["gap-out",31],"check":"timing oracle 2","expected":["gap-out",31],"passed":true},{"actual":["gap-out",63],"check":"timing oracle 3","expected":["gap-out",63],"passed":true},{"actual":["gap-out",13],"check":"timing oracle 4","expected":["gap-out",13],"passed":true},{"actual":["gap-out",20],"check":"timing oracle 5","expected":["gap-out",20],"passed":true},{"actual":["max-out",15],"check":"timing oracle 6","expected":["max-out",15],"passed":true},{"actual":["max-out",3],"check":"timing oracle 7","expected":["max-out",3],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [\"gap-out\", 10], \"expected\": [\"gap-out\", 10], \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": [\"gap-out\", 11], \"expected\": [\"gap-out\", 11], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [\"gap-out\", 31], \"expected\": [\"gap-out\", 31], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [\"gap-out\", 63], \"expected\": [\"gap-out\", 63], \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": [\"gap-out\", 13], \"expected\": [\"gap-out\", 13], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [\"gap-out\", 20], \"expected\": [\"gap-out\", 20], \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": [\"max-out\", 15], \"expected\": [\"max-out\", 15], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [\"max-out\", 3], \"expected\": [\"max-out\", 3], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}