{"abstract":"A description stays behind in the berth the train has left.","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":"Blanking only on inner steps leaves the last berth filled after the train exits.","family":"w2-railway_interlocking_logic-describer-berth-stepping-source-berth-blanking","id":"FA-67136","implementations":{"attempt":{"sha256":"61e69bfbc6f9b2ec6a1e331920d244057283d3517c539befc420eb17317552ba","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            if i == n - 1:\n                exited.append(tid)\n            else:\n                if b[i + 1] is not None:\n                    clashes.append(i + 1)\n                b[i + 1] = tid\n                b[i] = None\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: normal stepping', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['step', 0], ['step', 1]]}, {'berths': [None, None, '1A01'], 'clashes': [], 'exited': []}), ('regression: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('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 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': ['????', '????']}), ('boundary: step from an empty berth', {'berths': 3, 'events': [['step', 0]]}, {'berths': [None, '????', None], 'clashes': [], 'exited': []}), ('control 4', {'berths': 4, 'events': [['step', 1], ['cancel', 0], ['step', 0]]}, {'berths': [None, '????', '????', None], 'clashes': [], 'exited': []}), ('control 7', {'berths': 4, 'events': [['interpose', 3, '5X99'], ['step', 1], ['step', 1]]}, {'berths': [None, None, '????', '5X99'], 'clashes': [2], 'exited': []}), ('sampled regression 10', {'berths': 3, 'events': [['interpose', 1, '9Z10'], ['interpose', 0, '2B17'], ['step', 1], ['step', 1], ['step', 0], ['step', 0], ['step', 2], ['interpose', 2, '2B17'], ['step', 1]]}, {'berths': [None, None, '????'], 'clashes': [2, 1, 2], 'exited': ['????']})], [('regression: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('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': ['????']}), ('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: unknown train leaves the area', {'berths': 2, 'events': [['step', 1]]}, {'berths': [None, None], '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': []}), ('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': []}), ('sampled regression 21', {'berths': 5, 'events': [['step', 3], ['step', 3], ['step', 0], ['step', 1], ['step', 1], ['step', 3], ['step', 1], ['step', 0]]}, {'berths': [None, '????', '????', None, '????'], 'clashes': [4, 2, 4, 2], '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: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('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 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': ['????', '????']}), ('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 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': []}), ('regression: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('sampled regression 38', {'berths': 4, 'events': [['step', 2], ['step', 1], ['step', 2], ['cancel', 1]]}, {'berths': [None, None, None, '????'], 'clashes': [3], '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': ['????', '????', '????', '????']}), ('regression: stepping from the penultimate berth', {'berths': 4, 'events': [['interpose', 2, '5X99'], ['step', 2]]}, {'berths': [None, None, None, '5X99'], 'clashes': [], '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': ['????', '????']}), ('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': ['????', '????']})], [('regression: stepping from the penultimate berth', {'berths': 4, 'events': [['interpose', 2, '5X99'], ['step', 2]]}, {'berths': [None, None, None, '5X99'], 'clashes': [], 'exited': []}), ('regression: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('sampled regression 50', {'berths': 4, 'events': [['step', 2], ['interpose', 0, '9Z10'], ['step', 0], ['interpose', 1, '2B17'], ['cancel', 1], ['step', 0], ['step', 3]]}, {'berths': [None, '????', None, None], 'clashes': [], 'exited': ['????']}), ('sampled regression 76', {'berths': 5, 'events': [['interpose', 0, '9Z10'], ['step', 4], ['step', 3], ['step', 4], ['interpose', 0, '2B17'], ['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 1]]}, {'berths': ['1A01', None, '1A01', None, None], 'clashes': [], 'exited': ['????', '????']}), ('regression: 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': []}), ('control 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': []}), ('control 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': ['????', '????']})]]\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":"f9ed4dec5c2ed2d2e28917e05f058609d27b9952fb38f3f8267d6f7a17092800","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            if i == n - 1:\n                exited.append(tid)\n            else:\n                if b[i + 1] is not None:\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: normal stepping', {'berths': 3, 'events': [['interpose', 0, '1A01'], ['step', 0], ['step', 1]]}, {'berths': [None, None, '1A01'], 'clashes': [], 'exited': []}), ('regression: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('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 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': ['????', '????']}), ('boundary: step from an empty berth', {'berths': 3, 'events': [['step', 0]]}, {'berths': [None, '????', None], 'clashes': [], 'exited': []}), ('control 4', {'berths': 4, 'events': [['step', 1], ['cancel', 0], ['step', 0]]}, {'berths': [None, '????', '????', None], 'clashes': [], 'exited': []}), ('control 7', {'berths': 4, 'events': [['interpose', 3, '5X99'], ['step', 1], ['step', 1]]}, {'berths': [None, None, '????', '5X99'], 'clashes': [2], 'exited': []}), ('sampled regression 10', {'berths': 3, 'events': [['interpose', 1, '9Z10'], ['interpose', 0, '2B17'], ['step', 1], ['step', 1], ['step', 0], ['step', 0], ['step', 2], ['interpose', 2, '2B17'], ['step', 1]]}, {'berths': [None, None, '????'], 'clashes': [2, 1, 2], 'exited': ['????']})], [('regression: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('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': ['????']}), ('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: unknown train leaves the area', {'berths': 2, 'events': [['step', 1]]}, {'berths': [None, None], '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': []}), ('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': []}), ('sampled regression 21', {'berths': 5, 'events': [['step', 3], ['step', 3], ['step', 0], ['step', 1], ['step', 1], ['step', 3], ['step', 1], ['step', 0]]}, {'berths': [None, '????', '????', None, '????'], 'clashes': [4, 2, 4, 2], '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: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('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 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': ['????', '????']}), ('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 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': []}), ('regression: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('sampled regression 38', {'berths': 4, 'events': [['step', 2], ['step', 1], ['step', 2], ['cancel', 1]]}, {'berths': [None, None, None, '????'], 'clashes': [3], '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': ['????', '????', '????', '????']}), ('regression: stepping from the penultimate berth', {'berths': 4, 'events': [['interpose', 2, '5X99'], ['step', 2]]}, {'berths': [None, None, None, '5X99'], 'clashes': [], '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': ['????', '????']}), ('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': ['????', '????']})], [('regression: stepping from the penultimate berth', {'berths': 4, 'events': [['interpose', 2, '5X99'], ['step', 2]]}, {'berths': [None, None, None, '5X99'], 'clashes': [], 'exited': []}), ('regression: exit from the last berth', {'berths': 3, 'events': [['interpose', 1, '2B17'], ['step', 1], ['step', 2]]}, {'berths': [None, None, None], 'clashes': [], 'exited': ['2B17']}), ('sampled regression 50', {'berths': 4, 'events': [['step', 2], ['interpose', 0, '9Z10'], ['step', 0], ['interpose', 1, '2B17'], ['cancel', 1], ['step', 0], ['step', 3]]}, {'berths': [None, '????', None, None], 'clashes': [], 'exited': ['????']}), ('sampled regression 76', {'berths': 5, 'events': [['interpose', 0, '9Z10'], ['step', 4], ['step', 3], ['step', 4], ['interpose', 0, '2B17'], ['interpose', 0, '1A01'], ['interpose', 1, '1A01'], ['step', 1]]}, {'berths': ['1A01', None, '1A01', None, None], 'clashes': [], 'exited': ['????', '????']}), ('regression: 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': []}), ('control 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': []}), ('control 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': ['????', '????']})]]\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-source-berth-blanking","generated_at":"2026-09-29T14:47:50.044402+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 source berth is never blanked after a step.","sha256":"f8d138e445f678edba6fddc58be7193a5b44ca06e6d2d3cf2029717c55144093","title":"Train describer berth stepping: source berth blanking · 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":41.195,"exit_code":1,"observations":[{"actual":{"berths":[null,null,"1A01"],"clashes":[],"exited":[]},"check":"regression: normal stepping","expected":{"berths":[null,null,"1A01"],"clashes":[],"exited":[]},"passed":true},{"actual":{"berths":[null,null,"2B17"],"clashes":[],"exited":["2B17"]},"check":"regression: exit from the last berth","expected":{"berths":[null,null,null],"clashes":[],"exited":["2B17"]},"passed":false},{"actual":{"berths":[null,"1A01",null],"clashes":[1],"exited":[]},"check":"regression: clash with the same headcode","expected":{"berths":[null,"1A01",null],"clashes":[1],"exited":[]},"passed":true},{"actual":{"berths":["2B17","1A01",null,null,"????"],"clashes":[],"exited":["????","????"]},"check":"sampled regression 1","expected":{"berths":["2B17","1A01",null,null,null],"clashes":[],"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":[null,"????","????",null],"clashes":[],"exited":[]},"check":"control 4","expected":{"berths":[null,"????","????",null],"clashes":[],"exited":[]},"passed":true},{"actual":{"berths":[null,null,"????","5X99"],"clashes":[2],"exited":[]},"check":"control 7","expected":{"berths":[null,null,"????","5X99"],"clashes":[2],"exited":[]},"passed":true},{"actual":{"berths":[null,null,"????"],"clashes":[2,1,2],"exited":["????"]},"check":"sampled regression 10","expected":{"berths":[null,null,"????"],"clashes":[2,1,2],"exited":["????"]},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: normal stepping\", \"actual\": {\"berths\": [null, null, \"1A01\"], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, null, \"1A01\"], \"clashes\": [], \"exited\": []}, \"passed\": true}, {\"check\": \"regression: exit from the last berth\", \"actual\": {\"berths\": [null, null, \"2B17\"], \"clashes\": [], \"exited\": [\"2B17\"]}, \"expected\": {\"berths\": [null, null, null], \"clashes\": [], \"exited\": [\"2B17\"]}, \"passed\": false}, {\"check\": \"regression: clash with the same headcode\", \"actual\": {\"berths\": [null, \"1A01\", null], \"clashes\": [1], \"exited\": []}, \"expected\": {\"berths\": [null, \"1A01\", null], \"clashes\": [1], \"exited\": []}, \"passed\": true}, {\"check\": \"sampled regression 1\", \"actual\": {\"berths\": [\"2B17\", \"1A01\", null, null, \"????\"], \"clashes\": [], \"exited\": [\"????\", \"????\"]}, \"expected\": {\"berths\": [\"2B17\", \"1A01\", null, null, null], \"clashes\": [], \"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 4\", \"actual\": {\"berths\": [null, \"????\", \"????\", null], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"????\", \"????\", null], \"clashes\": [], \"exited\": []}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"berths\": [null, null, \"????\", \"5X99\"], \"clashes\": [2], \"exited\": []}, \"expected\": {\"berths\": [null, null, \"????\", \"5X99\"], \"clashes\": [2], \"exited\": []}, \"passed\": true}, {\"check\": \"sampled regression 10\", \"actual\": {\"berths\": [null, null, \"????\"], \"clashes\": [2, 1, 2], \"exited\": [\"????\"]}, \"expected\": {\"berths\": [null, null, \"????\"], \"clashes\": [2, 1, 2], \"exited\": [\"????\"]}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.018,"exit_code":1,"observations":[{"actual":{"berths":["1A01","1A01","1A01"],"clashes":[],"exited":[]},"check":"regression: normal stepping","expected":{"berths":[null,null,"1A01"],"clashes":[],"exited":[]},"passed":false},{"actual":{"berths":[null,"2B17","2B17"],"clashes":[],"exited":["2B17"]},"check":"regression: exit from the last berth","expected":{"berths":[null,null,null],"clashes":[],"exited":["2B17"]},"passed":false},{"actual":{"berths":["1A01","1A01",null],"clashes":[1],"exited":[]},"check":"regression: clash with the same headcode","expected":{"berths":[null,"1A01",null],"clashes":[1],"exited":[]},"passed":false},{"actual":{"berths":["2B17","1A01",null,null,"????"],"clashes":[],"exited":["????","????"]},"check":"sampled regression 1","expected":{"berths":["2B17","1A01",null,null,null],"clashes":[],"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":[null,"????","????",null],"clashes":[],"exited":[]},"check":"control 4","expected":{"berths":[null,"????","????",null],"clashes":[],"exited":[]},"passed":true},{"actual":{"berths":[null,null,"????","5X99"],"clashes":[2],"exited":[]},"check":"control 7","expected":{"berths":[null,null,"????","5X99"],"clashes":[2],"exited":[]},"passed":true},{"actual":{"berths":["2B17","2B17","2B17"],"clashes":[2,1,1,2],"exited":["9Z10"]},"check":"sampled regression 10","expected":{"berths":[null,null,"????"],"clashes":[2,1,2],"exited":["????"]},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: normal stepping\", \"actual\": {\"berths\": [\"1A01\", \"1A01\", \"1A01\"], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, null, \"1A01\"], \"clashes\": [], \"exited\": []}, \"passed\": false}, {\"check\": \"regression: exit from the last berth\", \"actual\": {\"berths\": [null, \"2B17\", \"2B17\"], \"clashes\": [], \"exited\": [\"2B17\"]}, \"expected\": {\"berths\": [null, null, null], \"clashes\": [], \"exited\": [\"2B17\"]}, \"passed\": false}, {\"check\": \"regression: clash with the same headcode\", \"actual\": {\"berths\": [\"1A01\", \"1A01\", null], \"clashes\": [1], \"exited\": []}, \"expected\": {\"berths\": [null, \"1A01\", null], \"clashes\": [1], \"exited\": []}, \"passed\": false}, {\"check\": \"sampled regression 1\", \"actual\": {\"berths\": [\"2B17\", \"1A01\", null, null, \"????\"], \"clashes\": [], \"exited\": [\"????\", \"????\"]}, \"expected\": {\"berths\": [\"2B17\", \"1A01\", null, null, null], \"clashes\": [], \"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 4\", \"actual\": {\"berths\": [null, \"????\", \"????\", null], \"clashes\": [], \"exited\": []}, \"expected\": {\"berths\": [null, \"????\", \"????\", null], \"clashes\": [], \"exited\": []}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"berths\": [null, null, \"????\", \"5X99\"], \"clashes\": [2], \"exited\": []}, \"expected\": {\"berths\": [null, null, \"????\", \"5X99\"], \"clashes\": [2], \"exited\": []}, \"passed\": true}, {\"check\": \"sampled regression 10\", \"actual\": {\"berths\": [\"2B17\", \"2B17\", \"2B17\"], \"clashes\": [2, 1, 1, 2], \"exited\": [\"9Z10\"]}, \"expected\": {\"berths\": [null, null, \"????\"], \"clashes\": [2, 1, 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."}}