{"abstract":"A car moving away at the top or bottom is sent to a floor that does not exist.","category":"Elevator dispatch scheduling","checks":8,"contract":"The recall floor is the designated floor unless smoke is detected there and not at the alternate floor. Each car: stationary at the recall floor -> open; stationary elsewhere -> travel to recall; moving towards the recall floor (strictly) -> nonstop to it; otherwise (moving away, or passing the recall floor) -> reverse after stopping at the next floor in its direction, clipped to 0..top.","evaluation_group":"w2-elevator_dispatch_scheduling-fire-recall","failed_approach":"Clipping only at the bottom still overshoots the top floor.","family":"w2-elevator_dispatch_scheduling-fire-recall-shaft-end-clipping","id":"FA-67576","implementations":{"attempt":{"sha256":"2eaa6b827db34832f04c4b93c73f8735f35d702e1a5c9ec58852ee7871c001b0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    smoke = set(x['smoke'])\n    des, alt = x['designated'], x['alternate']\n    recall = alt if des in smoke and alt not in smoke else des\n    res = {}\n    for c in x['cars']:\n        f = c['floor']\n        if not c['moving']:\n            res[c['id']] = ['open', recall] if f == recall else ['travel', recall]\n        elif (c['dir'] == 'up' and recall > f) or (c['dir'] == 'down' and recall < f):\n            res[c['id']] = ['nonstop', recall]\n        else:\n            nxt = f + 1 if c['dir'] == 'up' else f - 1\n            res[c['id']] = ['reverse', max(nxt, 0)]\n    return {'recall': recall, 'cars': res}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 33', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [8], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 2, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 7], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('sampled regression 30', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 7, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 2, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 1, 'cars': {'L1': ['nonstop', 1], 'L2': ['nonstop', 1], 'L3': ['reverse', 11]}}), ('boundary: smoke at the designated floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 5, 'cars': {'L1': ['travel', 5]}}), ('control 1', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [11], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 10, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 9, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 1], 'L2': ['travel', 0], 'L3': ['nonstop', 0]}}), ('control 4', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [6, 11], 'cars': [{'id': 'L1', 'floor': 1, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0]}}), ('control 7', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 7, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 1, 'moving': True, 'dir': 'down'}]}, {'recall': 1, 'cars': {'L1': ['reverse', 8], 'L2': ['reverse', 0]}})], [('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 69', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 4, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 5], 'L2': ['reverse', 0]}}), ('sampled regression 65', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [2, 11], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 11]}}), ('boundary: smoke elsewhere only', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [7], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0]}}), ('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('control 12', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 10, 'moving': True, 'dir': 'up'}]}, {'recall': 2, 'cars': {'L1': ['travel', 2], 'L2': ['reverse', 11]}}), ('control 15', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [7, 0], 'cars': [{'id': 'L1', 'floor': 4, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 5, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 8, 'moving': True, 'dir': 'down'}]}, {'recall': 1, 'cars': {'L1': ['travel', 1], 'L2': ['travel', 1], 'L3': ['nonstop', 1]}}), ('control 18', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [8], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 6, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 2, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['nonstop', 0], 'L3': ['travel', 0]}})], [('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 34', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 11, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 11], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('sampled regression 42', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [10], 'cars': [{'id': 'L1', 'floor': 8, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['reverse', 11]}}), ('boundary: moving away upwards', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 4, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 5]}}), ('control 23', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 3, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 8, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 1, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0], 'L2': ['nonstop', 0], 'L3': ['reverse', 2]}}), ('control 26', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [10, 11], 'cars': [{'id': 'L1', 'floor': 9, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 7, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['nonstop', 0]}}), ('control 29', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [6], 'cars': [{'id': 'L1', 'floor': 9, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0]}})], [('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 76', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [9], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('sampled regression 33', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [8], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 2, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 7], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('boundary: moving up towards the alternate floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 2, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['nonstop', 5]}}), ('boundary: parked at the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['open', 0]}}), ('sampled regression 34', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 11, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 11], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('control 37', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [9, 8], 'cars': [{'id': 'L1', 'floor': 1, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 2], 'L2': ['travel', 0]}}), ('control 40', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [5, 3, 0], 'cars': [{'id': 'L1', 'floor': 3, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 10, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 4], 'L2': ['reverse', 11]}})], [('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 36', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [3, 0], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 11, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 1, 'moving': True, 'dir': 'down'}]}, {'recall': 2, 'cars': {'L1': ['reverse', 0], 'L2': ['nonstop', 2], 'L3': ['reverse', 0]}}), ('boundary: smoke at the designated floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 5, 'cars': {'L1': ['travel', 5]}}), ('boundary: smoke at both recall floors', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0, 5], 'cars': [{'id': 'L1', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0]}}), ('control 45', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [4, 11], 'cars': [{'id': 'L1', 'floor': 9, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 0, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['reverse', 1]}}), ('control 48', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [1], 'cars': [{'id': 'L1', 'floor': 4, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 5, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0], 'L2': ['travel', 0]}}), ('control 51', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 9, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 4, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 10], 'L2': ['travel', 0]}})]]\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":"a8f2f98bb045a6ef86b301312d92a310976fa5aa00d37f3ab563a9257c9c3c4a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    smoke = set(x['smoke'])\n    des, alt = x['designated'], x['alternate']\n    recall = alt if des in smoke and alt not in smoke else des\n    res = {}\n    for c in x['cars']:\n        f = c['floor']\n        if not c['moving']:\n            res[c['id']] = ['open', recall] if f == recall else ['travel', recall]\n        elif (c['dir'] == 'up' and recall > f) or (c['dir'] == 'down' and recall < f):\n            res[c['id']] = ['nonstop', recall]\n        else:\n            nxt = f + 1 if c['dir'] == 'up' else f - 1\n            res[c['id']] = ['reverse', nxt]\n    return {'recall': recall, 'cars': res}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 33', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [8], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 2, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 7], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('sampled regression 30', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 7, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 2, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 1, 'cars': {'L1': ['nonstop', 1], 'L2': ['nonstop', 1], 'L3': ['reverse', 11]}}), ('boundary: smoke at the designated floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 5, 'cars': {'L1': ['travel', 5]}}), ('control 1', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [11], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 10, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 9, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 1], 'L2': ['travel', 0], 'L3': ['nonstop', 0]}}), ('control 4', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [6, 11], 'cars': [{'id': 'L1', 'floor': 1, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0]}}), ('control 7', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 7, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 1, 'moving': True, 'dir': 'down'}]}, {'recall': 1, 'cars': {'L1': ['reverse', 8], 'L2': ['reverse', 0]}})], [('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 69', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 4, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 5], 'L2': ['reverse', 0]}}), ('sampled regression 65', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [2, 11], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 11]}}), ('boundary: smoke elsewhere only', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [7], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0]}}), ('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('control 12', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 10, 'moving': True, 'dir': 'up'}]}, {'recall': 2, 'cars': {'L1': ['travel', 2], 'L2': ['reverse', 11]}}), ('control 15', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [7, 0], 'cars': [{'id': 'L1', 'floor': 4, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 5, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 8, 'moving': True, 'dir': 'down'}]}, {'recall': 1, 'cars': {'L1': ['travel', 1], 'L2': ['travel', 1], 'L3': ['nonstop', 1]}}), ('control 18', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [8], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 6, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 2, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['nonstop', 0], 'L3': ['travel', 0]}})], [('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 34', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 11, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 11], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('sampled regression 42', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [10], 'cars': [{'id': 'L1', 'floor': 8, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['reverse', 11]}}), ('boundary: moving away upwards', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 4, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 5]}}), ('control 23', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 3, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 8, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 1, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0], 'L2': ['nonstop', 0], 'L3': ['reverse', 2]}}), ('control 26', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [10, 11], 'cars': [{'id': 'L1', 'floor': 9, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 7, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['nonstop', 0]}}), ('control 29', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [6], 'cars': [{'id': 'L1', 'floor': 9, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0]}})], [('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 76', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [9], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('sampled regression 33', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [8], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 2, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 7], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('boundary: moving up towards the alternate floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 2, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['nonstop', 5]}}), ('boundary: parked at the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['open', 0]}}), ('sampled regression 34', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 11, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 11], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('control 37', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [9, 8], 'cars': [{'id': 'L1', 'floor': 1, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 2], 'L2': ['travel', 0]}}), ('control 40', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [5, 3, 0], 'cars': [{'id': 'L1', 'floor': 3, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 10, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 4], 'L2': ['reverse', 11]}})], [('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 36', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [3, 0], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 11, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 1, 'moving': True, 'dir': 'down'}]}, {'recall': 2, 'cars': {'L1': ['reverse', 0], 'L2': ['nonstop', 2], 'L3': ['reverse', 0]}}), ('boundary: smoke at the designated floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 5, 'cars': {'L1': ['travel', 5]}}), ('boundary: smoke at both recall floors', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0, 5], 'cars': [{'id': 'L1', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0]}}), ('control 45', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [4, 11], 'cars': [{'id': 'L1', 'floor': 9, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 0, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['reverse', 1]}}), ('control 48', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [1], 'cars': [{'id': 'L1', 'floor': 4, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 5, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0], 'L2': ['travel', 0]}}), ('control 51', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 9, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 4, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 10], 'L2': ['travel', 0]}})]]\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":"3c82a1880ca9860867233920b5dcde255a002da708adca419884ea9ca18f7242","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    smoke = set(x['smoke'])\n    des, alt = x['designated'], x['alternate']\n    recall = alt if des in smoke and alt not in smoke else des\n    res = {}\n    for c in x['cars']:\n        f = c['floor']\n        if not c['moving']:\n            res[c['id']] = ['open', recall] if f == recall else ['travel', recall]\n        elif (c['dir'] == 'up' and recall > f) or (c['dir'] == 'down' and recall < f):\n            res[c['id']] = ['nonstop', recall]\n        else:\n            nxt = f + 1 if c['dir'] == 'up' else f - 1\n            res[c['id']] = ['reverse', min(max(nxt, 0), x['top'])]\n    return {'recall': recall, 'cars': res}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 33', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [8], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 2, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 7], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('sampled regression 30', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 7, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 2, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 1, 'cars': {'L1': ['nonstop', 1], 'L2': ['nonstop', 1], 'L3': ['reverse', 11]}}), ('boundary: smoke at the designated floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 5, 'cars': {'L1': ['travel', 5]}}), ('control 1', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [11], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 10, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 9, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 1], 'L2': ['travel', 0], 'L3': ['nonstop', 0]}}), ('control 4', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [6, 11], 'cars': [{'id': 'L1', 'floor': 1, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0]}}), ('control 7', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 7, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 1, 'moving': True, 'dir': 'down'}]}, {'recall': 1, 'cars': {'L1': ['reverse', 8], 'L2': ['reverse', 0]}})], [('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 69', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 4, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 5], 'L2': ['reverse', 0]}}), ('sampled regression 65', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [2, 11], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 11]}}), ('boundary: smoke elsewhere only', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [7], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0]}}), ('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('control 12', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 10, 'moving': True, 'dir': 'up'}]}, {'recall': 2, 'cars': {'L1': ['travel', 2], 'L2': ['reverse', 11]}}), ('control 15', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [7, 0], 'cars': [{'id': 'L1', 'floor': 4, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 5, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 8, 'moving': True, 'dir': 'down'}]}, {'recall': 1, 'cars': {'L1': ['travel', 1], 'L2': ['travel', 1], 'L3': ['nonstop', 1]}}), ('control 18', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [8], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 6, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 2, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['nonstop', 0], 'L3': ['travel', 0]}})], [('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 34', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 11, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 11], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('sampled regression 42', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [10], 'cars': [{'id': 'L1', 'floor': 8, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['reverse', 11]}}), ('boundary: moving away upwards', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 4, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 5]}}), ('control 23', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 3, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 8, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 1, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0], 'L2': ['nonstop', 0], 'L3': ['reverse', 2]}}), ('control 26', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [10, 11], 'cars': [{'id': 'L1', 'floor': 9, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 7, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['nonstop', 0]}}), ('control 29', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [6], 'cars': [{'id': 'L1', 'floor': 9, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0]}})], [('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 76', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [9], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('sampled regression 33', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [8], 'cars': [{'id': 'L1', 'floor': 6, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 2, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 7], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('boundary: moving up towards the alternate floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 2, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['nonstop', 5]}}), ('boundary: parked at the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['open', 0]}}), ('sampled regression 34', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 11, 'moving': False, 'dir': 'idle'}, {'id': 'L3', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 11], 'L2': ['travel', 0], 'L3': ['reverse', 11]}}), ('control 37', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [9, 8], 'cars': [{'id': 'L1', 'floor': 1, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 2], 'L2': ['travel', 0]}}), ('control 40', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [5, 3, 0], 'cars': [{'id': 'L1', 'floor': 3, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 10, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 4], 'L2': ['reverse', 11]}})], [('regression: passing the recall floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 0]}}), ('regression: moving away at the top', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 11, 'moving': True, 'dir': 'up'}]}, {'recall': 5, 'cars': {'L1': ['reverse', 11]}}), ('sampled regression 36', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [3, 0], 'cars': [{'id': 'L1', 'floor': 0, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 11, 'moving': True, 'dir': 'down'}, {'id': 'L3', 'floor': 1, 'moving': True, 'dir': 'down'}]}, {'recall': 2, 'cars': {'L1': ['reverse', 0], 'L2': ['nonstop', 2], 'L3': ['reverse', 0]}}), ('boundary: smoke at the designated floor', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0], 'cars': [{'id': 'L1', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 5, 'cars': {'L1': ['travel', 5]}}), ('boundary: smoke at both recall floors', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [0, 5], 'cars': [{'id': 'L1', 'floor': 6, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0]}}), ('control 45', {'designated': 0, 'alternate': 5, 'top': 11, 'smoke': [4, 11], 'cars': [{'id': 'L1', 'floor': 9, 'moving': True, 'dir': 'down'}, {'id': 'L2', 'floor': 0, 'moving': True, 'dir': 'up'}]}, {'recall': 0, 'cars': {'L1': ['nonstop', 0], 'L2': ['reverse', 1]}}), ('control 48', {'designated': 0, 'alternate': 2, 'top': 11, 'smoke': [1], 'cars': [{'id': 'L1', 'floor': 4, 'moving': False, 'dir': 'idle'}, {'id': 'L2', 'floor': 5, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['travel', 0], 'L2': ['travel', 0]}}), ('control 51', {'designated': 0, 'alternate': 1, 'top': 11, 'smoke': [], 'cars': [{'id': 'L1', 'floor': 9, 'moving': True, 'dir': 'up'}, {'id': 'L2', 'floor': 4, 'moving': False, 'dir': 'idle'}]}, {'recall': 0, 'cars': {'L1': ['reverse', 10], 'L2': ['travel', 0]}})]]\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 lift-control contract for a bounded teaching model; it makes no claim of conformance to any lift code or vendor dispatcher 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-elevator_dispatch_scheduling-fire-recall-shaft-end-clipping","generated_at":"2026-09-29T14:47:54.168667+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Lift group controllers make these decisions many times per minute; a wrong answer strands passengers, wastes trips or overrides a safety rule.","repair":"Clip the reversal floor to 0..top.","root_cause":"The next-floor target is not clipped to the shaft.","sha256":"4f5521ebc967bf58f69c2d7dfd4bfb0b74cc51e2f2b80916034ee4d1ecb87c69","title":"Fire service phase I recall: shaft end clipping · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.755,"exit_code":1,"observations":[{"actual":{"cars":{"L1":["reverse",0]},"recall":0},"check":"regression: passing the recall floor","expected":{"cars":{"L1":["reverse",0]},"recall":0},"passed":true},{"actual":{"cars":{"L1":["reverse",12]},"recall":5},"check":"regression: moving away at the top","expected":{"cars":{"L1":["reverse",11]},"recall":5},"passed":false},{"actual":{"cars":{"L1":["reverse",7],"L2":["travel",0],"L3":["reverse",12]},"recall":0},"check":"sampled regression 33","expected":{"cars":{"L1":["reverse",7],"L2":["travel",0],"L3":["reverse",11]},"recall":0},"passed":false},{"actual":{"cars":{"L1":["nonstop",1],"L2":["nonstop",1],"L3":["reverse",12]},"recall":1},"check":"sampled regression 30","expected":{"cars":{"L1":["nonstop",1],"L2":["nonstop",1],"L3":["reverse",11]},"recall":1},"passed":false},{"actual":{"cars":{"L1":["travel",5]},"recall":5},"check":"boundary: smoke at the designated floor","expected":{"cars":{"L1":["travel",5]},"recall":5},"passed":true},{"actual":{"cars":{"L1":["reverse",1],"L2":["travel",0],"L3":["nonstop",0]},"recall":0},"check":"control 1","expected":{"cars":{"L1":["reverse",1],"L2":["travel",0],"L3":["nonstop",0]},"recall":0},"passed":true},{"actual":{"cars":{"L1":["nonstop",0]},"recall":0},"check":"control 4","expected":{"cars":{"L1":["nonstop",0]},"recall":0},"passed":true},{"actual":{"cars":{"L1":["reverse",8],"L2":["reverse",0]},"recall":1},"check":"control 7","expected":{"cars":{"L1":["reverse",8],"L2":["reverse",0]},"recall":1},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: passing the recall floor\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 0]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 0]}}, \"passed\": true}, {\"check\": \"regression: moving away at the top\", \"actual\": {\"recall\": 5, \"cars\": {\"L1\": [\"reverse\", 12]}}, \"expected\": {\"recall\": 5, \"cars\": {\"L1\": [\"reverse\", 11]}}, \"passed\": false}, {\"check\": \"sampled regression 33\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 7], \"L2\": [\"travel\", 0], \"L3\": [\"reverse\", 12]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 7], \"L2\": [\"travel\", 0], \"L3\": [\"reverse\", 11]}}, \"passed\": false}, {\"check\": \"sampled regression 30\", \"actual\": {\"recall\": 1, \"cars\": {\"L1\": [\"nonstop\", 1], \"L2\": [\"nonstop\", 1], \"L3\": [\"reverse\", 12]}}, \"expected\": {\"recall\": 1, \"cars\": {\"L1\": [\"nonstop\", 1], \"L2\": [\"nonstop\", 1], \"L3\": [\"reverse\", 11]}}, \"passed\": false}, {\"check\": \"boundary: smoke at the designated floor\", \"actual\": {\"recall\": 5, \"cars\": {\"L1\": [\"travel\", 5]}}, \"expected\": {\"recall\": 5, \"cars\": {\"L1\": [\"travel\", 5]}}, \"passed\": true}, {\"check\": \"control 1\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 1], \"L2\": [\"travel\", 0], \"L3\": [\"nonstop\", 0]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 1], \"L2\": [\"travel\", 0], \"L3\": [\"nonstop\", 0]}}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"nonstop\", 0]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"nonstop\", 0]}}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"recall\": 1, \"cars\": {\"L1\": [\"reverse\", 8], \"L2\": [\"reverse\", 0]}}, \"expected\": {\"recall\": 1, \"cars\": {\"L1\": [\"reverse\", 8], \"L2\": [\"reverse\", 0]}}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.463,"exit_code":1,"observations":[{"actual":{"cars":{"L1":["reverse",-1]},"recall":0},"check":"regression: passing the recall floor","expected":{"cars":{"L1":["reverse",0]},"recall":0},"passed":false},{"actual":{"cars":{"L1":["reverse",12]},"recall":5},"check":"regression: moving away at the top","expected":{"cars":{"L1":["reverse",11]},"recall":5},"passed":false},{"actual":{"cars":{"L1":["reverse",7],"L2":["travel",0],"L3":["reverse",12]},"recall":0},"check":"sampled regression 33","expected":{"cars":{"L1":["reverse",7],"L2":["travel",0],"L3":["reverse",11]},"recall":0},"passed":false},{"actual":{"cars":{"L1":["nonstop",1],"L2":["nonstop",1],"L3":["reverse",12]},"recall":1},"check":"sampled regression 30","expected":{"cars":{"L1":["nonstop",1],"L2":["nonstop",1],"L3":["reverse",11]},"recall":1},"passed":false},{"actual":{"cars":{"L1":["travel",5]},"recall":5},"check":"boundary: smoke at the designated floor","expected":{"cars":{"L1":["travel",5]},"recall":5},"passed":true},{"actual":{"cars":{"L1":["reverse",1],"L2":["travel",0],"L3":["nonstop",0]},"recall":0},"check":"control 1","expected":{"cars":{"L1":["reverse",1],"L2":["travel",0],"L3":["nonstop",0]},"recall":0},"passed":true},{"actual":{"cars":{"L1":["nonstop",0]},"recall":0},"check":"control 4","expected":{"cars":{"L1":["nonstop",0]},"recall":0},"passed":true},{"actual":{"cars":{"L1":["reverse",8],"L2":["reverse",0]},"recall":1},"check":"control 7","expected":{"cars":{"L1":["reverse",8],"L2":["reverse",0]},"recall":1},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: passing the recall floor\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", -1]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 0]}}, \"passed\": false}, {\"check\": \"regression: moving away at the top\", \"actual\": {\"recall\": 5, \"cars\": {\"L1\": [\"reverse\", 12]}}, \"expected\": {\"recall\": 5, \"cars\": {\"L1\": [\"reverse\", 11]}}, \"passed\": false}, {\"check\": \"sampled regression 33\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 7], \"L2\": [\"travel\", 0], \"L3\": [\"reverse\", 12]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 7], \"L2\": [\"travel\", 0], \"L3\": [\"reverse\", 11]}}, \"passed\": false}, {\"check\": \"sampled regression 30\", \"actual\": {\"recall\": 1, \"cars\": {\"L1\": [\"nonstop\", 1], \"L2\": [\"nonstop\", 1], \"L3\": [\"reverse\", 12]}}, \"expected\": {\"recall\": 1, \"cars\": {\"L1\": [\"nonstop\", 1], \"L2\": [\"nonstop\", 1], \"L3\": [\"reverse\", 11]}}, \"passed\": false}, {\"check\": \"boundary: smoke at the designated floor\", \"actual\": {\"recall\": 5, \"cars\": {\"L1\": [\"travel\", 5]}}, \"expected\": {\"recall\": 5, \"cars\": {\"L1\": [\"travel\", 5]}}, \"passed\": true}, {\"check\": \"control 1\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 1], \"L2\": [\"travel\", 0], \"L3\": [\"nonstop\", 0]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 1], \"L2\": [\"travel\", 0], \"L3\": [\"nonstop\", 0]}}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"nonstop\", 0]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"nonstop\", 0]}}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"recall\": 1, \"cars\": {\"L1\": [\"reverse\", 8], \"L2\": [\"reverse\", 0]}}, \"expected\": {\"recall\": 1, \"cars\": {\"L1\": [\"reverse\", 8], \"L2\": [\"reverse\", 0]}}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.425,"exit_code":0,"observations":[{"actual":{"cars":{"L1":["reverse",0]},"recall":0},"check":"regression: passing the recall floor","expected":{"cars":{"L1":["reverse",0]},"recall":0},"passed":true},{"actual":{"cars":{"L1":["reverse",11]},"recall":5},"check":"regression: moving away at the top","expected":{"cars":{"L1":["reverse",11]},"recall":5},"passed":true},{"actual":{"cars":{"L1":["reverse",7],"L2":["travel",0],"L3":["reverse",11]},"recall":0},"check":"sampled regression 33","expected":{"cars":{"L1":["reverse",7],"L2":["travel",0],"L3":["reverse",11]},"recall":0},"passed":true},{"actual":{"cars":{"L1":["nonstop",1],"L2":["nonstop",1],"L3":["reverse",11]},"recall":1},"check":"sampled regression 30","expected":{"cars":{"L1":["nonstop",1],"L2":["nonstop",1],"L3":["reverse",11]},"recall":1},"passed":true},{"actual":{"cars":{"L1":["travel",5]},"recall":5},"check":"boundary: smoke at the designated floor","expected":{"cars":{"L1":["travel",5]},"recall":5},"passed":true},{"actual":{"cars":{"L1":["reverse",1],"L2":["travel",0],"L3":["nonstop",0]},"recall":0},"check":"control 1","expected":{"cars":{"L1":["reverse",1],"L2":["travel",0],"L3":["nonstop",0]},"recall":0},"passed":true},{"actual":{"cars":{"L1":["nonstop",0]},"recall":0},"check":"control 4","expected":{"cars":{"L1":["nonstop",0]},"recall":0},"passed":true},{"actual":{"cars":{"L1":["reverse",8],"L2":["reverse",0]},"recall":1},"check":"control 7","expected":{"cars":{"L1":["reverse",8],"L2":["reverse",0]},"recall":1},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: passing the recall floor\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 0]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 0]}}, \"passed\": true}, {\"check\": \"regression: moving away at the top\", \"actual\": {\"recall\": 5, \"cars\": {\"L1\": [\"reverse\", 11]}}, \"expected\": {\"recall\": 5, \"cars\": {\"L1\": [\"reverse\", 11]}}, \"passed\": true}, {\"check\": \"sampled regression 33\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 7], \"L2\": [\"travel\", 0], \"L3\": [\"reverse\", 11]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 7], \"L2\": [\"travel\", 0], \"L3\": [\"reverse\", 11]}}, \"passed\": true}, {\"check\": \"sampled regression 30\", \"actual\": {\"recall\": 1, \"cars\": {\"L1\": [\"nonstop\", 1], \"L2\": [\"nonstop\", 1], \"L3\": [\"reverse\", 11]}}, \"expected\": {\"recall\": 1, \"cars\": {\"L1\": [\"nonstop\", 1], \"L2\": [\"nonstop\", 1], \"L3\": [\"reverse\", 11]}}, \"passed\": true}, {\"check\": \"boundary: smoke at the designated floor\", \"actual\": {\"recall\": 5, \"cars\": {\"L1\": [\"travel\", 5]}}, \"expected\": {\"recall\": 5, \"cars\": {\"L1\": [\"travel\", 5]}}, \"passed\": true}, {\"check\": \"control 1\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 1], \"L2\": [\"travel\", 0], \"L3\": [\"nonstop\", 0]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"reverse\", 1], \"L2\": [\"travel\", 0], \"L3\": [\"nonstop\", 0]}}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"recall\": 0, \"cars\": {\"L1\": [\"nonstop\", 0]}}, \"expected\": {\"recall\": 0, \"cars\": {\"L1\": [\"nonstop\", 0]}}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"recall\": 1, \"cars\": {\"L1\": [\"reverse\", 8], \"L2\": [\"reverse\", 0]}}, \"expected\": {\"recall\": 1, \"cars\": {\"L1\": [\"reverse\", 8], \"L2\": [\"reverse\", 0]}}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}