{"abstract":"Transit signal priority decision returns a wrong result when green is extended only up to the arrival second.","category":"Traffic signal timing plans","checks":8,"contract":"Input {cycle, green_start, green_end (exclusive), max_ext, max_early, arrival (seconds, reduced modulo cycle), last_granted (cycle index or null), cycle_index, lockout}. A request within lockout cycles of the last grant (difference <= lockout) returns ['locked', 0]. Arrival in green needs nothing. If the arrival is less than max_ext seconds after green end (cyclically) green is extended through the arrival second: ['extend', d+1]. Otherwise green starts early by min(max_early, seconds until next green start).","evaluation_group":"w2-traffic_signal_timing_plans-transit-priority","failed_approach":"Always granting the maximum extension over-serves the priority phase.","family":"w2-traffic_signal_timing_plans-transit-priority-extension-amount","id":"FA-68216","implementations":{"attempt":{"sha256":"4c8fd593b74d15545fbcef662213ad1a0af7a40b6aaf318f64b1e59a8c66fc28","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    C = x['cycle']\n    a = x['arrival'] % C\n    last = x['last_granted']\n    if last is not None and x['cycle_index'] - last <= x['lockout']:\n        return ['locked', 0]\n    gs, ge = x['green_start'], x['green_end']\n    if gs <= a < ge:\n        return ['none', 0]\n    d = (a - ge) % C\n    if d < x['max_ext']:\n        return ['extend', x['max_ext']]\n    wait = (gs - a) % C\n    return ['early', min(x['max_early'], wait)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 80, 'green_start': 38, 'green_end': 70, 'max_ext': 13, 'max_early': 9, 'arrival': 230, 'last_granted': None, 'cycle_index': 17, 'lockout': 1}, ['extend', 1]), ({'cycle': 120, 'green_start': 14, 'green_end': 36, 'max_ext': 11, 'max_early': 6, 'arrival': 251, 'last_granted': None, 'cycle_index': 11, 'lockout': 2}, ['early', 3]), ({'cycle': 100, 'green_start': 27, 'green_end': 52, 'max_ext': 15, 'max_early': 15, 'arrival': 108, 'last_granted': None, 'cycle_index': 0, 'lockout': 2}, ['early', 15]), ({'cycle': 80, 'green_start': 16, 'green_end': 35, 'max_ext': 15, 'max_early': 7, 'arrival': 162, 'last_granted': 15, 'cycle_index': 9, 'lockout': 1}, ['locked', 0]), ({'cycle': 90, 'green_start': 13, 'green_end': 43, 'max_ext': 20, 'max_early': 7, 'arrival': 237, 'last_granted': 0, 'cycle_index': 22, 'lockout': 3}, ['extend', 15])], [({'cycle': 80, 'green_start': 1, 'green_end': 31, 'max_ext': 6, 'max_early': 17, 'arrival': 14, 'last_granted': 10, 'cycle_index': 0, 'lockout': 1}, ['locked', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 120, 'green_start': 17, 'green_end': 63, 'max_ext': 7, 'max_early': 19, 'arrival': 149, 'last_granted': 18, 'cycle_index': 16, 'lockout': 1}, ['locked', 0]), ({'cycle': 140, 'green_start': 24, 'green_end': 42, 'max_ext': 18, 'max_early': 17, 'arrival': 334, 'last_granted': 8, 'cycle_index': 19, 'lockout': 2}, ['extend', 13]), ({'cycle': 90, 'green_start': 34, 'green_end': 71, 'max_ext': 14, 'max_early': 17, 'arrival': 26, 'last_granted': 19, 'cycle_index': 4, 'lockout': 1}, ['locked', 0]), ({'cycle': 130, 'green_start': 50, 'green_end': 83, 'max_ext': 16, 'max_early': 7, 'arrival': 85, 'last_granted': None, 'cycle_index': 18, 'lockout': 2}, ['extend', 3]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0])], [({'cycle': 140, 'green_start': 21, 'green_end': 71, 'max_ext': 11, 'max_early': 13, 'arrival': 64, 'last_granted': 16, 'cycle_index': 19, 'lockout': 2}, ['none', 0]), ({'cycle': 90, 'green_start': 20, 'green_end': 47, 'max_ext': 18, 'max_early': 18, 'arrival': 149, 'last_granted': 4, 'cycle_index': 12, 'lockout': 1}, ['extend', 13]), ({'cycle': 140, 'green_start': 43, 'green_end': 68, 'max_ext': 13, 'max_early': 9, 'arrival': 80, 'last_granted': None, 'cycle_index': 16, 'lockout': 2}, ['extend', 13]), ({'cycle': 110, 'green_start': 41, 'green_end': 72, 'max_ext': 6, 'max_early': 7, 'arrival': 90, 'last_granted': 19, 'cycle_index': 11, 'lockout': 2}, ['locked', 0]), ({'cycle': 90, 'green_start': 17, 'green_end': 57, 'max_ext': 19, 'max_early': 17, 'arrival': 51, 'last_granted': None, 'cycle_index': 8, 'lockout': 1}, ['none', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0])], [({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 110, 'green_start': 51, 'green_end': 87, 'max_ext': 19, 'max_early': 17, 'arrival': 99, 'last_granted': None, 'cycle_index': 18, 'lockout': 3}, ['extend', 13]), ({'cycle': 100, 'green_start': 11, 'green_end': 43, 'max_ext': 14, 'max_early': 11, 'arrival': 226, 'last_granted': None, 'cycle_index': 4, 'lockout': 3}, ['none', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 80, 'green_start': 28, 'green_end': 66, 'max_ext': 10, 'max_early': 8, 'arrival': 195, 'last_granted': 17, 'cycle_index': 2, 'lockout': 2}, ['locked', 0]), ({'cycle': 130, 'green_start': 23, 'green_end': 63, 'max_ext': 18, 'max_early': 10, 'arrival': 202, 'last_granted': 11, 'cycle_index': 20, 'lockout': 1}, ['extend', 10]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 110, 'green_start': 45, 'green_end': 69, 'max_ext': 14, 'max_early': 15, 'arrival': 27, 'last_granted': None, 'cycle_index': 7, 'lockout': 2}, ['early', 15])], [({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 35, 'green_end': 69, 'max_ext': 17, 'max_early': 19, 'arrival': 249, 'last_granted': 16, 'cycle_index': 11, 'lockout': 2}, ['locked', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 110, 'green_start': 39, 'green_end': 82, 'max_ext': 9, 'max_early': 5, 'arrival': 160, 'last_granted': 7, 'cycle_index': 18, 'lockout': 2}, ['none', 0]), ({'cycle': 110, 'green_start': 9, 'green_end': 34, 'max_ext': 20, 'max_early': 9, 'arrival': 45, 'last_granted': None, 'cycle_index': 16, 'lockout': 3}, ['extend', 12]), ({'cycle': 80, 'green_start': 35, 'green_end': 57, 'max_ext': 16, 'max_early': 11, 'arrival': 219, 'last_granted': 4, 'cycle_index': 8, 'lockout': 1}, ['extend', 3]), ({'cycle': 100, 'green_start': 7, 'green_end': 48, 'max_ext': 16, 'max_early': 14, 'arrival': 101, 'last_granted': 2, 'cycle_index': 5, 'lockout': 3}, ['locked', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 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":"ea0afef8ca3cb525b3203b487c2aa2b369ae9e5dfc26f196b66b583914b8f7a2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    C = x['cycle']\n    a = x['arrival'] % C\n    last = x['last_granted']\n    if last is not None and x['cycle_index'] - last <= x['lockout']:\n        return ['locked', 0]\n    gs, ge = x['green_start'], x['green_end']\n    if gs <= a < ge:\n        return ['none', 0]\n    d = (a - ge) % C\n    if d < x['max_ext']:\n        return ['extend', d]\n    wait = (gs - a) % C\n    return ['early', min(x['max_early'], wait)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 80, 'green_start': 38, 'green_end': 70, 'max_ext': 13, 'max_early': 9, 'arrival': 230, 'last_granted': None, 'cycle_index': 17, 'lockout': 1}, ['extend', 1]), ({'cycle': 120, 'green_start': 14, 'green_end': 36, 'max_ext': 11, 'max_early': 6, 'arrival': 251, 'last_granted': None, 'cycle_index': 11, 'lockout': 2}, ['early', 3]), ({'cycle': 100, 'green_start': 27, 'green_end': 52, 'max_ext': 15, 'max_early': 15, 'arrival': 108, 'last_granted': None, 'cycle_index': 0, 'lockout': 2}, ['early', 15]), ({'cycle': 80, 'green_start': 16, 'green_end': 35, 'max_ext': 15, 'max_early': 7, 'arrival': 162, 'last_granted': 15, 'cycle_index': 9, 'lockout': 1}, ['locked', 0]), ({'cycle': 90, 'green_start': 13, 'green_end': 43, 'max_ext': 20, 'max_early': 7, 'arrival': 237, 'last_granted': 0, 'cycle_index': 22, 'lockout': 3}, ['extend', 15])], [({'cycle': 80, 'green_start': 1, 'green_end': 31, 'max_ext': 6, 'max_early': 17, 'arrival': 14, 'last_granted': 10, 'cycle_index': 0, 'lockout': 1}, ['locked', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 120, 'green_start': 17, 'green_end': 63, 'max_ext': 7, 'max_early': 19, 'arrival': 149, 'last_granted': 18, 'cycle_index': 16, 'lockout': 1}, ['locked', 0]), ({'cycle': 140, 'green_start': 24, 'green_end': 42, 'max_ext': 18, 'max_early': 17, 'arrival': 334, 'last_granted': 8, 'cycle_index': 19, 'lockout': 2}, ['extend', 13]), ({'cycle': 90, 'green_start': 34, 'green_end': 71, 'max_ext': 14, 'max_early': 17, 'arrival': 26, 'last_granted': 19, 'cycle_index': 4, 'lockout': 1}, ['locked', 0]), ({'cycle': 130, 'green_start': 50, 'green_end': 83, 'max_ext': 16, 'max_early': 7, 'arrival': 85, 'last_granted': None, 'cycle_index': 18, 'lockout': 2}, ['extend', 3]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0])], [({'cycle': 140, 'green_start': 21, 'green_end': 71, 'max_ext': 11, 'max_early': 13, 'arrival': 64, 'last_granted': 16, 'cycle_index': 19, 'lockout': 2}, ['none', 0]), ({'cycle': 90, 'green_start': 20, 'green_end': 47, 'max_ext': 18, 'max_early': 18, 'arrival': 149, 'last_granted': 4, 'cycle_index': 12, 'lockout': 1}, ['extend', 13]), ({'cycle': 140, 'green_start': 43, 'green_end': 68, 'max_ext': 13, 'max_early': 9, 'arrival': 80, 'last_granted': None, 'cycle_index': 16, 'lockout': 2}, ['extend', 13]), ({'cycle': 110, 'green_start': 41, 'green_end': 72, 'max_ext': 6, 'max_early': 7, 'arrival': 90, 'last_granted': 19, 'cycle_index': 11, 'lockout': 2}, ['locked', 0]), ({'cycle': 90, 'green_start': 17, 'green_end': 57, 'max_ext': 19, 'max_early': 17, 'arrival': 51, 'last_granted': None, 'cycle_index': 8, 'lockout': 1}, ['none', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0])], [({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 110, 'green_start': 51, 'green_end': 87, 'max_ext': 19, 'max_early': 17, 'arrival': 99, 'last_granted': None, 'cycle_index': 18, 'lockout': 3}, ['extend', 13]), ({'cycle': 100, 'green_start': 11, 'green_end': 43, 'max_ext': 14, 'max_early': 11, 'arrival': 226, 'last_granted': None, 'cycle_index': 4, 'lockout': 3}, ['none', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 80, 'green_start': 28, 'green_end': 66, 'max_ext': 10, 'max_early': 8, 'arrival': 195, 'last_granted': 17, 'cycle_index': 2, 'lockout': 2}, ['locked', 0]), ({'cycle': 130, 'green_start': 23, 'green_end': 63, 'max_ext': 18, 'max_early': 10, 'arrival': 202, 'last_granted': 11, 'cycle_index': 20, 'lockout': 1}, ['extend', 10]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 110, 'green_start': 45, 'green_end': 69, 'max_ext': 14, 'max_early': 15, 'arrival': 27, 'last_granted': None, 'cycle_index': 7, 'lockout': 2}, ['early', 15])], [({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 35, 'green_end': 69, 'max_ext': 17, 'max_early': 19, 'arrival': 249, 'last_granted': 16, 'cycle_index': 11, 'lockout': 2}, ['locked', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 110, 'green_start': 39, 'green_end': 82, 'max_ext': 9, 'max_early': 5, 'arrival': 160, 'last_granted': 7, 'cycle_index': 18, 'lockout': 2}, ['none', 0]), ({'cycle': 110, 'green_start': 9, 'green_end': 34, 'max_ext': 20, 'max_early': 9, 'arrival': 45, 'last_granted': None, 'cycle_index': 16, 'lockout': 3}, ['extend', 12]), ({'cycle': 80, 'green_start': 35, 'green_end': 57, 'max_ext': 16, 'max_early': 11, 'arrival': 219, 'last_granted': 4, 'cycle_index': 8, 'lockout': 1}, ['extend', 3]), ({'cycle': 100, 'green_start': 7, 'green_end': 48, 'max_ext': 16, 'max_early': 14, 'arrival': 101, 'last_granted': 2, 'cycle_index': 5, 'lockout': 3}, ['locked', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 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":"687226525aa03d78963e9f4cef082bab33b63e44a9c38f0ae07b440a66de247f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    C = x['cycle']\n    a = x['arrival'] % C\n    last = x['last_granted']\n    if last is not None and x['cycle_index'] - last <= x['lockout']:\n        return ['locked', 0]\n    gs, ge = x['green_start'], x['green_end']\n    if gs <= a < ge:\n        return ['none', 0]\n    d = (a - ge) % C\n    if d < x['max_ext']:\n        return ['extend', d + 1]\n    wait = (gs - a) % C\n    return ['early', min(x['max_early'], wait)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 80, 'green_start': 38, 'green_end': 70, 'max_ext': 13, 'max_early': 9, 'arrival': 230, 'last_granted': None, 'cycle_index': 17, 'lockout': 1}, ['extend', 1]), ({'cycle': 120, 'green_start': 14, 'green_end': 36, 'max_ext': 11, 'max_early': 6, 'arrival': 251, 'last_granted': None, 'cycle_index': 11, 'lockout': 2}, ['early', 3]), ({'cycle': 100, 'green_start': 27, 'green_end': 52, 'max_ext': 15, 'max_early': 15, 'arrival': 108, 'last_granted': None, 'cycle_index': 0, 'lockout': 2}, ['early', 15]), ({'cycle': 80, 'green_start': 16, 'green_end': 35, 'max_ext': 15, 'max_early': 7, 'arrival': 162, 'last_granted': 15, 'cycle_index': 9, 'lockout': 1}, ['locked', 0]), ({'cycle': 90, 'green_start': 13, 'green_end': 43, 'max_ext': 20, 'max_early': 7, 'arrival': 237, 'last_granted': 0, 'cycle_index': 22, 'lockout': 3}, ['extend', 15])], [({'cycle': 80, 'green_start': 1, 'green_end': 31, 'max_ext': 6, 'max_early': 17, 'arrival': 14, 'last_granted': 10, 'cycle_index': 0, 'lockout': 1}, ['locked', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 120, 'green_start': 17, 'green_end': 63, 'max_ext': 7, 'max_early': 19, 'arrival': 149, 'last_granted': 18, 'cycle_index': 16, 'lockout': 1}, ['locked', 0]), ({'cycle': 140, 'green_start': 24, 'green_end': 42, 'max_ext': 18, 'max_early': 17, 'arrival': 334, 'last_granted': 8, 'cycle_index': 19, 'lockout': 2}, ['extend', 13]), ({'cycle': 90, 'green_start': 34, 'green_end': 71, 'max_ext': 14, 'max_early': 17, 'arrival': 26, 'last_granted': 19, 'cycle_index': 4, 'lockout': 1}, ['locked', 0]), ({'cycle': 130, 'green_start': 50, 'green_end': 83, 'max_ext': 16, 'max_early': 7, 'arrival': 85, 'last_granted': None, 'cycle_index': 18, 'lockout': 2}, ['extend', 3]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0])], [({'cycle': 140, 'green_start': 21, 'green_end': 71, 'max_ext': 11, 'max_early': 13, 'arrival': 64, 'last_granted': 16, 'cycle_index': 19, 'lockout': 2}, ['none', 0]), ({'cycle': 90, 'green_start': 20, 'green_end': 47, 'max_ext': 18, 'max_early': 18, 'arrival': 149, 'last_granted': 4, 'cycle_index': 12, 'lockout': 1}, ['extend', 13]), ({'cycle': 140, 'green_start': 43, 'green_end': 68, 'max_ext': 13, 'max_early': 9, 'arrival': 80, 'last_granted': None, 'cycle_index': 16, 'lockout': 2}, ['extend', 13]), ({'cycle': 110, 'green_start': 41, 'green_end': 72, 'max_ext': 6, 'max_early': 7, 'arrival': 90, 'last_granted': 19, 'cycle_index': 11, 'lockout': 2}, ['locked', 0]), ({'cycle': 90, 'green_start': 17, 'green_end': 57, 'max_ext': 19, 'max_early': 17, 'arrival': 51, 'last_granted': None, 'cycle_index': 8, 'lockout': 1}, ['none', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0])], [({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 110, 'green_start': 51, 'green_end': 87, 'max_ext': 19, 'max_early': 17, 'arrival': 99, 'last_granted': None, 'cycle_index': 18, 'lockout': 3}, ['extend', 13]), ({'cycle': 100, 'green_start': 11, 'green_end': 43, 'max_ext': 14, 'max_early': 11, 'arrival': 226, 'last_granted': None, 'cycle_index': 4, 'lockout': 3}, ['none', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 80, 'green_start': 28, 'green_end': 66, 'max_ext': 10, 'max_early': 8, 'arrival': 195, 'last_granted': 17, 'cycle_index': 2, 'lockout': 2}, ['locked', 0]), ({'cycle': 130, 'green_start': 23, 'green_end': 63, 'max_ext': 18, 'max_early': 10, 'arrival': 202, 'last_granted': 11, 'cycle_index': 20, 'lockout': 1}, ['extend', 10]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 110, 'green_start': 45, 'green_end': 69, 'max_ext': 14, 'max_early': 15, 'arrival': 27, 'last_granted': None, 'cycle_index': 7, 'lockout': 2}, ['early', 15])], [({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 35, 'green_end': 69, 'max_ext': 17, 'max_early': 19, 'arrival': 249, 'last_granted': 16, 'cycle_index': 11, 'lockout': 2}, ['locked', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 110, 'green_start': 39, 'green_end': 82, 'max_ext': 9, 'max_early': 5, 'arrival': 160, 'last_granted': 7, 'cycle_index': 18, 'lockout': 2}, ['none', 0]), ({'cycle': 110, 'green_start': 9, 'green_end': 34, 'max_ext': 20, 'max_early': 9, 'arrival': 45, 'last_granted': None, 'cycle_index': 16, 'lockout': 3}, ['extend', 12]), ({'cycle': 80, 'green_start': 35, 'green_end': 57, 'max_ext': 16, 'max_early': 11, 'arrival': 219, 'last_granted': 4, 'cycle_index': 8, 'lockout': 1}, ['extend', 3]), ({'cycle': 100, 'green_start': 7, 'green_end': 48, 'max_ext': 16, 'max_early': 14, 'arrival': 101, 'last_granted': 2, 'cycle_index': 5, 'lockout': 3}, ['locked', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 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-transit-priority-extension-amount","generated_at":"2026-09-29T14:48:00.195421+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 extension amount rule so that the step reads `['extend', d + 1]`.","root_cause":"Extending by d ends green at the arrival second instead of through it.","sha256":"c503308ace9088839bc57165359bed41b7c22c87ae2a81af90de7933d6156d3f","title":"Transit signal priority decision: green is extended only up to the arrival second · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.975,"exit_code":1,"observations":[{"actual":["extend",12],"check":"timing oracle 0","expected":["extend",1],"passed":false},{"actual":["none",0],"check":"timing oracle 1","expected":["none",0],"passed":true},{"actual":["locked",0],"check":"timing oracle 2","expected":["locked",0],"passed":true},{"actual":["extend",13],"check":"timing oracle 3","expected":["extend",1],"passed":false},{"actual":["early",3],"check":"timing oracle 4","expected":["early",3],"passed":true},{"actual":["early",15],"check":"timing oracle 5","expected":["early",15],"passed":true},{"actual":["locked",0],"check":"timing oracle 6","expected":["locked",0],"passed":true},{"actual":["extend",20],"check":"timing oracle 7","expected":["extend",15],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [\"extend\", 12], \"expected\": [\"extend\", 1], \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": [\"none\", 0], \"expected\": [\"none\", 0], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [\"locked\", 0], \"expected\": [\"locked\", 0], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [\"extend\", 13], \"expected\": [\"extend\", 1], \"passed\": false}, {\"check\": \"timing oracle 4\", \"actual\": [\"early\", 3], \"expected\": [\"early\", 3], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [\"early\", 15], \"expected\": [\"early\", 15], \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": [\"locked\", 0], \"expected\": [\"locked\", 0], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [\"extend\", 20], \"expected\": [\"extend\", 15], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.62,"exit_code":1,"observations":[{"actual":["extend",0],"check":"timing oracle 0","expected":["extend",1],"passed":false},{"actual":["none",0],"check":"timing oracle 1","expected":["none",0],"passed":true},{"actual":["locked",0],"check":"timing oracle 2","expected":["locked",0],"passed":true},{"actual":["extend",0],"check":"timing oracle 3","expected":["extend",1],"passed":false},{"actual":["early",3],"check":"timing oracle 4","expected":["early",3],"passed":true},{"actual":["early",15],"check":"timing oracle 5","expected":["early",15],"passed":true},{"actual":["locked",0],"check":"timing oracle 6","expected":["locked",0],"passed":true},{"actual":["extend",14],"check":"timing oracle 7","expected":["extend",15],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [\"extend\", 0], \"expected\": [\"extend\", 1], \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": [\"none\", 0], \"expected\": [\"none\", 0], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [\"locked\", 0], \"expected\": [\"locked\", 0], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [\"extend\", 0], \"expected\": [\"extend\", 1], \"passed\": false}, {\"check\": \"timing oracle 4\", \"actual\": [\"early\", 3], \"expected\": [\"early\", 3], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [\"early\", 15], \"expected\": [\"early\", 15], \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": [\"locked\", 0], \"expected\": [\"locked\", 0], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [\"extend\", 14], \"expected\": [\"extend\", 15], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.846,"exit_code":0,"observations":[{"actual":["extend",1],"check":"timing oracle 0","expected":["extend",1],"passed":true},{"actual":["none",0],"check":"timing oracle 1","expected":["none",0],"passed":true},{"actual":["locked",0],"check":"timing oracle 2","expected":["locked",0],"passed":true},{"actual":["extend",1],"check":"timing oracle 3","expected":["extend",1],"passed":true},{"actual":["early",3],"check":"timing oracle 4","expected":["early",3],"passed":true},{"actual":["early",15],"check":"timing oracle 5","expected":["early",15],"passed":true},{"actual":["locked",0],"check":"timing oracle 6","expected":["locked",0],"passed":true},{"actual":["extend",15],"check":"timing oracle 7","expected":["extend",15],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [\"extend\", 1], \"expected\": [\"extend\", 1], \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": [\"none\", 0], \"expected\": [\"none\", 0], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [\"locked\", 0], \"expected\": [\"locked\", 0], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [\"extend\", 1], \"expected\": [\"extend\", 1], \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": [\"early\", 3], \"expected\": [\"early\", 3], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [\"early\", 15], \"expected\": [\"early\", 15], \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": [\"locked\", 0], \"expected\": [\"locked\", 0], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [\"extend\", 15], \"expected\": [\"extend\", 15], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}