{"abstract":"The held signal list repeats a signal or is out of order.","category":"Railway interlocking logic","checks":8,"contract":"For each route point (sorted) in its lie, the flank table (key point+lie) lists flank points with the protecting lie and an optional flank signal. A flank point is set to its protecting lie if it is free, locked in that lie by another route, or already demanded in that lie by this route; if it is unavailable, its flank signal is held at danger when the signal exists and is holdable; otherwise the route is refused (refused:<flank point>, nothing set or held). Held signals are returned sorted and unique.","evaluation_group":"w2-railway_interlocking_logic-flank-protection","failed_approach":"Sorting without deduplication still repeats a signal held for two flank points.","family":"w2-railway_interlocking_logic-flank-protection-held-signal-list","id":"FA-67291","implementations":{"attempt":{"sha256":"5cc2951b245cb116ebe5cde4a49df489563f8a3af3c339c06f16fa84d315f2d8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    set_pts = {}\n    held = []\n    locks = x['point_locks']\n    for p, pos in sorted(x['route_points'].items()):\n        for fp, fpos, fsig in x['flank'].get(p + pos, []):\n            lk = locks.get(fp, set_pts.get(fp))\n            if lk is None or lk == fpos:\n                set_pts[fp] = fpos\n            elif fsig is not None and fsig in x['holdable']:\n                held.append(fsig)\n            else:\n                return {'result': 'refused:' + fp, 'set_points': {}, 'held_signals': []}\n    return {'result': 'protected', 'set_points': set_pts, 'held_signals': sorted(held)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: flank point locked in the protecting lie', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: flank point free', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: two route points disagree on a flank point', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: flank signal not holdable', {'route_points': {'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': []}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('control 1', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P9': 'N'}, 'holdable': ['S23', 'S24']}, {'result': 'refused:P9', 'set_points': {}, 'held_signals': []}), ('control 4', {'route_points': {'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S22']}, {'result': 'protected', 'set_points': {'P9': 'N', 'P7': 'N'}, 'held_signals': []}), ('control 7', {'route_points': {'P2': 'R', 'P1': 'R', 'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P8': 'R', 'P9': 'R'}, 'holdable': ['S22', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: two route points disagree on a flank point', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: flank signal not holdable', {'route_points': {'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': []}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('boundary: no flank signal available', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'N'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P9', 'set_points': {}, 'held_signals': []}), ('boundary: reverse lie flank entry', {'route_points': {'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': ['S23']}), ('control 12', {'route_points': {'P1': 'R', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S22', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'N'}, 'held_signals': []}), ('control 15', {'route_points': {'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'N'}, 'holdable': ['S24']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': []}), ('control 18', {'route_points': {'P3': 'R', 'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P9': 'N'}, 'holdable': ['S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N', 'P8': 'N'}, 'held_signals': []})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: no flank signal available', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'N'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P9', 'set_points': {}, 'held_signals': []}), ('boundary: reverse lie flank entry', {'route_points': {'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': ['S23']}), ('boundary: own conflicting demand with a holdable signal', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S23']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: own conflicting demand without a signal', {'route_points': {'P1': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('control 23', {'route_points': {'P1': 'R', 'P2': 'N', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'R', 'P9': 'R'}, 'held_signals': ['S24']}), ('control 26', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P8': 'N'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P9': 'R'}, 'held_signals': []}), ('control 29', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S23']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': ['S23']})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: own conflicting demand with a holdable signal', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S23']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: own conflicting demand without a signal', {'route_points': {'P1': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('boundary: flank point locked in the protecting lie', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: flank point free', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('control 34', {'route_points': {'P3': 'R', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P9': 'N'}, 'holdable': ['S20', 'S21', 'S24']}, {'result': 'protected', 'set_points': {'P8': 'R'}, 'held_signals': ['S20', 'S24']}), ('control 37', {'route_points': {'P2': 'N', 'P1': 'R', 'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P8': 'R'}, 'holdable': ['S21', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'R', 'P9': 'R'}, 'held_signals': []}), ('control 40', {'route_points': {'P3': 'R', 'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'N'}, 'held_signals': []})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: own conflicting demand without a signal', {'route_points': {'P1': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('boundary: flank point locked in the protecting lie', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: flank point free', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: two route points disagree on a flank point', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('control 45', {'route_points': {'P2': 'N', 'P1': 'N', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P8': 'R'}, 'holdable': ['S20', 'S21', 'S23', 'S24']}, {'result': 'refused:P8', 'set_points': {}, 'held_signals': []}), ('control 48', {'route_points': {'P2': 'R', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N'}, 'holdable': ['S20', 'S21', 'S22']}, {'result': 'protected', 'set_points': {'P9': 'N', 'P7': 'N', 'P8': 'N'}, 'held_signals': []}), ('control 51', {'route_points': {'P3': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'R'}, 'held_signals': ['S23']})]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, 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":"e0a126724958b548baef3a2fb6c8596397fe2b2355b2b9ec13e86a72cd7a9f33","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    set_pts = {}\n    held = []\n    locks = x['point_locks']\n    for p, pos in sorted(x['route_points'].items()):\n        for fp, fpos, fsig in x['flank'].get(p + pos, []):\n            lk = locks.get(fp, set_pts.get(fp))\n            if lk is None or lk == fpos:\n                set_pts[fp] = fpos\n            elif fsig is not None and fsig in x['holdable']:\n                held.append(fsig)\n            else:\n                return {'result': 'refused:' + fp, 'set_points': {}, 'held_signals': []}\n    return {'result': 'protected', 'set_points': set_pts, 'held_signals': held}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: flank point locked in the protecting lie', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: flank point free', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: two route points disagree on a flank point', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: flank signal not holdable', {'route_points': {'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': []}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('control 1', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P9': 'N'}, 'holdable': ['S23', 'S24']}, {'result': 'refused:P9', 'set_points': {}, 'held_signals': []}), ('control 4', {'route_points': {'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S22']}, {'result': 'protected', 'set_points': {'P9': 'N', 'P7': 'N'}, 'held_signals': []}), ('control 7', {'route_points': {'P2': 'R', 'P1': 'R', 'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P8': 'R', 'P9': 'R'}, 'holdable': ['S22', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: two route points disagree on a flank point', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: flank signal not holdable', {'route_points': {'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': []}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('boundary: no flank signal available', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'N'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P9', 'set_points': {}, 'held_signals': []}), ('boundary: reverse lie flank entry', {'route_points': {'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': ['S23']}), ('control 12', {'route_points': {'P1': 'R', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S22', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'N'}, 'held_signals': []}), ('control 15', {'route_points': {'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'N'}, 'holdable': ['S24']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': []}), ('control 18', {'route_points': {'P3': 'R', 'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P9': 'N'}, 'holdable': ['S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N', 'P8': 'N'}, 'held_signals': []})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: no flank signal available', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'N'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P9', 'set_points': {}, 'held_signals': []}), ('boundary: reverse lie flank entry', {'route_points': {'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': ['S23']}), ('boundary: own conflicting demand with a holdable signal', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S23']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: own conflicting demand without a signal', {'route_points': {'P1': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('control 23', {'route_points': {'P1': 'R', 'P2': 'N', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'R', 'P9': 'R'}, 'held_signals': ['S24']}), ('control 26', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P8': 'N'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P9': 'R'}, 'held_signals': []}), ('control 29', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S23']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': ['S23']})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: own conflicting demand with a holdable signal', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S23']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: own conflicting demand without a signal', {'route_points': {'P1': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('boundary: flank point locked in the protecting lie', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: flank point free', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('control 34', {'route_points': {'P3': 'R', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P9': 'N'}, 'holdable': ['S20', 'S21', 'S24']}, {'result': 'protected', 'set_points': {'P8': 'R'}, 'held_signals': ['S20', 'S24']}), ('control 37', {'route_points': {'P2': 'N', 'P1': 'R', 'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P8': 'R'}, 'holdable': ['S21', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'R', 'P9': 'R'}, 'held_signals': []}), ('control 40', {'route_points': {'P3': 'R', 'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'N'}, 'held_signals': []})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: own conflicting demand without a signal', {'route_points': {'P1': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('boundary: flank point locked in the protecting lie', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: flank point free', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: two route points disagree on a flank point', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('control 45', {'route_points': {'P2': 'N', 'P1': 'N', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P8': 'R'}, 'holdable': ['S20', 'S21', 'S23', 'S24']}, {'result': 'refused:P8', 'set_points': {}, 'held_signals': []}), ('control 48', {'route_points': {'P2': 'R', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N'}, 'holdable': ['S20', 'S21', 'S22']}, {'result': 'protected', 'set_points': {'P9': 'N', 'P7': 'N', 'P8': 'N'}, 'held_signals': []}), ('control 51', {'route_points': {'P3': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'R'}, 'held_signals': ['S23']})]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, 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":"3e49c82b552ddfe4ce2e347640341fc5aa1570d5aee4353630ba039b05b31982","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    set_pts = {}\n    held = []\n    locks = x['point_locks']\n    for p, pos in sorted(x['route_points'].items()):\n        for fp, fpos, fsig in x['flank'].get(p + pos, []):\n            lk = locks.get(fp, set_pts.get(fp))\n            if lk is None or lk == fpos:\n                set_pts[fp] = fpos\n            elif fsig is not None and fsig in x['holdable']:\n                held.append(fsig)\n            else:\n                return {'result': 'refused:' + fp, 'set_points': {}, 'held_signals': []}\n    return {'result': 'protected', 'set_points': set_pts, 'held_signals': sorted(set(held))}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: flank point locked in the protecting lie', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: flank point free', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: two route points disagree on a flank point', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: flank signal not holdable', {'route_points': {'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': []}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('control 1', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P9': 'N'}, 'holdable': ['S23', 'S24']}, {'result': 'refused:P9', 'set_points': {}, 'held_signals': []}), ('control 4', {'route_points': {'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S22']}, {'result': 'protected', 'set_points': {'P9': 'N', 'P7': 'N'}, 'held_signals': []}), ('control 7', {'route_points': {'P2': 'R', 'P1': 'R', 'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P8': 'R', 'P9': 'R'}, 'holdable': ['S22', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: two route points disagree on a flank point', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: flank signal not holdable', {'route_points': {'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': []}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('boundary: no flank signal available', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'N'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P9', 'set_points': {}, 'held_signals': []}), ('boundary: reverse lie flank entry', {'route_points': {'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': ['S23']}), ('control 12', {'route_points': {'P1': 'R', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S22', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'N'}, 'held_signals': []}), ('control 15', {'route_points': {'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'N'}, 'holdable': ['S24']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': []}), ('control 18', {'route_points': {'P3': 'R', 'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P9': 'N'}, 'holdable': ['S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N', 'P8': 'N'}, 'held_signals': []})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: no flank signal available', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'N'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P9', 'set_points': {}, 'held_signals': []}), ('boundary: reverse lie flank entry', {'route_points': {'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': ['S23']}), ('boundary: own conflicting demand with a holdable signal', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S23']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: own conflicting demand without a signal', {'route_points': {'P1': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('control 23', {'route_points': {'P1': 'R', 'P2': 'N', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'R', 'P9': 'R'}, 'held_signals': ['S24']}), ('control 26', {'route_points': {'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P8': 'N'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P9': 'R'}, 'held_signals': []}), ('control 29', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S23']}, {'result': 'protected', 'set_points': {'P7': 'N'}, 'held_signals': ['S23']})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: own conflicting demand with a holdable signal', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S21', 'S23']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('boundary: own conflicting demand without a signal', {'route_points': {'P1': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('boundary: flank point locked in the protecting lie', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: flank point free', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('control 34', {'route_points': {'P3': 'R', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P9': 'N'}, 'holdable': ['S20', 'S21', 'S24']}, {'result': 'protected', 'set_points': {'P8': 'R'}, 'held_signals': ['S20', 'S24']}), ('control 37', {'route_points': {'P2': 'N', 'P1': 'R', 'P3': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P8': 'R'}, 'holdable': ['S21', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'R', 'P9': 'R'}, 'held_signals': []}), ('control 40', {'route_points': {'P3': 'R', 'P1': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P8': 'N'}, 'held_signals': []})], [('regression: same signal held twice', {'route_points': {'P1': 'N', 'P2': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N', 'P9': 'N'}, 'holdable': ['S20', 'S22']}, {'result': 'protected', 'set_points': {'P8': 'N'}, 'held_signals': ['S20', 'S22']}), ('boundary: own conflicting demand without a signal', {'route_points': {'P1': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'refused:P7', 'set_points': {}, 'held_signals': []}), ('boundary: flank point locked in the protecting lie', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: flank point free', {'route_points': {'P1': 'N'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'R', 'P8': 'N'}, 'held_signals': []}), ('boundary: two route points disagree on a flank point', {'route_points': {'P1': 'R', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'N'}, 'held_signals': []}), ('control 45', {'route_points': {'P2': 'N', 'P1': 'N', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'R', 'P8': 'R'}, 'holdable': ['S20', 'S21', 'S23', 'S24']}, {'result': 'refused:P8', 'set_points': {}, 'held_signals': []}), ('control 48', {'route_points': {'P2': 'R', 'P3': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P7': 'N', 'P8': 'N'}, 'holdable': ['S20', 'S21', 'S22']}, {'result': 'protected', 'set_points': {'P9': 'N', 'P7': 'N', 'P8': 'N'}, 'held_signals': []}), ('control 51', {'route_points': {'P3': 'N', 'P2': 'R'}, 'flank': {'P1N': [['P7', 'R', 'S20'], ['P8', 'N', None]], 'P1R': [['P7', 'N', 'S21']], 'P2N': [['P8', 'R', 'S22'], ['P9', 'R', 'S20']], 'P2R': [['P9', 'N', 'S23'], ['P7', 'N', None]], 'P3N': [['P9', 'R', None]], 'P3R': [['P8', 'N', 'S24']]}, 'point_locks': {'P9': 'R'}, 'holdable': ['S20', 'S21', 'S22', 'S23', 'S24']}, {'result': 'protected', 'set_points': {'P7': 'N', 'P9': 'R'}, 'held_signals': ['S23']})]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, 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":"Stipulated toy interlocking contract for a bounded teaching model; it makes no claim of conformance to any railway signalling standard and omits real safety cases. 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-railway_interlocking_logic-flank-protection-held-signal-list","generated_at":"2026-09-29T14:47:51.372712+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Interlocking logic decides whether trains may be given authority; a wrong decision at this point either grants unsafe movements or strands traffic.","repair":"Return held signals sorted and unique.","root_cause":"Held signals are returned in discovery order with duplicates.","sha256":"faa79068329e6009d891ec96ba80cb5685fd5bbf94f5b9f561ef9be81e762a71","title":"Flank protection selection: held signal list · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.423,"exit_code":1,"observations":[{"actual":{"held_signals":["S20","S20","S22"],"result":"protected","set_points":{"P8":"N"}},"check":"regression: same signal held twice","expected":{"held_signals":["S20","S22"],"result":"protected","set_points":{"P8":"N"}},"passed":false},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"check":"boundary: flank point locked in the protecting lie","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"check":"boundary: flank point free","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"check":"boundary: two route points disagree on a flank point","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"refused:P7","set_points":{}},"check":"boundary: flank signal not holdable","expected":{"held_signals":[],"result":"refused:P7","set_points":{}},"passed":true},{"actual":{"held_signals":[],"result":"refused:P9","set_points":{}},"check":"control 1","expected":{"held_signals":[],"result":"refused:P9","set_points":{}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"check":"control 4","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"refused:P7","set_points":{}},"check":"control 7","expected":{"held_signals":[],"result":"refused:P7","set_points":{}},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: same signal held twice\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P8\": \"N\"}, \"held_signals\": [\"S20\", \"S20\", \"S22\"]}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P8\": \"N\"}, \"held_signals\": [\"S20\", \"S22\"]}, \"passed\": false}, {\"check\": \"boundary: flank point locked in the protecting lie\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"boundary: flank point free\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"boundary: two route points disagree on a flank point\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"N\", \"P9\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"N\", \"P9\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"boundary: flank signal not holdable\", \"actual\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"expected\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"control 1\", \"actual\": {\"result\": \"refused:P9\", \"set_points\": {}, \"held_signals\": []}, \"expected\": {\"result\": \"refused:P9\", \"set_points\": {}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P9\": \"N\", \"P7\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P9\": \"N\", \"P7\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"expected\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.161,"exit_code":1,"observations":[{"actual":{"held_signals":["S20","S22","S20"],"result":"protected","set_points":{"P8":"N"}},"check":"regression: same signal held twice","expected":{"held_signals":["S20","S22"],"result":"protected","set_points":{"P8":"N"}},"passed":false},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"check":"boundary: flank point locked in the protecting lie","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"check":"boundary: flank point free","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"check":"boundary: two route points disagree on a flank point","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"refused:P7","set_points":{}},"check":"boundary: flank signal not holdable","expected":{"held_signals":[],"result":"refused:P7","set_points":{}},"passed":true},{"actual":{"held_signals":[],"result":"refused:P9","set_points":{}},"check":"control 1","expected":{"held_signals":[],"result":"refused:P9","set_points":{}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"check":"control 4","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"refused:P7","set_points":{}},"check":"control 7","expected":{"held_signals":[],"result":"refused:P7","set_points":{}},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: same signal held twice\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P8\": \"N\"}, \"held_signals\": [\"S20\", \"S22\", \"S20\"]}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P8\": \"N\"}, \"held_signals\": [\"S20\", \"S22\"]}, \"passed\": false}, {\"check\": \"boundary: flank point locked in the protecting lie\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"boundary: flank point free\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"boundary: two route points disagree on a flank point\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"N\", \"P9\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"N\", \"P9\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"boundary: flank signal not holdable\", \"actual\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"expected\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"control 1\", \"actual\": {\"result\": \"refused:P9\", \"set_points\": {}, \"held_signals\": []}, \"expected\": {\"result\": \"refused:P9\", \"set_points\": {}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P9\": \"N\", \"P7\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P9\": \"N\", \"P7\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"expected\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.868,"exit_code":0,"observations":[{"actual":{"held_signals":["S20","S22"],"result":"protected","set_points":{"P8":"N"}},"check":"regression: same signal held twice","expected":{"held_signals":["S20","S22"],"result":"protected","set_points":{"P8":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"check":"boundary: flank point locked in the protecting lie","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"check":"boundary: flank point free","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"R","P8":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"check":"boundary: two route points disagree on a flank point","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"refused:P7","set_points":{}},"check":"boundary: flank signal not holdable","expected":{"held_signals":[],"result":"refused:P7","set_points":{}},"passed":true},{"actual":{"held_signals":[],"result":"refused:P9","set_points":{}},"check":"control 1","expected":{"held_signals":[],"result":"refused:P9","set_points":{}},"passed":true},{"actual":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"check":"control 4","expected":{"held_signals":[],"result":"protected","set_points":{"P7":"N","P9":"N"}},"passed":true},{"actual":{"held_signals":[],"result":"refused:P7","set_points":{}},"check":"control 7","expected":{"held_signals":[],"result":"refused:P7","set_points":{}},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: same signal held twice\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P8\": \"N\"}, \"held_signals\": [\"S20\", \"S22\"]}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P8\": \"N\"}, \"held_signals\": [\"S20\", \"S22\"]}, \"passed\": true}, {\"check\": \"boundary: flank point locked in the protecting lie\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"boundary: flank point free\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"R\", \"P8\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"boundary: two route points disagree on a flank point\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"N\", \"P9\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P7\": \"N\", \"P9\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"boundary: flank signal not holdable\", \"actual\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"expected\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"control 1\", \"actual\": {\"result\": \"refused:P9\", \"set_points\": {}, \"held_signals\": []}, \"expected\": {\"result\": \"refused:P9\", \"set_points\": {}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"result\": \"protected\", \"set_points\": {\"P9\": \"N\", \"P7\": \"N\"}, \"held_signals\": []}, \"expected\": {\"result\": \"protected\", \"set_points\": {\"P9\": \"N\", \"P7\": \"N\"}, \"held_signals\": []}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"expected\": {\"result\": \"refused:P7\", \"set_points\": {}, \"held_signals\": []}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}