{"abstract":"Overwriting a description in an occupied berth goes unreported.","category":"Railway interlocking logic","checks":8,"contract":"A train describer has berths 0..n-1. interpose writes a headcode, cancel blanks a berth. step i moves the description from berth i to i+1 (or out of the area from the last berth, recorded in exited); stepping an empty berth carries the unknown description ????. Stepping onto a filled berth records a clash at the destination and the stepped description overwrites it. The source berth is always blanked.","contract_signature":"x","evaluation_group":"w2-railway_interlocking_logic-describer-berth-stepping","failed_approach":"Ignoring equal headcodes misses two distinct trains carrying the same headcode.","family":"w2-railway_interlocking_logic-describer-berth-stepping-clash-detection","id":"FA-67146","implementations":{"attempt":{"sha256":"addf0138164b161e44cca92a2b69ec6b07c543cb9b7c627c43277a623fde679a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    n = x['berths']\n    b = [None] * n\n    clashes = []\n    exited = []\n    for ev in x['events']:\n        kind = ev[0]\n        if kind == 'interpose':\n            b[ev[1]] = ev[2]\n        elif kind == 'cancel':\n            b[ev[1]] = None\n        elif kind == 'step':\n            i = ev[1]\n            tid = b[i] if b[i] is not None else '????'\n            b[i] = None\n            if i == n - 1:\n                exited.append(tid)\n            else:\n                if b[i + 1] is not None and b[i + 1] != tid:\n                    clashes.append(i + 1)\n                b[i + 1] = tid\n    return {'berths': b, 'clashes': clashes, 'exited': exited}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: clash with a different train', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '2B17'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 6', {'berths': 4, 'events': [['interpose', 1, '1A01'], ['step', 2], ['interpose', 1, '9Z10'], ['interpose', 1, '1A01'], ['step', 0], ['interpose', 3, '9Z10'], ['step', 1], ['step', 2], ['interpose', 1, '1A01']]}, {'berths': [None, '1A01', None, '????'], 'clashes': [1, 3], 'exited': []}), ('sampled regression 2', {'berths': 3, 'events': [['interpose', 2, '9Z10'], ['interpose', 1, '9Z10'], ['step', 1], ['interpose', 1, '2B17'], ['interpose', 2, '9Z10'], ['interpose', 2, '5X99']]}, {'berths': [None, '2B17', '5X99'], 'clashes': [2], 'exited': []}), ('boundary: step from an empty berth', {'berths': 3, 'events': [['step', 0]]}, {'berths': [None, '????', None], 'clashes': [], 'exited': []}), ('control 1', {'berths': 5, 'events': [['cancel', 1], ['step', 3], ['step', 4], ['step', 1], ['interpose', 1, '1A01'], ['cancel', 2], ['interpose', 0, '2B17'], ['step', 4]]}, {'berths': ['2B17', '1A01', None, None, None], 'clashes': [], 'exited': ['????', '????']}), ('control 4', {'berths': 4, 'events': [['step', 1], ['cancel', 0], ['step', 0]]}, {'berths': [None, '????', '????', None], 'clashes': [], 'exited': []}), ('sampled regression 7', {'berths': 4, 'events': [['interpose', 3, '5X99'], ['step', 1], ['step', 1]]}, {'berths': [None, None, '????', '5X99'], 'clashes': [2], 'exited': []})], [('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 14', {'berths': 4, 'events': [['step', 0], ['interpose', 0, '1A01'], ['step', 0], ['interpose', 3, '1A01'], ['interpose', 0, '1A01'], ['interpose', 3, '9Z10'], ['interpose', 2, '2B17'], ['cancel', 0], ['step', 3]]}, {'berths': [None, '1A01', '2B17', None], 'clashes': [1], 'exited': ['9Z10']}), ('sampled regression 16', {'berths': 4, 'events': [['step', 0], ['cancel', 3], ['step', 0], ['interpose', 3, '5X99'], ['interpose', 0, '9Z10'], ['step', 3], ['interpose', 2, '5X99'], ['step', 2]]}, {'berths': ['9Z10', '????', None, '5X99'], 'clashes': [1], 'exited': ['5X99']}), ('boundary: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('boundary: unknown train leaves the area', {'berths': 2, 'events': [['step', 1]]}, {'berths': [None, None], 'clashes': [], 'exited': ['????']}), ('sampled regression 12', {'berths': 3, 'events': [['step', 1], ['interpose', 1, '5X99'], ['cancel', 0], ['cancel', 1], ['step', 2], ['step', 0], ['step', 0]]}, {'berths': [None, '????', None], 'clashes': [1], 'exited': ['????']}), ('control 15', {'berths': 4, 'events': [['step', 0], ['interpose', 3, '5X99'], ['cancel', 2]]}, {'berths': [None, '????', None, '5X99'], 'clashes': [], 'exited': []}), ('sampled regression 18', {'berths': 3, 'events': [['interpose', 2, '9Z10'], ['cancel', 2], ['step', 0], ['step', 0], ['cancel', 1], ['step', 0], ['step', 1], ['step', 0]]}, {'berths': [None, '????', '????'], 'clashes': [1], 'exited': []})], [('regression: clash with a different train', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '2B17'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 26', {'berths': 5, 'events': [['step', 1], ['cancel', 3], ['interpose', 4, '5X99'], ['cancel', 2], ['interpose', 1, '9Z10'], ['interpose', 3, '1A01'], ['step', 3], ['step', 2], ['step', 1]]}, {'berths': [None, None, '9Z10', '????', '1A01'], 'clashes': [4], 'exited': []}), ('sampled regression 30', {'berths': 4, 'events': [['step', 0], ['step', 1], ['step', 3], ['step', 1], ['interpose', 2, '5X99'], ['interpose', 1, '5X99']]}, {'berths': [None, '5X99', '5X99', None], 'clashes': [2], 'exited': ['????']}), ('boundary: stepping from the penultimate berth', {'berths': 4, 'events': [['interpose', 2, '5X99'], ['step', 2]]}, {'berths': [None, None, None, '5X99'], 'clashes': [], 'exited': []}), ('sampled regression 23', {'berths': 3, 'events': [['interpose', 2, '9Z10'], ['step', 1], ['step', 2], ['cancel', 1], ['interpose', 0, '1A01'], ['step', 2]]}, {'berths': ['1A01', None, None], 'clashes': [2], 'exited': ['????', '????']}), ('sampled regression 29', {'berths': 5, 'events': [['interpose', 4, '1A01'], ['cancel', 4], ['step', 1], ['interpose', 1, '2B17'], ['step', 3], ['cancel', 3], ['interpose', 2, '9Z10'], ['step', 1]]}, {'berths': [None, None, '2B17', None, '????'], 'clashes': [2], 'exited': []}), ('sampled regression 32', {'berths': 3, 'events': [['step', 0], ['step', 0], ['interpose', 1, '2B17'], ['step', 1], ['interpose', 2, '5X99'], ['interpose', 1, '2B17'], ['step', 2], ['cancel', 0], ['step', 0]]}, {'berths': [None, '????', None], 'clashes': [1, 1], 'exited': ['5X99']})], [('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 34', {'berths': 3, 'events': [['step', 2], ['step', 0], ['interpose', 2, '9Z10'], ['step', 1], ['cancel', 1], ['step', 0], ['step', 2]]}, {'berths': [None, '????', None], 'clashes': [2], 'exited': ['????', '????']}), ('sampled regression 44', {'berths': 3, 'events': [['step', 1], ['step', 1], ['interpose', 1, '9Z10']]}, {'berths': [None, '9Z10', '????'], 'clashes': [2], 'exited': []}), ('boundary: stepping from the penultimate berth', {'berths': 4, 'events': [['interpose', 2, '5X99'], ['step', 2]]}, {'berths': [None, None, None, '5X99'], 'clashes': [], 'exited': []}), ('boundary: step from an empty berth', {'berths': 3, 'events': [['step', 0]]}, {'berths': [None, '????', None], 'clashes': [], 'exited': []}), ('control 37', {'berths': 4, 'events': [['step', 1], ['cancel', 1], ['step', 3], ['interpose', 0, '9Z10']]}, {'berths': ['9Z10', None, '????', None], 'clashes': [], 'exited': ['????']}), ('sampled regression 40', {'berths': 4, 'events': [['step', 3], ['step', 1], ['interpose', 3, '5X99'], ['step', 2], ['interpose', 2, '5X99'], ['step', 3], ['step', 0], ['step', 1]]}, {'berths': [None, None, '????', None], 'clashes': [3, 2], 'exited': ['????', '????']}), ('control 43', {'berths': 4, 'events': [['interpose', 2, '9Z10'], ['interpose', 3, '5X99'], ['step', 0], ['interpose', 2, '1A01']]}, {'berths': [None, '????', '1A01', '5X99'], 'clashes': [], 'exited': []})], [('regression: clash with a different train', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '2B17'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 48', {'berths': 4, 'events': [['step', 2], ['step', 2], ['step', 0], ['step', 0], ['interpose', 0, '9Z10'], ['interpose', 1, '1A01'], ['cancel', 2], ['step', 2]]}, {'berths': ['9Z10', '1A01', None, '????'], 'clashes': [3, 1, 3], 'exited': []}), ('sampled regression 55', {'berths': 3, 'events': [['interpose', 1, '1A01'], ['step', 0], ['step', 2], ['step', 2], ['step', 2], ['step', 0], ['step', 0], ['interpose', 1, '1A01']]}, {'berths': [None, '1A01', None], 'clashes': [1, 1, 1], 'exited': ['????', '????', '????']}), ('boundary: normal stepping', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['step', 0], ['step', 1]]}, {'berths': [None, None, '1A01'], 'clashes': [], 'exited': []}), ('control 45', {'berths': 3, 'events': [['interpose', 0, '9Z10'], ['interpose', 0, '5X99'], ['interpose', 0, '2B17']]}, {'berths': ['2B17', None, None], 'clashes': [], 'exited': []}), ('sampled regression 51', {'berths': 3, 'events': [['step', 2], ['step', 2], ['interpose', 1, '5X99'], ['interpose', 1, '9Z10'], ['step', 0], ['step', 0], ['interpose', 2, '9Z10'], ['step', 0], ['step', 0]]}, {'berths': [None, '????', '9Z10'], 'clashes': [1, 1, 1, 1], 'exited': ['????', '????']}), ('sampled regression 54', {'berths': 3, 'events': [['step', 2], ['step', 2], ['step', 2], ['step', 1], ['interpose', 2, '5X99'], ['step', 0], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [2], 'exited': ['????', '????', '????', '????']})]]\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":"a1af369e4aecadac713e896790720de28918c40f37523d36d32cdc38641b7447","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    n = x['berths']\n    b = [None] * n\n    clashes = []\n    exited = []\n    for ev in x['events']:\n        kind = ev[0]\n        if kind == 'interpose':\n            b[ev[1]] = ev[2]\n        elif kind == 'cancel':\n            b[ev[1]] = None\n        elif kind == 'step':\n            i = ev[1]\n            tid = b[i] if b[i] is not None else '????'\n            b[i] = None\n            if i == n - 1:\n                exited.append(tid)\n            else:\n                b[i + 1] = tid\n    return {'berths': b, 'clashes': clashes, 'exited': exited}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: clash with a different train', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '2B17'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 6', {'berths': 4, 'events': [['interpose', 1, '1A01'], ['step', 2], ['interpose', 1, '9Z10'], ['interpose', 1, '1A01'], ['step', 0], ['interpose', 3, '9Z10'], ['step', 1], ['step', 2], ['interpose', 1, '1A01']]}, {'berths': [None, '1A01', None, '????'], 'clashes': [1, 3], 'exited': []}), ('sampled regression 2', {'berths': 3, 'events': [['interpose', 2, '9Z10'], ['interpose', 1, '9Z10'], ['step', 1], ['interpose', 1, '2B17'], ['interpose', 2, '9Z10'], ['interpose', 2, '5X99']]}, {'berths': [None, '2B17', '5X99'], 'clashes': [2], 'exited': []}), ('boundary: step from an empty berth', {'berths': 3, 'events': [['step', 0]]}, {'berths': [None, '????', None], 'clashes': [], 'exited': []}), ('control 1', {'berths': 5, 'events': [['cancel', 1], ['step', 3], ['step', 4], ['step', 1], ['interpose', 1, '1A01'], ['cancel', 2], ['interpose', 0, '2B17'], ['step', 4]]}, {'berths': ['2B17', '1A01', None, None, None], 'clashes': [], 'exited': ['????', '????']}), ('control 4', {'berths': 4, 'events': [['step', 1], ['cancel', 0], ['step', 0]]}, {'berths': [None, '????', '????', None], 'clashes': [], 'exited': []}), ('sampled regression 7', {'berths': 4, 'events': [['interpose', 3, '5X99'], ['step', 1], ['step', 1]]}, {'berths': [None, None, '????', '5X99'], 'clashes': [2], 'exited': []})], [('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 14', {'berths': 4, 'events': [['step', 0], ['interpose', 0, '1A01'], ['step', 0], ['interpose', 3, '1A01'], ['interpose', 0, '1A01'], ['interpose', 3, '9Z10'], ['interpose', 2, '2B17'], ['cancel', 0], ['step', 3]]}, {'berths': [None, '1A01', '2B17', None], 'clashes': [1], 'exited': ['9Z10']}), ('sampled regression 16', {'berths': 4, 'events': [['step', 0], ['cancel', 3], ['step', 0], ['interpose', 3, '5X99'], ['interpose', 0, '9Z10'], ['step', 3], ['interpose', 2, '5X99'], ['step', 2]]}, {'berths': ['9Z10', '????', None, '5X99'], 'clashes': [1], 'exited': ['5X99']}), ('boundary: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('boundary: unknown train leaves the area', {'berths': 2, 'events': [['step', 1]]}, {'berths': [None, None], 'clashes': [], 'exited': ['????']}), ('sampled regression 12', {'berths': 3, 'events': [['step', 1], ['interpose', 1, '5X99'], ['cancel', 0], ['cancel', 1], ['step', 2], ['step', 0], ['step', 0]]}, {'berths': [None, '????', None], 'clashes': [1], 'exited': ['????']}), ('control 15', {'berths': 4, 'events': [['step', 0], ['interpose', 3, '5X99'], ['cancel', 2]]}, {'berths': [None, '????', None, '5X99'], 'clashes': [], 'exited': []}), ('sampled regression 18', {'berths': 3, 'events': [['interpose', 2, '9Z10'], ['cancel', 2], ['step', 0], ['step', 0], ['cancel', 1], ['step', 0], ['step', 1], ['step', 0]]}, {'berths': [None, '????', '????'], 'clashes': [1], 'exited': []})], [('regression: clash with a different train', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '2B17'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 26', {'berths': 5, 'events': [['step', 1], ['cancel', 3], ['interpose', 4, '5X99'], ['cancel', 2], ['interpose', 1, '9Z10'], ['interpose', 3, '1A01'], ['step', 3], ['step', 2], ['step', 1]]}, {'berths': [None, None, '9Z10', '????', '1A01'], 'clashes': [4], 'exited': []}), ('sampled regression 30', {'berths': 4, 'events': [['step', 0], ['step', 1], ['step', 3], ['step', 1], ['interpose', 2, '5X99'], ['interpose', 1, '5X99']]}, {'berths': [None, '5X99', '5X99', None], 'clashes': [2], 'exited': ['????']}), ('boundary: stepping from the penultimate berth', {'berths': 4, 'events': [['interpose', 2, '5X99'], ['step', 2]]}, {'berths': [None, None, None, '5X99'], 'clashes': [], 'exited': []}), ('sampled regression 23', {'berths': 3, 'events': [['interpose', 2, '9Z10'], ['step', 1], ['step', 2], ['cancel', 1], ['interpose', 0, '1A01'], ['step', 2]]}, {'berths': ['1A01', None, None], 'clashes': [2], 'exited': ['????', '????']}), ('sampled regression 29', {'berths': 5, 'events': [['interpose', 4, '1A01'], ['cancel', 4], ['step', 1], ['interpose', 1, '2B17'], ['step', 3], ['cancel', 3], ['interpose', 2, '9Z10'], ['step', 1]]}, {'berths': [None, None, '2B17', None, '????'], 'clashes': [2], 'exited': []}), ('sampled regression 32', {'berths': 3, 'events': [['step', 0], ['step', 0], ['interpose', 1, '2B17'], ['step', 1], ['interpose', 2, '5X99'], ['interpose', 1, '2B17'], ['step', 2], ['cancel', 0], ['step', 0]]}, {'berths': [None, '????', None], 'clashes': [1, 1], 'exited': ['5X99']})], [('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 34', {'berths': 3, 'events': [['step', 2], ['step', 0], ['interpose', 2, '9Z10'], ['step', 1], ['cancel', 1], ['step', 0], ['step', 2]]}, {'berths': [None, '????', None], 'clashes': [2], 'exited': ['????', '????']}), ('sampled regression 44', {'berths': 3, 'events': [['step', 1], ['step', 1], ['interpose', 1, '9Z10']]}, {'berths': [None, '9Z10', '????'], 'clashes': [2], 'exited': []}), ('boundary: stepping from the penultimate berth', {'berths': 4, 'events': [['interpose', 2, '5X99'], ['step', 2]]}, {'berths': [None, None, None, '5X99'], 'clashes': [], 'exited': []}), ('boundary: step from an empty berth', {'berths': 3, 'events': [['step', 0]]}, {'berths': [None, '????', None], 'clashes': [], 'exited': []}), ('control 37', {'berths': 4, 'events': [['step', 1], ['cancel', 1], ['step', 3], ['interpose', 0, '9Z10']]}, {'berths': ['9Z10', None, '????', None], 'clashes': [], 'exited': ['????']}), ('sampled regression 40', {'berths': 4, 'events': [['step', 3], ['step', 1], ['interpose', 3, '5X99'], ['step', 2], ['interpose', 2, '5X99'], ['step', 3], ['step', 0], ['step', 1]]}, {'berths': [None, None, '????', None], 'clashes': [3, 2], 'exited': ['????', '????']}), ('control 43', {'berths': 4, 'events': [['interpose', 2, '9Z10'], ['interpose', 3, '5X99'], ['step', 0], ['interpose', 2, '1A01']]}, {'berths': [None, '????', '1A01', '5X99'], 'clashes': [], 'exited': []})], [('regression: clash with a different train', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '2B17'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('regression: clash with the same headcode', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 0]]}, {'berths': [None, '1A01', None], 'clashes': [1], 'exited': []}), ('sampled regression 48', {'berths': 4, 'events': [['step', 2], ['step', 2], ['step', 0], ['step', 0], ['interpose', 0, '9Z10'], ['interpose', 1, '1A01'], ['cancel', 2], ['step', 2]]}, {'berths': ['9Z10', '1A01', None, '????'], 'clashes': [3, 1, 3], 'exited': []}), ('sampled regression 55', {'berths': 3, 'events': [['interpose', 1, '1A01'], ['step', 0], ['step', 2], ['step', 2], ['step', 2], ['step', 0], ['step', 0], ['interpose', 1, '1A01']]}, {'berths': [None, '1A01', None], 'clashes': [1, 1, 1], 'exited': ['????', '????', '????']}), ('boundary: normal stepping', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['step', 0], ['step', 1]]}, {'berths': [None, None, '1A01'], 'clashes': [], 'exited': []}), ('control 45', {'berths': 3, 'events': [['interpose', 0, '9Z10'], ['interpose', 0, '5X99'], ['interpose', 0, '2B17']]}, {'berths': ['2B17', None, None], 'clashes': [], 'exited': []}), ('sampled regression 51', {'berths': 3, 'events': [['step', 2], ['step', 2], ['interpose', 1, '5X99'], ['interpose', 1, '9Z10'], ['step', 0], ['step', 0], ['interpose', 2, '9Z10'], ['step', 0], ['step', 0]]}, {'berths': [None, '????', '9Z10'], 'clashes': [1, 1, 1, 1], 'exited': ['????', '????']}), ('sampled regression 54', {'berths': 3, 'events': [['step', 2], ['step', 2], ['step', 2], ['step', 1], ['interpose', 2, '5X99'], ['step', 0], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [2], 'exited': ['????', '????', '????', '????']})]]\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-describer-berth-stepping-clash-detection","generated_at":"2026-09-29T14:47:50.074266+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 destination berth is overwritten without recording a clash.","sha256":"30e95bde422ff087802168c701ed5394c25eef42eb03cdfaa9b30103b94b676c","title":"Train describer berth stepping: clash detection · 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":42.288,"exit_code":1,"observations":[{"actual":{"berths":[null,"1A01",null],"clashes":[1],"exited":[]},"check":"regression: clash with a different train","expected":{"berths":[null,"1A01",null],"clashes":[1],"exited":[]},"passed":true},{"actual":{"berths":[null,"1A01",null],"clashes":[],"exited":[]},"check":"regression: clash with the same headcode","expected":{"berths":[null,"1A01",null],"clashes":[1],"exited":[]},"passed":false},{"actual":{"berths":[null,"1A01",null,"????"],"clashes":[1,3],"exited":[]},"check":"sampled regression 6","expected":{"berths":[null,"1A01",null,"????"],"clashes":[1,3],"exited":[]},"passed":true},{"actual":{"berths":[null,"2B17","5X99"],"clashes":[],"exited":[]},"check":"sampled regression 2","expected":{"berths":[null,"2B17","5X99"],"clashes":[2],"exited":[]},"passed":false},{"actual":{"berths":[null,"????",null],"clashes":[],"exited":[]},"check":"boundary: step from an empty berth","expected":{"berths":[null,"????",null],"clashes":[],"exited":[]},"passed":true},{"actual":{"berths":["2B17","1A01",null,null,null],"clashes":[],"exited":["????","????"]},"check":"control 1","expected":{"berths":["2B17","1A01",null,null,null],"clashes":[],"exited":["????","????"]},"passed":true},{"actual":{"berths":[null,"????","????",null],"clashes":[],"exited":[]},"check":"control 4","expected":{"berths":[null,"????","????",null],"clashes":[],"exited":[]},"passed":true},{"actual":{"berths":[null,null,"????","5X99"],"clashes":[],"exited":[]},"check":"sampled regression 7","expected":{"berths":[null,null,"????","5X99"],"clashes":[2],"exited":[]},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: clash with a different train\", \"actual\": {\"berths\": [null, \"1A01\", null], \"clashes\": [1], \"exited\": []}, \"expected\": {\"berths\": [null, \"1A01\", null], \"clashes\": [1], \"exited\": []}, \"passed\": true}, {\"check\": \"regression: clash with the same headcode\", \"actual\": {\"berths\": [null, \"1A01\", null], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"1A01\", null], \"clashes\": [1], \"exited\": []}, \"passed\": false}, {\"check\": \"sampled regression 6\", \"actual\": {\"berths\": [null, \"1A01\", null, \"????\"], \"clashes\": [1, 3], \"exited\": []}, \"expected\": {\"berths\": [null, \"1A01\", null, \"????\"], \"clashes\": [1, 3], \"exited\": []}, \"passed\": true}, {\"check\": \"sampled regression 2\", \"actual\": {\"berths\": [null, \"2B17\", \"5X99\"], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"2B17\", \"5X99\"], \"clashes\": [2], \"exited\": []}, \"passed\": false}, {\"check\": \"boundary: step from an empty berth\", \"actual\": {\"berths\": [null, \"????\", null], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"????\", null], \"clashes\": [], \"exited\": []}, \"passed\": true}, {\"check\": \"control 1\", \"actual\": {\"berths\": [\"2B17\", \"1A01\", null, null, null], \"clashes\": [], \"exited\": [\"????\", \"????\"]}, \"expected\": {\"berths\": [\"2B17\", \"1A01\", null, null, null], \"clashes\": [], \"exited\": [\"????\", \"????\"]}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"berths\": [null, \"????\", \"????\", null], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"????\", \"????\", null], \"clashes\": [], \"exited\": []}, \"passed\": true}, {\"check\": \"sampled regression 7\", \"actual\": {\"berths\": [null, null, \"????\", \"5X99\"], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, null, \"????\", \"5X99\"], \"clashes\": [2], \"exited\": []}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.58,"exit_code":1,"observations":[{"actual":{"berths":[null,"1A01",null],"clashes":[],"exited":[]},"check":"regression: clash with a different train","expected":{"berths":[null,"1A01",null],"clashes":[1],"exited":[]},"passed":false},{"actual":{"berths":[null,"1A01",null],"clashes":[],"exited":[]},"check":"regression: clash with the same headcode","expected":{"berths":[null,"1A01",null],"clashes":[1],"exited":[]},"passed":false},{"actual":{"berths":[null,"1A01",null,"????"],"clashes":[],"exited":[]},"check":"sampled regression 6","expected":{"berths":[null,"1A01",null,"????"],"clashes":[1,3],"exited":[]},"passed":false},{"actual":{"berths":[null,"2B17","5X99"],"clashes":[],"exited":[]},"check":"sampled regression 2","expected":{"berths":[null,"2B17","5X99"],"clashes":[2],"exited":[]},"passed":false},{"actual":{"berths":[null,"????",null],"clashes":[],"exited":[]},"check":"boundary: step from an empty berth","expected":{"berths":[null,"????",null],"clashes":[],"exited":[]},"passed":true},{"actual":{"berths":["2B17","1A01",null,null,null],"clashes":[],"exited":["????","????"]},"check":"control 1","expected":{"berths":["2B17","1A01",null,null,null],"clashes":[],"exited":["????","????"]},"passed":true},{"actual":{"berths":[null,"????","????",null],"clashes":[],"exited":[]},"check":"control 4","expected":{"berths":[null,"????","????",null],"clashes":[],"exited":[]},"passed":true},{"actual":{"berths":[null,null,"????","5X99"],"clashes":[],"exited":[]},"check":"sampled regression 7","expected":{"berths":[null,null,"????","5X99"],"clashes":[2],"exited":[]},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: clash with a different train\", \"actual\": {\"berths\": [null, \"1A01\", null], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"1A01\", null], \"clashes\": [1], \"exited\": []}, \"passed\": false}, {\"check\": \"regression: clash with the same headcode\", \"actual\": {\"berths\": [null, \"1A01\", null], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"1A01\", null], \"clashes\": [1], \"exited\": []}, \"passed\": false}, {\"check\": \"sampled regression 6\", \"actual\": {\"berths\": [null, \"1A01\", null, \"????\"], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"1A01\", null, \"????\"], \"clashes\": [1, 3], \"exited\": []}, \"passed\": false}, {\"check\": \"sampled regression 2\", \"actual\": {\"berths\": [null, \"2B17\", \"5X99\"], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"2B17\", \"5X99\"], \"clashes\": [2], \"exited\": []}, \"passed\": false}, {\"check\": \"boundary: step from an empty berth\", \"actual\": {\"berths\": [null, \"????\", null], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"????\", null], \"clashes\": [], \"exited\": []}, \"passed\": true}, {\"check\": \"control 1\", \"actual\": {\"berths\": [\"2B17\", \"1A01\", null, null, null], \"clashes\": [], \"exited\": [\"????\", \"????\"]}, \"expected\": {\"berths\": [\"2B17\", \"1A01\", null, null, null], \"clashes\": [], \"exited\": [\"????\", \"????\"]}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"berths\": [null, \"????\", \"????\", null], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"????\", \"????\", null], \"clashes\": [], \"exited\": []}, \"passed\": true}, {\"check\": \"sampled regression 7\", \"actual\": {\"berths\": [null, null, \"????\", \"5X99\"], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, null, \"????\", \"5X99\"], \"clashes\": [2], \"exited\": []}, \"passed\": false}], \"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."}}