{"abstract":"Conflict monitor fault scan returns a wrong result when each live channel is paired with itself.","category":"Traffic signal timing plans","checks":8,"contract":"Input {channels: [[channel, lit colors string over R/Y/G, enabled]], compat: unordered compatible pairs, yellow_durations: [[channel, tenths]]}. Disabled channels are ignored entirely. A channel with more than one lit color is 'multi'; with none lit is 'red-fail'; any channel showing G or Y takes part in the conflict check, and every live pair not listed as compatible is 'conflict:a-b' (a<b). A completed yellow shorter than 2.7 s is 'short-yellow'. Return the sorted fault strings.","evaluation_group":"w2-traffic_signal_timing_plans-conflict-monitor","failed_approach":"Starting at i pairs every channel with itself and reports self-conflicts.","family":"w2-traffic_signal_timing_plans-conflict-monitor-pair-scan","id":"FA-68311","implementations":{"attempt":{"sha256":"274023b0b6488aa0a133e4b1aa971f9647499b6406e47ce09a7be7dea89827bc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    ok = {(min(a, b), max(a, b)) for a, b in x['compat']}\n    faults = []\n    live = []\n    for ch, col, en in x['channels']:\n        if not en:\n            continue\n        if len(col) > 1:\n            faults.append('multi:%d' % ch)\n        if col == '':\n            faults.append('red-fail:%d' % ch)\n        if 'G' in col or 'Y' in col:\n            live.append(ch)\n    live.sort()\n    for i in range(len(live)):\n        for j in range(i, len(live)):\n            if (live[i], live[j]) not in ok:\n                faults.append('conflict:%d-%d' % (live[i], live[j]))\n    for ch, tenths in x['yellow_durations']:\n        if tenths < 27:\n            faults.append('short-yellow:%d' % ch)\n    return sorted(faults)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'RG', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 25]]}, ['short-yellow:2']), ({'channels': [[1, 'RG', False], [2, 'RY', False], [3, 'R', True], [4, 'R', True]], 'compat': [[3, 1], [1, 4], [4, 3]], 'yellow_durations': []}, []), ({'channels': [[1, 'GY', True], [2, 'R', False], [3, 'RG', True], [4, 'R', True], [5, 'RG', True]], 'compat': [[2, 1], [2, 4], [5, 2], [3, 4]], 'yellow_durations': [[4, 28], [5, 27]]}, ['conflict:1-3', 'conflict:1-5', 'conflict:3-5', 'multi:1', 'multi:3', 'multi:5']), ({'channels': [[1, 'R', True], [2, '', True], [3, 'RG', False], [4, 'R', True], [5, '', True], [6, 'R', True]], 'compat': [[1, 2], [1, 6], [2, 3], [4, 2], [6, 2], [3, 5], [4, 6], [6, 5]], 'yellow_durations': [[1, 25], [3, 26]]}, ['red-fail:2', 'red-fail:5', 'short-yellow:1', 'short-yellow:3']), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'RG', True], [2, 'G', True], [3, 'GY', True], [4, 'RG', True]], 'compat': [[1, 4], [2, 4], [3, 4]], 'yellow_durations': [[3, 25], [4, 28]]}, ['conflict:1-2', 'conflict:1-3', 'conflict:2-3', 'multi:1', 'multi:3', 'multi:4', 'short-yellow:3']), ({'channels': [[1, 'R', False], [2, 'GY', False], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 25]]}, ['red-fail:3', 'short-yellow:1'])], [({'channels': [[1, 'RY', False], [2, 'R', True], [3, '', True]], 'compat': [[2, 1]], 'yellow_durations': [[2, 25]]}, ['red-fail:3', 'short-yellow:2']), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', True], [4, 'RG', False], [5, '', True]], 'compat': [[1, 2], [1, 4], [2, 3], [2, 5], [3, 5]], 'yellow_durations': [[1, 26], [3, 28], [5, 27]]}, ['red-fail:5', 'short-yellow:1']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'R', True], [2, 'R', False], [3, '', False]], 'compat': [[1, 2]], 'yellow_durations': [[1, 30]]}, []), ({'channels': [[1, 'R', True], [2, 'G', True], [3, 'Y', True], [4, 'R', True], [5, 'RG', True]], 'compat': [[2, 3], [2, 5], [4, 5]], 'yellow_durations': [[2, 27], [3, 28]]}, ['conflict:3-5', 'multi:5']), ({'channels': [[1, 'R', False], [2, 'R', True], [3, 'R', True]], 'compat': [], 'yellow_durations': []}, []), ({'channels': [[1, 'GY', True], [2, 'R', False], [3, 'R', True], [4, 'R', True], [5, 'GY', True], [6, 'R', True]], 'compat': [[2, 1], [4, 2], [5, 2], [6, 2], [4, 6], [5, 6]], 'yellow_durations': []}, ['conflict:1-5', 'multi:1', 'multi:5'])], [({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', False]], 'compat': [[2, 1]], 'yellow_durations': [[1, 27]]}, []), ({'channels': [[1, 'R', True], [2, 'R', False], [3, '', True], [4, 'R', True]], 'compat': [[2, 1], [4, 1], [2, 3], [4, 2]], 'yellow_durations': [[1, 27], [3, 25], [4, 27]]}, ['red-fail:3', 'short-yellow:3']), ({'channels': [[1, 'Y', True], [2, 'RY', True], [3, 'R', True], [4, 'R', True], [5, 'R', True]], 'compat': [[5, 2], [3, 5]], 'yellow_durations': [[1, 35], [5, 35]]}, ['conflict:1-2', 'multi:2']), ({'channels': [[1, 'GY', True], [2, 'GY', True], [3, 'R', True]], 'compat': [], 'yellow_durations': []}, ['conflict:1-2', 'multi:1', 'multi:2']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', False]], 'compat': [], 'yellow_durations': [[2, 35]]}, []), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'GY', False], [2, 'R', False], [3, '', True]], 'compat': [[3, 2]], 'yellow_durations': [[1, 27], [3, 25]]}, ['red-fail:3', 'short-yellow:3'])], [({'channels': [[1, 'R', True], [2, 'R', True], [3, '', False], [4, 'R', True], [5, 'R', True], [6, 'RY', False]], 'compat': [[4, 1], [5, 1], [5, 2], [2, 6], [5, 4], [4, 6]], 'yellow_durations': []}, []), ({'channels': [[1, 'Y', True], [2, 'R', True], [3, 'GY', True], [4, 'RY', True], [5, 'R', True]], 'compat': [[2, 1], [4, 5]], 'yellow_durations': [[4, 30], [5, 26]]}, ['conflict:1-3', 'conflict:1-4', 'conflict:3-4', 'multi:3', 'multi:4', 'short-yellow:5']), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'R', True], [2, '', False], [3, 'R', False], [4, 'R', True]], 'compat': [[2, 1], [2, 3], [4, 3]], 'yellow_durations': [[2, 25]]}, ['short-yellow:2']), ({'channels': [[1, '', True], [2, 'R', True], [3, 'R', True]], 'compat': [[1, 2]], 'yellow_durations': [[2, 28]]}, ['red-fail:1']), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', True], [4, 'Y', True], [5, 'R', False], [6, 'RY', True]], 'compat': [[1, 3], [1, 5], [2, 3], [6, 2], [4, 3]], 'yellow_durations': [[2, 27], [3, 28], [5, 26], [6, 25]]}, ['conflict:4-6', 'multi:6', 'short-yellow:5', 'short-yellow:6']), ({'channels': [[1, '', True], [2, 'R', True], [3, '', True], [4, 'R', True], [5, 'R', True]], 'compat': [[1, 2], [3, 1], [1, 4], [4, 2], [5, 3]], 'yellow_durations': []}, ['red-fail:1', 'red-fail:3'])], [({'channels': [[1, '', True], [2, 'R', False], [3, 'R', True]], 'compat': [[2, 3]], 'yellow_durations': []}, ['red-fail:1']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, '', True], [2, 'RG', True], [3, 'Y', True], [4, 'R', True], [5, 'R', False]], 'compat': [[5, 4]], 'yellow_durations': [[3, 35]]}, ['conflict:2-3', 'multi:2', 'red-fail:1']), ({'channels': [[1, '', True], [2, '', True], [3, 'R', True]], 'compat': [[3, 1]], 'yellow_durations': []}, ['red-fail:1', 'red-fail:2']), ({'channels': [[1, 'G', False], [2, '', True], [3, '', False], [4, 'Y', False]], 'compat': [[1, 4], [3, 2], [4, 2]], 'yellow_durations': [[1, 26], [3, 27]]}, ['red-fail:2', 'short-yellow:1']), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', True], [4, 'R', True]], 'compat': [[3, 1], [1, 4], [4, 2]], 'yellow_durations': [[1, 25], [2, 28]]}, ['short-yellow:1']), ({'channels': [[1, 'G', True], [2, 'Y', True], [3, 'RY', True], [4, 'R', True]], 'compat': [[1, 4], [2, 3]], 'yellow_durations': [[1, 35]]}, ['conflict:1-2', 'conflict:1-3', 'multi: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":"d1d95707691f67a663c4513d13cb875d93cbbef417af0ec6bf3bf81467ea27c0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    ok = {(min(a, b), max(a, b)) for a, b in x['compat']}\n    faults = []\n    live = []\n    for ch, col, en in x['channels']:\n        if not en:\n            continue\n        if len(col) > 1:\n            faults.append('multi:%d' % ch)\n        if col == '':\n            faults.append('red-fail:%d' % ch)\n        if 'G' in col or 'Y' in col:\n            live.append(ch)\n    live.sort()\n    for i in range(len(live)):\n        for j in range(i + 2, len(live)):\n            if (live[i], live[j]) not in ok:\n                faults.append('conflict:%d-%d' % (live[i], live[j]))\n    for ch, tenths in x['yellow_durations']:\n        if tenths < 27:\n            faults.append('short-yellow:%d' % ch)\n    return sorted(faults)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'RG', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 25]]}, ['short-yellow:2']), ({'channels': [[1, 'RG', False], [2, 'RY', False], [3, 'R', True], [4, 'R', True]], 'compat': [[3, 1], [1, 4], [4, 3]], 'yellow_durations': []}, []), ({'channels': [[1, 'GY', True], [2, 'R', False], [3, 'RG', True], [4, 'R', True], [5, 'RG', True]], 'compat': [[2, 1], [2, 4], [5, 2], [3, 4]], 'yellow_durations': [[4, 28], [5, 27]]}, ['conflict:1-3', 'conflict:1-5', 'conflict:3-5', 'multi:1', 'multi:3', 'multi:5']), ({'channels': [[1, 'R', True], [2, '', True], [3, 'RG', False], [4, 'R', True], [5, '', True], [6, 'R', True]], 'compat': [[1, 2], [1, 6], [2, 3], [4, 2], [6, 2], [3, 5], [4, 6], [6, 5]], 'yellow_durations': [[1, 25], [3, 26]]}, ['red-fail:2', 'red-fail:5', 'short-yellow:1', 'short-yellow:3']), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'RG', True], [2, 'G', True], [3, 'GY', True], [4, 'RG', True]], 'compat': [[1, 4], [2, 4], [3, 4]], 'yellow_durations': [[3, 25], [4, 28]]}, ['conflict:1-2', 'conflict:1-3', 'conflict:2-3', 'multi:1', 'multi:3', 'multi:4', 'short-yellow:3']), ({'channels': [[1, 'R', False], [2, 'GY', False], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 25]]}, ['red-fail:3', 'short-yellow:1'])], [({'channels': [[1, 'RY', False], [2, 'R', True], [3, '', True]], 'compat': [[2, 1]], 'yellow_durations': [[2, 25]]}, ['red-fail:3', 'short-yellow:2']), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', True], [4, 'RG', False], [5, '', True]], 'compat': [[1, 2], [1, 4], [2, 3], [2, 5], [3, 5]], 'yellow_durations': [[1, 26], [3, 28], [5, 27]]}, ['red-fail:5', 'short-yellow:1']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'R', True], [2, 'R', False], [3, '', False]], 'compat': [[1, 2]], 'yellow_durations': [[1, 30]]}, []), ({'channels': [[1, 'R', True], [2, 'G', True], [3, 'Y', True], [4, 'R', True], [5, 'RG', True]], 'compat': [[2, 3], [2, 5], [4, 5]], 'yellow_durations': [[2, 27], [3, 28]]}, ['conflict:3-5', 'multi:5']), ({'channels': [[1, 'R', False], [2, 'R', True], [3, 'R', True]], 'compat': [], 'yellow_durations': []}, []), ({'channels': [[1, 'GY', True], [2, 'R', False], [3, 'R', True], [4, 'R', True], [5, 'GY', True], [6, 'R', True]], 'compat': [[2, 1], [4, 2], [5, 2], [6, 2], [4, 6], [5, 6]], 'yellow_durations': []}, ['conflict:1-5', 'multi:1', 'multi:5'])], [({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', False]], 'compat': [[2, 1]], 'yellow_durations': [[1, 27]]}, []), ({'channels': [[1, 'R', True], [2, 'R', False], [3, '', True], [4, 'R', True]], 'compat': [[2, 1], [4, 1], [2, 3], [4, 2]], 'yellow_durations': [[1, 27], [3, 25], [4, 27]]}, ['red-fail:3', 'short-yellow:3']), ({'channels': [[1, 'Y', True], [2, 'RY', True], [3, 'R', True], [4, 'R', True], [5, 'R', True]], 'compat': [[5, 2], [3, 5]], 'yellow_durations': [[1, 35], [5, 35]]}, ['conflict:1-2', 'multi:2']), ({'channels': [[1, 'GY', True], [2, 'GY', True], [3, 'R', True]], 'compat': [], 'yellow_durations': []}, ['conflict:1-2', 'multi:1', 'multi:2']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', False]], 'compat': [], 'yellow_durations': [[2, 35]]}, []), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'GY', False], [2, 'R', False], [3, '', True]], 'compat': [[3, 2]], 'yellow_durations': [[1, 27], [3, 25]]}, ['red-fail:3', 'short-yellow:3'])], [({'channels': [[1, 'R', True], [2, 'R', True], [3, '', False], [4, 'R', True], [5, 'R', True], [6, 'RY', False]], 'compat': [[4, 1], [5, 1], [5, 2], [2, 6], [5, 4], [4, 6]], 'yellow_durations': []}, []), ({'channels': [[1, 'Y', True], [2, 'R', True], [3, 'GY', True], [4, 'RY', True], [5, 'R', True]], 'compat': [[2, 1], [4, 5]], 'yellow_durations': [[4, 30], [5, 26]]}, ['conflict:1-3', 'conflict:1-4', 'conflict:3-4', 'multi:3', 'multi:4', 'short-yellow:5']), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'R', True], [2, '', False], [3, 'R', False], [4, 'R', True]], 'compat': [[2, 1], [2, 3], [4, 3]], 'yellow_durations': [[2, 25]]}, ['short-yellow:2']), ({'channels': [[1, '', True], [2, 'R', True], [3, 'R', True]], 'compat': [[1, 2]], 'yellow_durations': [[2, 28]]}, ['red-fail:1']), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', True], [4, 'Y', True], [5, 'R', False], [6, 'RY', True]], 'compat': [[1, 3], [1, 5], [2, 3], [6, 2], [4, 3]], 'yellow_durations': [[2, 27], [3, 28], [5, 26], [6, 25]]}, ['conflict:4-6', 'multi:6', 'short-yellow:5', 'short-yellow:6']), ({'channels': [[1, '', True], [2, 'R', True], [3, '', True], [4, 'R', True], [5, 'R', True]], 'compat': [[1, 2], [3, 1], [1, 4], [4, 2], [5, 3]], 'yellow_durations': []}, ['red-fail:1', 'red-fail:3'])], [({'channels': [[1, '', True], [2, 'R', False], [3, 'R', True]], 'compat': [[2, 3]], 'yellow_durations': []}, ['red-fail:1']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, '', True], [2, 'RG', True], [3, 'Y', True], [4, 'R', True], [5, 'R', False]], 'compat': [[5, 4]], 'yellow_durations': [[3, 35]]}, ['conflict:2-3', 'multi:2', 'red-fail:1']), ({'channels': [[1, '', True], [2, '', True], [3, 'R', True]], 'compat': [[3, 1]], 'yellow_durations': []}, ['red-fail:1', 'red-fail:2']), ({'channels': [[1, 'G', False], [2, '', True], [3, '', False], [4, 'Y', False]], 'compat': [[1, 4], [3, 2], [4, 2]], 'yellow_durations': [[1, 26], [3, 27]]}, ['red-fail:2', 'short-yellow:1']), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', True], [4, 'R', True]], 'compat': [[3, 1], [1, 4], [4, 2]], 'yellow_durations': [[1, 25], [2, 28]]}, ['short-yellow:1']), ({'channels': [[1, 'G', True], [2, 'Y', True], [3, 'RY', True], [4, 'R', True]], 'compat': [[1, 4], [2, 3]], 'yellow_durations': [[1, 35]]}, ['conflict:1-2', 'conflict:1-3', 'multi: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":"1de8ce93ce0bd719683f12417b63782522b03551f52b202952cffef8676d53d3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    ok = {(min(a, b), max(a, b)) for a, b in x['compat']}\n    faults = []\n    live = []\n    for ch, col, en in x['channels']:\n        if not en:\n            continue\n        if len(col) > 1:\n            faults.append('multi:%d' % ch)\n        if col == '':\n            faults.append('red-fail:%d' % ch)\n        if 'G' in col or 'Y' in col:\n            live.append(ch)\n    live.sort()\n    for i in range(len(live)):\n        for j in range(i + 1, len(live)):\n            if (live[i], live[j]) not in ok:\n                faults.append('conflict:%d-%d' % (live[i], live[j]))\n    for ch, tenths in x['yellow_durations']:\n        if tenths < 27:\n            faults.append('short-yellow:%d' % ch)\n    return sorted(faults)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'RG', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 25]]}, ['short-yellow:2']), ({'channels': [[1, 'RG', False], [2, 'RY', False], [3, 'R', True], [4, 'R', True]], 'compat': [[3, 1], [1, 4], [4, 3]], 'yellow_durations': []}, []), ({'channels': [[1, 'GY', True], [2, 'R', False], [3, 'RG', True], [4, 'R', True], [5, 'RG', True]], 'compat': [[2, 1], [2, 4], [5, 2], [3, 4]], 'yellow_durations': [[4, 28], [5, 27]]}, ['conflict:1-3', 'conflict:1-5', 'conflict:3-5', 'multi:1', 'multi:3', 'multi:5']), ({'channels': [[1, 'R', True], [2, '', True], [3, 'RG', False], [4, 'R', True], [5, '', True], [6, 'R', True]], 'compat': [[1, 2], [1, 6], [2, 3], [4, 2], [6, 2], [3, 5], [4, 6], [6, 5]], 'yellow_durations': [[1, 25], [3, 26]]}, ['red-fail:2', 'red-fail:5', 'short-yellow:1', 'short-yellow:3']), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'RG', True], [2, 'G', True], [3, 'GY', True], [4, 'RG', True]], 'compat': [[1, 4], [2, 4], [3, 4]], 'yellow_durations': [[3, 25], [4, 28]]}, ['conflict:1-2', 'conflict:1-3', 'conflict:2-3', 'multi:1', 'multi:3', 'multi:4', 'short-yellow:3']), ({'channels': [[1, 'R', False], [2, 'GY', False], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 25]]}, ['red-fail:3', 'short-yellow:1'])], [({'channels': [[1, 'RY', False], [2, 'R', True], [3, '', True]], 'compat': [[2, 1]], 'yellow_durations': [[2, 25]]}, ['red-fail:3', 'short-yellow:2']), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', True], [4, 'RG', False], [5, '', True]], 'compat': [[1, 2], [1, 4], [2, 3], [2, 5], [3, 5]], 'yellow_durations': [[1, 26], [3, 28], [5, 27]]}, ['red-fail:5', 'short-yellow:1']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'R', True], [2, 'R', False], [3, '', False]], 'compat': [[1, 2]], 'yellow_durations': [[1, 30]]}, []), ({'channels': [[1, 'R', True], [2, 'G', True], [3, 'Y', True], [4, 'R', True], [5, 'RG', True]], 'compat': [[2, 3], [2, 5], [4, 5]], 'yellow_durations': [[2, 27], [3, 28]]}, ['conflict:3-5', 'multi:5']), ({'channels': [[1, 'R', False], [2, 'R', True], [3, 'R', True]], 'compat': [], 'yellow_durations': []}, []), ({'channels': [[1, 'GY', True], [2, 'R', False], [3, 'R', True], [4, 'R', True], [5, 'GY', True], [6, 'R', True]], 'compat': [[2, 1], [4, 2], [5, 2], [6, 2], [4, 6], [5, 6]], 'yellow_durations': []}, ['conflict:1-5', 'multi:1', 'multi:5'])], [({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', False]], 'compat': [[2, 1]], 'yellow_durations': [[1, 27]]}, []), ({'channels': [[1, 'R', True], [2, 'R', False], [3, '', True], [4, 'R', True]], 'compat': [[2, 1], [4, 1], [2, 3], [4, 2]], 'yellow_durations': [[1, 27], [3, 25], [4, 27]]}, ['red-fail:3', 'short-yellow:3']), ({'channels': [[1, 'Y', True], [2, 'RY', True], [3, 'R', True], [4, 'R', True], [5, 'R', True]], 'compat': [[5, 2], [3, 5]], 'yellow_durations': [[1, 35], [5, 35]]}, ['conflict:1-2', 'multi:2']), ({'channels': [[1, 'GY', True], [2, 'GY', True], [3, 'R', True]], 'compat': [], 'yellow_durations': []}, ['conflict:1-2', 'multi:1', 'multi:2']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', False]], 'compat': [], 'yellow_durations': [[2, 35]]}, []), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'GY', False], [2, 'R', False], [3, '', True]], 'compat': [[3, 2]], 'yellow_durations': [[1, 27], [3, 25]]}, ['red-fail:3', 'short-yellow:3'])], [({'channels': [[1, 'R', True], [2, 'R', True], [3, '', False], [4, 'R', True], [5, 'R', True], [6, 'RY', False]], 'compat': [[4, 1], [5, 1], [5, 2], [2, 6], [5, 4], [4, 6]], 'yellow_durations': []}, []), ({'channels': [[1, 'Y', True], [2, 'R', True], [3, 'GY', True], [4, 'RY', True], [5, 'R', True]], 'compat': [[2, 1], [4, 5]], 'yellow_durations': [[4, 30], [5, 26]]}, ['conflict:1-3', 'conflict:1-4', 'conflict:3-4', 'multi:3', 'multi:4', 'short-yellow:5']), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'R', True], [2, '', False], [3, 'R', False], [4, 'R', True]], 'compat': [[2, 1], [2, 3], [4, 3]], 'yellow_durations': [[2, 25]]}, ['short-yellow:2']), ({'channels': [[1, '', True], [2, 'R', True], [3, 'R', True]], 'compat': [[1, 2]], 'yellow_durations': [[2, 28]]}, ['red-fail:1']), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', True], [4, 'Y', True], [5, 'R', False], [6, 'RY', True]], 'compat': [[1, 3], [1, 5], [2, 3], [6, 2], [4, 3]], 'yellow_durations': [[2, 27], [3, 28], [5, 26], [6, 25]]}, ['conflict:4-6', 'multi:6', 'short-yellow:5', 'short-yellow:6']), ({'channels': [[1, '', True], [2, 'R', True], [3, '', True], [4, 'R', True], [5, 'R', True]], 'compat': [[1, 2], [3, 1], [1, 4], [4, 2], [5, 3]], 'yellow_durations': []}, ['red-fail:1', 'red-fail:3'])], [({'channels': [[1, '', True], [2, 'R', False], [3, 'R', True]], 'compat': [[2, 3]], 'yellow_durations': []}, ['red-fail:1']), ({'channels': [[1, 'G', True], [2, 'R', True], [3, 'Y', True], [4, 'G', False]], 'compat': [[3, 1]], 'yellow_durations': [[2, 27]]}, []), ({'channels': [[1, 'GY', True], [2, 'G', True], [3, '', True]], 'compat': [], 'yellow_durations': [[1, 26]]}, ['conflict:1-2', 'multi:1', 'red-fail:3', 'short-yellow:1']), ({'channels': [[1, '', True], [2, 'RG', True], [3, 'Y', True], [4, 'R', True], [5, 'R', False]], 'compat': [[5, 4]], 'yellow_durations': [[3, 35]]}, ['conflict:2-3', 'multi:2', 'red-fail:1']), ({'channels': [[1, '', True], [2, '', True], [3, 'R', True]], 'compat': [[3, 1]], 'yellow_durations': []}, ['red-fail:1', 'red-fail:2']), ({'channels': [[1, 'G', False], [2, '', True], [3, '', False], [4, 'Y', False]], 'compat': [[1, 4], [3, 2], [4, 2]], 'yellow_durations': [[1, 26], [3, 27]]}, ['red-fail:2', 'short-yellow:1']), ({'channels': [[1, 'R', True], [2, 'R', True], [3, 'R', True], [4, 'R', True]], 'compat': [[3, 1], [1, 4], [4, 2]], 'yellow_durations': [[1, 25], [2, 28]]}, ['short-yellow:1']), ({'channels': [[1, 'G', True], [2, 'Y', True], [3, 'RY', True], [4, 'R', True]], 'compat': [[1, 4], [2, 3]], 'yellow_durations': [[1, 35]]}, ['conflict:1-2', 'conflict:1-3', 'multi: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-conflict-monitor-pair-scan","generated_at":"2026-09-29T14:48:01.033644+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 pair enumeration rule so that the step reads `range(i + 1, len(live))`.","root_cause":"Adjacent live channels are never compared, hiding conflicts between neighbouring channel numbers.","sha256":"f96aca2fd1be86e4d4eb70ef0ff5cb34d6b06a90bf300a0a195e4b4a9efe4604","title":"Conflict monitor fault scan: each live channel is paired with itself · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.821,"exit_code":1,"observations":[{"actual":["conflict:1-1","conflict:3-3"],"check":"timing oracle 0","expected":[],"passed":false},{"actual":["short-yellow:2"],"check":"timing oracle 1","expected":["short-yellow:2"],"passed":true},{"actual":[],"check":"timing oracle 2","expected":[],"passed":true},{"actual":["conflict:1-1","conflict:1-3","conflict:1-5","conflict:3-3","conflict:3-5","conflict:5-5","multi:1","multi:3","multi:5"],"check":"timing oracle 3","expected":["conflict:1-3","conflict:1-5","conflict:3-5","multi:1","multi:3","multi:5"],"passed":false},{"actual":["red-fail:2","red-fail:5","short-yellow:1","short-yellow:3"],"check":"timing oracle 4","expected":["red-fail:2","red-fail:5","short-yellow:1","short-yellow:3"],"passed":true},{"actual":["conflict:1-1","conflict:1-2","conflict:2-2","multi:1","red-fail:3","short-yellow:1"],"check":"timing oracle 5","expected":["conflict:1-2","multi:1","red-fail:3","short-yellow:1"],"passed":false},{"actual":["conflict:1-1","conflict:1-2","conflict:1-3","conflict:2-2","conflict:2-3","conflict:3-3","conflict:4-4","multi:1","multi:3","multi:4","short-yellow:3"],"check":"timing oracle 6","expected":["conflict:1-2","conflict:1-3","conflict:2-3","multi:1","multi:3","multi:4","short-yellow:3"],"passed":false},{"actual":["red-fail:3","short-yellow:1"],"check":"timing oracle 7","expected":["red-fail:3","short-yellow:1"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [\"conflict:1-1\", \"conflict:3-3\"], \"expected\": [], \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": [\"short-yellow:2\"], \"expected\": [\"short-yellow:2\"], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [\"conflict:1-1\", \"conflict:1-3\", \"conflict:1-5\", \"conflict:3-3\", \"conflict:3-5\", \"conflict:5-5\", \"multi:1\", \"multi:3\", \"multi:5\"], \"expected\": [\"conflict:1-3\", \"conflict:1-5\", \"conflict:3-5\", \"multi:1\", \"multi:3\", \"multi:5\"], \"passed\": false}, {\"check\": \"timing oracle 4\", \"actual\": [\"red-fail:2\", \"red-fail:5\", \"short-yellow:1\", \"short-yellow:3\"], \"expected\": [\"red-fail:2\", \"red-fail:5\", \"short-yellow:1\", \"short-yellow:3\"], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [\"conflict:1-1\", \"conflict:1-2\", \"conflict:2-2\", \"multi:1\", \"red-fail:3\", \"short-yellow:1\"], \"expected\": [\"conflict:1-2\", \"multi:1\", \"red-fail:3\", \"short-yellow:1\"], \"passed\": false}, {\"check\": \"timing oracle 6\", \"actual\": [\"conflict:1-1\", \"conflict:1-2\", \"conflict:1-3\", \"conflict:2-2\", \"conflict:2-3\", \"conflict:3-3\", \"conflict:4-4\", \"multi:1\", \"multi:3\", \"multi:4\", \"short-yellow:3\"], \"expected\": [\"conflict:1-2\", \"conflict:1-3\", \"conflict:2-3\", \"multi:1\", \"multi:3\", \"multi:4\", \"short-yellow:3\"], \"passed\": false}, {\"check\": \"timing oracle 7\", \"actual\": [\"red-fail:3\", \"short-yellow:1\"], \"expected\": [\"red-fail:3\", \"short-yellow:1\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.16,"exit_code":1,"observations":[{"actual":[],"check":"timing oracle 0","expected":[],"passed":true},{"actual":["short-yellow:2"],"check":"timing oracle 1","expected":["short-yellow:2"],"passed":true},{"actual":[],"check":"timing oracle 2","expected":[],"passed":true},{"actual":["conflict:1-5","multi:1","multi:3","multi:5"],"check":"timing oracle 3","expected":["conflict:1-3","conflict:1-5","conflict:3-5","multi:1","multi:3","multi:5"],"passed":false},{"actual":["red-fail:2","red-fail:5","short-yellow:1","short-yellow:3"],"check":"timing oracle 4","expected":["red-fail:2","red-fail:5","short-yellow:1","short-yellow:3"],"passed":true},{"actual":["multi:1","red-fail:3","short-yellow:1"],"check":"timing oracle 5","expected":["conflict:1-2","multi:1","red-fail:3","short-yellow:1"],"passed":false},{"actual":["conflict:1-3","multi:1","multi:3","multi:4","short-yellow:3"],"check":"timing oracle 6","expected":["conflict:1-2","conflict:1-3","conflict:2-3","multi:1","multi:3","multi:4","short-yellow:3"],"passed":false},{"actual":["red-fail:3","short-yellow:1"],"check":"timing oracle 7","expected":["red-fail:3","short-yellow:1"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": [\"short-yellow:2\"], \"expected\": [\"short-yellow:2\"], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [\"conflict:1-5\", \"multi:1\", \"multi:3\", \"multi:5\"], \"expected\": [\"conflict:1-3\", \"conflict:1-5\", \"conflict:3-5\", \"multi:1\", \"multi:3\", \"multi:5\"], \"passed\": false}, {\"check\": \"timing oracle 4\", \"actual\": [\"red-fail:2\", \"red-fail:5\", \"short-yellow:1\", \"short-yellow:3\"], \"expected\": [\"red-fail:2\", \"red-fail:5\", \"short-yellow:1\", \"short-yellow:3\"], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [\"multi:1\", \"red-fail:3\", \"short-yellow:1\"], \"expected\": [\"conflict:1-2\", \"multi:1\", \"red-fail:3\", \"short-yellow:1\"], \"passed\": false}, {\"check\": \"timing oracle 6\", \"actual\": [\"conflict:1-3\", \"multi:1\", \"multi:3\", \"multi:4\", \"short-yellow:3\"], \"expected\": [\"conflict:1-2\", \"conflict:1-3\", \"conflict:2-3\", \"multi:1\", \"multi:3\", \"multi:4\", \"short-yellow:3\"], \"passed\": false}, {\"check\": \"timing oracle 7\", \"actual\": [\"red-fail:3\", \"short-yellow:1\"], \"expected\": [\"red-fail:3\", \"short-yellow:1\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.416,"exit_code":0,"observations":[{"actual":[],"check":"timing oracle 0","expected":[],"passed":true},{"actual":["short-yellow:2"],"check":"timing oracle 1","expected":["short-yellow:2"],"passed":true},{"actual":[],"check":"timing oracle 2","expected":[],"passed":true},{"actual":["conflict:1-3","conflict:1-5","conflict:3-5","multi:1","multi:3","multi:5"],"check":"timing oracle 3","expected":["conflict:1-3","conflict:1-5","conflict:3-5","multi:1","multi:3","multi:5"],"passed":true},{"actual":["red-fail:2","red-fail:5","short-yellow:1","short-yellow:3"],"check":"timing oracle 4","expected":["red-fail:2","red-fail:5","short-yellow:1","short-yellow:3"],"passed":true},{"actual":["conflict:1-2","multi:1","red-fail:3","short-yellow:1"],"check":"timing oracle 5","expected":["conflict:1-2","multi:1","red-fail:3","short-yellow:1"],"passed":true},{"actual":["conflict:1-2","conflict:1-3","conflict:2-3","multi:1","multi:3","multi:4","short-yellow:3"],"check":"timing oracle 6","expected":["conflict:1-2","conflict:1-3","conflict:2-3","multi:1","multi:3","multi:4","short-yellow:3"],"passed":true},{"actual":["red-fail:3","short-yellow:1"],"check":"timing oracle 7","expected":["red-fail:3","short-yellow:1"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": [\"short-yellow:2\"], \"expected\": [\"short-yellow:2\"], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [\"conflict:1-3\", \"conflict:1-5\", \"conflict:3-5\", \"multi:1\", \"multi:3\", \"multi:5\"], \"expected\": [\"conflict:1-3\", \"conflict:1-5\", \"conflict:3-5\", \"multi:1\", \"multi:3\", \"multi:5\"], \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": [\"red-fail:2\", \"red-fail:5\", \"short-yellow:1\", \"short-yellow:3\"], \"expected\": [\"red-fail:2\", \"red-fail:5\", \"short-yellow:1\", \"short-yellow:3\"], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [\"conflict:1-2\", \"multi:1\", \"red-fail:3\", \"short-yellow:1\"], \"expected\": [\"conflict:1-2\", \"multi:1\", \"red-fail:3\", \"short-yellow:1\"], \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": [\"conflict:1-2\", \"conflict:1-3\", \"conflict:2-3\", \"multi:1\", \"multi:3\", \"multi:4\", \"short-yellow:3\"], \"expected\": [\"conflict:1-2\", \"conflict:1-3\", \"conflict:2-3\", \"multi:1\", \"multi:3\", \"multi:4\", \"short-yellow:3\"], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [\"red-fail:3\", \"short-yellow:1\"], \"expected\": [\"red-fail:3\", \"short-yellow:1\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}