{"abstract":"Signals with a failed red filament go dark even while showing a proceed aspect.","category":"Railway interlocking logic","checks":8,"contract":"Signals 0..n-1 each protect one block; occupied[i] is the block after signal i. Evaluate from the far end: a signal shows R if its block is occupied, else Y if the next signal is R, R if the next signal is DARK, YY if the next is Y, otherwise G. Beyond the last signal the next aspect is G on an open line and R at a buffer stop. A diverging signal is capped at Y. A signal whose red lamp has failed shows DARK instead of R.","contract_signature":"x","evaluation_group":"w2-railway_interlocking_logic-four-aspect-chain","failed_approach":"Extending the substitution to Y still blanks cautions that use a healthy yellow lamp.","family":"w2-railway_interlocking_logic-four-aspect-chain-failed-filament-scope","id":"FA-66871","implementations":{"attempt":{"sha256":"649034c817cadc2a4459fccf06ae0e5e0aac76fe17d26c6bf8b8be843b252fde","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    occ = x['occupied']\n    n = len(occ)\n    fail = set(x['lamp_fail'])\n    div = set(x['diverging'])\n    nxt = 'G' if x['open_end'] else 'R'\n    out = [None] * n\n    for i in range(n - 1, -1, -1):\n        if occ[i]:\n            a = 'R'\n        elif nxt in ('R', 'DARK'):\n            a = 'R' if nxt == 'DARK' else 'Y'\n        elif nxt == 'Y':\n            a = 'YY'\n        else:\n            a = 'G'\n        if i in div and a in ('YY', 'G'):\n            a = 'Y'\n        if a in ('R', 'Y') and i in fail:\n            a = 'DARK'\n        out[i] = a\n        nxt = a\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: failed red lamp on a clear signal', {'occupied': [False, False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['G', 'G', 'G']), ('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 2', {'occupied': [False, True, False, False, False, False, True], 'lamp_fail': [2, 4], 'diverging': [1], 'open_end': False}, ['Y', 'R', 'G', 'G', 'YY', 'Y', 'R']), ('sampled regression 1', {'occupied': [False, True, False, False, False, False], 'lamp_fail': [0], 'diverging': [], 'open_end': False}, ['Y', 'R', 'G', 'G', 'YY', 'Y']), ('boundary: dark signal ahead', {'occupied': [False, True], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['R', 'DARK']), ('control 4', {'occupied': [False, True], 'lamp_fail': [], 'diverging': [], 'open_end': False}, ['Y', 'R']), ('control 7', {'occupied': [True, False, False, True], 'lamp_fail': [], 'diverging': [3], 'open_end': True}, ['R', 'YY', 'Y', 'R']), ('control 10', {'occupied': [True, False], 'lamp_fail': [], 'diverging': [], 'open_end': True}, ['R', 'G'])], [('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 21', {'occupied': [True, False, True, False, False, False], 'lamp_fail': [1, 5], 'diverging': [1, 3], 'open_end': True}, ['R', 'Y', 'R', 'Y', 'G', 'G']), ('sampled regression 36', {'occupied': [False, False], 'lamp_fail': [0], 'diverging': [0, 1], 'open_end': True}, ['Y', 'Y']), ('boundary: diverging junction behind a double yellow', {'occupied': [False, False, True], 'lamp_fail': [], 'diverging': [0], 'open_end': True}, ['Y', 'Y', 'R']), ('boundary: diverging junction behind a green', {'occupied': [False, False, False], 'lamp_fail': [], 'diverging': [0], 'open_end': True}, ['Y', 'G', 'G']), ('sampled regression 12', {'occupied': [False, False], 'lamp_fail': [0], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('control 15', {'occupied': [False, True], 'lamp_fail': [], 'diverging': [], 'open_end': True}, ['Y', 'R']), ('control 18', {'occupied': [False, False], 'lamp_fail': [], 'diverging': [], 'open_end': True}, ['G', 'G'])], [('regression: failed red lamp on a clear signal', {'occupied': [False, False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['G', 'G', 'G']), ('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 37', {'occupied': [False, False, False, False], 'lamp_fail': [0], 'diverging': [0, 3], 'open_end': True}, ['Y', 'G', 'YY', 'Y']), ('sampled regression 53', {'occupied': [False, False, False, True, False, False, False], 'lamp_fail': [2], 'diverging': [0], 'open_end': True}, ['Y', 'YY', 'Y', 'R', 'G', 'G', 'G']), ('boundary: buffer stop at the end', {'occupied': [False, False, False], 'lamp_fail': [], 'diverging': [], 'open_end': False}, ['G', 'YY', 'Y']), ('control 23', {'occupied': [True, False, True], 'lamp_fail': [], 'diverging': [0], 'open_end': True}, ['R', 'Y', 'R']), ('control 26', {'occupied': [False, False, False, True], 'lamp_fail': [], 'diverging': [3], 'open_end': False}, ['G', 'YY', 'Y', 'R']), ('control 29', {'occupied': [False, True], 'lamp_fail': [], 'diverging': [], 'open_end': False}, ['Y', 'R'])], [('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 48', {'occupied': [False, False, False, False], 'lamp_fail': [1], 'diverging': [2], 'open_end': True}, ['G', 'YY', 'Y', 'G']), ('boundary: train two blocks ahead', {'occupied': [False, False, True, False], 'lamp_fail': [], 'diverging': [], 'open_end': True}, ['YY', 'Y', 'R', 'G']), ('boundary: dark signal ahead', {'occupied': [False, True], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['R', 'DARK']), ('regression: failed red lamp on a clear signal', {'occupied': [False, False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['G', 'G', 'G']), ('control 34', {'occupied': [False, False, False, False, False, False, False], 'lamp_fail': [], 'diverging': [1], 'open_end': False}, ['YY', 'Y', 'G', 'G', 'G', 'YY', 'Y']), ('sampled regression 37', {'occupied': [False, False, False, False], 'lamp_fail': [0], 'diverging': [0, 3], 'open_end': True}, ['Y', 'G', 'YY', 'Y']), ('sampled regression 40', {'occupied': [False, False, False, False], 'lamp_fail': [0], 'diverging': [0], 'open_end': True}, ['Y', 'G', 'G', 'G'])], [('regression: failed red lamp on a clear signal', {'occupied': [False, False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['G', 'G', 'G']), ('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 68', {'occupied': [False, True, False, False, False], 'lamp_fail': [2, 3], 'diverging': [], 'open_end': False}, ['Y', 'R', 'G', 'YY', 'Y']), ('sampled regression 24', {'occupied': [False, False, False, True], 'lamp_fail': [1], 'diverging': [1], 'open_end': True}, ['YY', 'Y', 'Y', 'R']), ('boundary: dark signal ahead', {'occupied': [False, True], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['R', 'DARK']), ('control 45', {'occupied': [True, False, False, True], 'lamp_fail': [3], 'diverging': [1], 'open_end': True}, ['R', 'Y', 'R', 'DARK']), ('sampled regression 48', {'occupied': [False, False, False, False], 'lamp_fail': [1], 'diverging': [2], 'open_end': True}, ['G', 'YY', 'Y', 'G']), ('control 51', {'occupied': [False, False, False, True], 'lamp_fail': [], 'diverging': [0, 2, 3], 'open_end': True}, ['Y', 'YY', 'Y', 'R'])]]\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":"59c5be39f6263dd73498a2e34867f85766620e8c3c61931dfd5f3d7d23fe847b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    occ = x['occupied']\n    n = len(occ)\n    fail = set(x['lamp_fail'])\n    div = set(x['diverging'])\n    nxt = 'G' if x['open_end'] else 'R'\n    out = [None] * n\n    for i in range(n - 1, -1, -1):\n        if occ[i]:\n            a = 'R'\n        elif nxt in ('R', 'DARK'):\n            a = 'R' if nxt == 'DARK' else 'Y'\n        elif nxt == 'Y':\n            a = 'YY'\n        else:\n            a = 'G'\n        if i in div and a in ('YY', 'G'):\n            a = 'Y'\n        if i in fail:\n            a = 'DARK'\n        out[i] = a\n        nxt = a\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: failed red lamp on a clear signal', {'occupied': [False, False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['G', 'G', 'G']), ('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 2', {'occupied': [False, True, False, False, False, False, True], 'lamp_fail': [2, 4], 'diverging': [1], 'open_end': False}, ['Y', 'R', 'G', 'G', 'YY', 'Y', 'R']), ('sampled regression 1', {'occupied': [False, True, False, False, False, False], 'lamp_fail': [0], 'diverging': [], 'open_end': False}, ['Y', 'R', 'G', 'G', 'YY', 'Y']), ('boundary: dark signal ahead', {'occupied': [False, True], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['R', 'DARK']), ('control 4', {'occupied': [False, True], 'lamp_fail': [], 'diverging': [], 'open_end': False}, ['Y', 'R']), ('control 7', {'occupied': [True, False, False, True], 'lamp_fail': [], 'diverging': [3], 'open_end': True}, ['R', 'YY', 'Y', 'R']), ('control 10', {'occupied': [True, False], 'lamp_fail': [], 'diverging': [], 'open_end': True}, ['R', 'G'])], [('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 21', {'occupied': [True, False, True, False, False, False], 'lamp_fail': [1, 5], 'diverging': [1, 3], 'open_end': True}, ['R', 'Y', 'R', 'Y', 'G', 'G']), ('sampled regression 36', {'occupied': [False, False], 'lamp_fail': [0], 'diverging': [0, 1], 'open_end': True}, ['Y', 'Y']), ('boundary: diverging junction behind a double yellow', {'occupied': [False, False, True], 'lamp_fail': [], 'diverging': [0], 'open_end': True}, ['Y', 'Y', 'R']), ('boundary: diverging junction behind a green', {'occupied': [False, False, False], 'lamp_fail': [], 'diverging': [0], 'open_end': True}, ['Y', 'G', 'G']), ('sampled regression 12', {'occupied': [False, False], 'lamp_fail': [0], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('control 15', {'occupied': [False, True], 'lamp_fail': [], 'diverging': [], 'open_end': True}, ['Y', 'R']), ('control 18', {'occupied': [False, False], 'lamp_fail': [], 'diverging': [], 'open_end': True}, ['G', 'G'])], [('regression: failed red lamp on a clear signal', {'occupied': [False, False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['G', 'G', 'G']), ('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 37', {'occupied': [False, False, False, False], 'lamp_fail': [0], 'diverging': [0, 3], 'open_end': True}, ['Y', 'G', 'YY', 'Y']), ('sampled regression 53', {'occupied': [False, False, False, True, False, False, False], 'lamp_fail': [2], 'diverging': [0], 'open_end': True}, ['Y', 'YY', 'Y', 'R', 'G', 'G', 'G']), ('boundary: buffer stop at the end', {'occupied': [False, False, False], 'lamp_fail': [], 'diverging': [], 'open_end': False}, ['G', 'YY', 'Y']), ('control 23', {'occupied': [True, False, True], 'lamp_fail': [], 'diverging': [0], 'open_end': True}, ['R', 'Y', 'R']), ('control 26', {'occupied': [False, False, False, True], 'lamp_fail': [], 'diverging': [3], 'open_end': False}, ['G', 'YY', 'Y', 'R']), ('control 29', {'occupied': [False, True], 'lamp_fail': [], 'diverging': [], 'open_end': False}, ['Y', 'R'])], [('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 48', {'occupied': [False, False, False, False], 'lamp_fail': [1], 'diverging': [2], 'open_end': True}, ['G', 'YY', 'Y', 'G']), ('boundary: train two blocks ahead', {'occupied': [False, False, True, False], 'lamp_fail': [], 'diverging': [], 'open_end': True}, ['YY', 'Y', 'R', 'G']), ('boundary: dark signal ahead', {'occupied': [False, True], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['R', 'DARK']), ('regression: failed red lamp on a clear signal', {'occupied': [False, False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['G', 'G', 'G']), ('control 34', {'occupied': [False, False, False, False, False, False, False], 'lamp_fail': [], 'diverging': [1], 'open_end': False}, ['YY', 'Y', 'G', 'G', 'G', 'YY', 'Y']), ('sampled regression 37', {'occupied': [False, False, False, False], 'lamp_fail': [0], 'diverging': [0, 3], 'open_end': True}, ['Y', 'G', 'YY', 'Y']), ('sampled regression 40', {'occupied': [False, False, False, False], 'lamp_fail': [0], 'diverging': [0], 'open_end': True}, ['Y', 'G', 'G', 'G'])], [('regression: failed red lamp on a clear signal', {'occupied': [False, False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['G', 'G', 'G']), ('regression: dark signal at the buffer end', {'occupied': [False, False], 'lamp_fail': [1], 'diverging': [], 'open_end': False}, ['YY', 'Y']), ('sampled regression 68', {'occupied': [False, True, False, False, False], 'lamp_fail': [2, 3], 'diverging': [], 'open_end': False}, ['Y', 'R', 'G', 'YY', 'Y']), ('sampled regression 24', {'occupied': [False, False, False, True], 'lamp_fail': [1], 'diverging': [1], 'open_end': True}, ['YY', 'Y', 'Y', 'R']), ('boundary: dark signal ahead', {'occupied': [False, True], 'lamp_fail': [1], 'diverging': [], 'open_end': True}, ['R', 'DARK']), ('control 45', {'occupied': [True, False, False, True], 'lamp_fail': [3], 'diverging': [1], 'open_end': True}, ['R', 'Y', 'R', 'DARK']), ('sampled regression 48', {'occupied': [False, False, False, False], 'lamp_fail': [1], 'diverging': [2], 'open_end': True}, ['G', 'YY', 'Y', 'G']), ('control 51', {'occupied': [False, False, False, True], 'lamp_fail': [], 'diverging': [0, 2, 3], 'open_end': True}, ['Y', 'YY', 'Y', 'R'])]]\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-four-aspect-chain-failed-filament-scope","generated_at":"2026-09-29T14:47:47.522138+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.","root_cause":"The red-lamp failure replaces every aspect instead of only the red aspect.","sha256":"4997b9baa92135a5fb791043bef939b2361135a64f3263316ea41d3300c6e004","title":"Four-aspect signal chain evaluation: failed filament scope · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":38.663,"exit_code":1,"observations":[{"actual":["G","G","G"],"check":"regression: failed red lamp on a clear signal","expected":["G","G","G"],"passed":true},{"actual":["R","DARK"],"check":"regression: dark signal at the buffer end","expected":["YY","Y"],"passed":false},{"actual":["Y","R","G","G","YY","Y","R"],"check":"sampled regression 2","expected":["Y","R","G","G","YY","Y","R"],"passed":true},{"actual":["DARK","R","G","G","YY","Y"],"check":"sampled regression 1","expected":["Y","R","G","G","YY","Y"],"passed":false},{"actual":["R","DARK"],"check":"boundary: dark signal ahead","expected":["R","DARK"],"passed":true},{"actual":["Y","R"],"check":"control 4","expected":["Y","R"],"passed":true},{"actual":["R","YY","Y","R"],"check":"control 7","expected":["R","YY","Y","R"],"passed":true},{"actual":["R","G"],"check":"control 10","expected":["R","G"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: failed red lamp on a clear signal\", \"actual\": [\"G\", \"G\", \"G\"], \"expected\": [\"G\", \"G\", \"G\"], \"passed\": true}, {\"check\": \"regression: dark signal at the buffer end\", \"actual\": [\"R\", \"DARK\"], \"expected\": [\"YY\", \"Y\"], \"passed\": false}, {\"check\": \"sampled regression 2\", \"actual\": [\"Y\", \"R\", \"G\", \"G\", \"YY\", \"Y\", \"R\"], \"expected\": [\"Y\", \"R\", \"G\", \"G\", \"YY\", \"Y\", \"R\"], \"passed\": true}, {\"check\": \"sampled regression 1\", \"actual\": [\"DARK\", \"R\", \"G\", \"G\", \"YY\", \"Y\"], \"expected\": [\"Y\", \"R\", \"G\", \"G\", \"YY\", \"Y\"], \"passed\": false}, {\"check\": \"boundary: dark signal ahead\", \"actual\": [\"R\", \"DARK\"], \"expected\": [\"R\", \"DARK\"], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [\"Y\", \"R\"], \"expected\": [\"Y\", \"R\"], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [\"R\", \"YY\", \"Y\", \"R\"], \"expected\": [\"R\", \"YY\", \"Y\", \"R\"], \"passed\": true}, {\"check\": \"control 10\", \"actual\": [\"R\", \"G\"], \"expected\": [\"R\", \"G\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.187,"exit_code":1,"observations":[{"actual":["R","DARK","G"],"check":"regression: failed red lamp on a clear signal","expected":["G","G","G"],"passed":false},{"actual":["R","DARK"],"check":"regression: dark signal at the buffer end","expected":["YY","Y"],"passed":false},{"actual":["Y","R","DARK","R","DARK","Y","R"],"check":"sampled regression 2","expected":["Y","R","G","G","YY","Y","R"],"passed":false},{"actual":["DARK","R","G","G","YY","Y"],"check":"sampled regression 1","expected":["Y","R","G","G","YY","Y"],"passed":false},{"actual":["R","DARK"],"check":"boundary: dark signal ahead","expected":["R","DARK"],"passed":true},{"actual":["Y","R"],"check":"control 4","expected":["Y","R"],"passed":true},{"actual":["R","YY","Y","R"],"check":"control 7","expected":["R","YY","Y","R"],"passed":true},{"actual":["R","G"],"check":"control 10","expected":["R","G"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: failed red lamp on a clear signal\", \"actual\": [\"R\", \"DARK\", \"G\"], \"expected\": [\"G\", \"G\", \"G\"], \"passed\": false}, {\"check\": \"regression: dark signal at the buffer end\", \"actual\": [\"R\", \"DARK\"], \"expected\": [\"YY\", \"Y\"], \"passed\": false}, {\"check\": \"sampled regression 2\", \"actual\": [\"Y\", \"R\", \"DARK\", \"R\", \"DARK\", \"Y\", \"R\"], \"expected\": [\"Y\", \"R\", \"G\", \"G\", \"YY\", \"Y\", \"R\"], \"passed\": false}, {\"check\": \"sampled regression 1\", \"actual\": [\"DARK\", \"R\", \"G\", \"G\", \"YY\", \"Y\"], \"expected\": [\"Y\", \"R\", \"G\", \"G\", \"YY\", \"Y\"], \"passed\": false}, {\"check\": \"boundary: dark signal ahead\", \"actual\": [\"R\", \"DARK\"], \"expected\": [\"R\", \"DARK\"], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [\"Y\", \"R\"], \"expected\": [\"Y\", \"R\"], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [\"R\", \"YY\", \"Y\", \"R\"], \"expected\": [\"R\", \"YY\", \"Y\", \"R\"], \"passed\": true}, {\"check\": \"control 10\", \"actual\": [\"R\", \"G\"], \"expected\": [\"R\", \"G\"], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}