{"abstract":"A call at the floor the car has just left, or a call wanting the other direction, is treated as directly on the way.","category":"Elevator dispatch scheduling","checks":8,"contract":"A moving car at floor with direction and car stops estimates its arrival at a hall call (target, call direction). Work in the car direction (mirror floors for down). If the target is strictly ahead and the call is in the car direction, the car goes straight there, stopping at stops strictly between. Otherwise it runs to the farthest of its stops ahead and the target, reverses and returns to the target, stopping at every stop ahead plus stops strictly between target and floor behind. A stop at the target floor is not extra. ETA = floors travelled * per_floor_s + stops * stop_s.","contract_signature":"x","evaluation_group":"w2-elevator_dispatch_scheduling-hall-call-eta","failed_approach":"Ignoring the call direction sends the car straight to a passenger who wants to travel the other way.","family":"w2-elevator_dispatch_scheduling-hall-call-eta-direct-service-condition","id":"FA-67541","implementations":{"attempt":{"sha256":"31e66f8ec14651c6024c5a41f00c8d0f8f808175b7cc3141c0d13540bff0b270","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    sg = 1 if x['dir'] == 'up' else -1\n    f = x['floor'] * sg\n    t = x['target'] * sg\n    stops = [s * sg for s in x['stops'] if s * sg != t]\n    same = x['call_dir'] == x['dir']\n    if t > f:\n        path = t - f\n        n = len([s for s in stops if f < s < t])\n    else:\n        ahead = [s for s in stops if s > f]\n        far = max(ahead + [t, f])\n        path = (far - f) + (far - t)\n        n = len(ahead) + len([s for s in stops if t < s < f])\n    return path * x['per_floor_s'] + n * x['stop_s']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('control 6', {'floor': 5, 'dir': 'down', 'target': 3, 'call_dir': 'up', 'stops': [2], 'per_floor_s': 3, 'stop_s': 10}, 22), ('boundary: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('boundary: call behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('control 1', {'floor': 6, 'dir': 'down', 'target': 12, 'call_dir': 'down', 'stops': [3, 4], 'per_floor_s': 2, 'stop_s': 12}, 48), ('control 4', {'floor': 1, 'dir': 'down', 'target': 14, 'call_dir': 'down', 'stops': [3, 10, 5], 'per_floor_s': 2, 'stop_s': 12}, 62), ('control 7', {'floor': 7, 'dir': 'up', 'target': 11, 'call_dir': 'up', 'stops': [1, 13, 9, 2], 'per_floor_s': 3, 'stop_s': 12}, 24)], [('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('control 74', {'floor': 6, 'dir': 'down', 'target': 5, 'call_dir': 'up', 'stops': [1, 14], 'per_floor_s': 3, 'stop_s': 8}, 35), ('boundary: stops behind served on return', {'floor': 6, 'dir': 'up', 'target': 1, 'call_dir': 'up', 'stops': [9, 3], 'per_floor_s': 2, 'stop_s': 10}, 42), ('boundary: stop at the target floor', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'up', 'stops': [8, 5], 'per_floor_s': 2, 'stop_s': 10}, 22), ('control 12', {'floor': 12, 'dir': 'down', 'target': 11, 'call_dir': 'down', 'stops': [4, 8, 7, 15], 'per_floor_s': 3, 'stop_s': 10}, 3), ('control 15', {'floor': 15, 'dir': 'up', 'target': 11, 'call_dir': 'down', 'stops': [3], 'per_floor_s': 3, 'stop_s': 12}, 12), ('control 18', {'floor': 1, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [8, 2, 11, 1], 'per_floor_s': 2, 'stop_s': 10}, 16)], [('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('control 77', {'floor': 12, 'dir': 'down', 'target': 8, 'call_dir': 'up', 'stops': [14, 10, 3], 'per_floor_s': 3, 'stop_s': 12}, 66), ('boundary: stops behind served on return', {'floor': 6, 'dir': 'up', 'target': 1, 'call_dir': 'up', 'stops': [9, 3], 'per_floor_s': 2, 'stop_s': 10}, 42), ('boundary: stop at the target floor', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'up', 'stops': [8, 5], 'per_floor_s': 2, 'stop_s': 10}, 22), ('control 23', {'floor': 4, 'dir': 'up', 'target': 13, 'call_dir': 'up', 'stops': [], 'per_floor_s': 2, 'stop_s': 12}, 18), ('control 26', {'floor': 14, 'dir': 'up', 'target': 15, 'call_dir': 'down', 'stops': [1, 14], 'per_floor_s': 2, 'stop_s': 8}, 2), ('control 29', {'floor': 8, 'dir': 'down', 'target': 6, 'call_dir': 'down', 'stops': [14, 15, 3], 'per_floor_s': 3, 'stop_s': 10}, 6)], [('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('boundary: stops beyond the target', {'floor': 2, 'dir': 'up', 'target': 6, 'call_dir': 'up', 'stops': [4, 10], 'per_floor_s': 2, 'stop_s': 10}, 18), ('boundary: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('boundary: call behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('control 34', {'floor': 7, 'dir': 'down', 'target': 7, 'call_dir': 'up', 'stops': [10, 7], 'per_floor_s': 2, 'stop_s': 8}, 0), ('control 37', {'floor': 14, 'dir': 'up', 'target': 11, 'call_dir': 'up', 'stops': [7, 4, 13, 1], 'per_floor_s': 2, 'stop_s': 10}, 16), ('control 40', {'floor': 10, 'dir': 'down', 'target': 11, 'call_dir': 'down', 'stops': [4, 10, 12, 5], 'per_floor_s': 3, 'stop_s': 10}, 59)], [('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('control 6', {'floor': 5, 'dir': 'down', 'target': 3, 'call_dir': 'up', 'stops': [2], 'per_floor_s': 3, 'stop_s': 10}, 22), ('boundary: call behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('boundary: stops behind served on return', {'floor': 6, 'dir': 'up', 'target': 1, 'call_dir': 'up', 'stops': [9, 3], 'per_floor_s': 2, 'stop_s': 10}, 42), ('control 45', {'floor': 2, 'dir': 'down', 'target': 0, 'call_dir': 'down', 'stops': [3, 12, 7, 11], 'per_floor_s': 2, 'stop_s': 8}, 4), ('control 48', {'floor': 8, 'dir': 'down', 'target': 2, 'call_dir': 'up', 'stops': [8, 7, 4, 6], 'per_floor_s': 3, 'stop_s': 8}, 42), ('control 51', {'floor': 11, 'dir': 'up', 'target': 4, 'call_dir': 'down', 'stops': [], 'per_floor_s': 3, 'stop_s': 12}, 21)]]\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":"4e388a54e2476267c54eae141e60b2a42940940f2a15c95829d24d66854ada28","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    sg = 1 if x['dir'] == 'up' else -1\n    f = x['floor'] * sg\n    t = x['target'] * sg\n    stops = [s * sg for s in x['stops'] if s * sg != t]\n    same = x['call_dir'] == x['dir']\n    if t >= f and same:\n        path = t - f\n        n = len([s for s in stops if f < s < t])\n    else:\n        ahead = [s for s in stops if s > f]\n        far = max(ahead + [t, f])\n        path = (far - f) + (far - t)\n        n = len(ahead) + len([s for s in stops if t < s < f])\n    return path * x['per_floor_s'] + n * x['stop_s']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('control 6', {'floor': 5, 'dir': 'down', 'target': 3, 'call_dir': 'up', 'stops': [2], 'per_floor_s': 3, 'stop_s': 10}, 22), ('boundary: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('boundary: call behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('control 1', {'floor': 6, 'dir': 'down', 'target': 12, 'call_dir': 'down', 'stops': [3, 4], 'per_floor_s': 2, 'stop_s': 12}, 48), ('control 4', {'floor': 1, 'dir': 'down', 'target': 14, 'call_dir': 'down', 'stops': [3, 10, 5], 'per_floor_s': 2, 'stop_s': 12}, 62), ('control 7', {'floor': 7, 'dir': 'up', 'target': 11, 'call_dir': 'up', 'stops': [1, 13, 9, 2], 'per_floor_s': 3, 'stop_s': 12}, 24)], [('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('control 74', {'floor': 6, 'dir': 'down', 'target': 5, 'call_dir': 'up', 'stops': [1, 14], 'per_floor_s': 3, 'stop_s': 8}, 35), ('boundary: stops behind served on return', {'floor': 6, 'dir': 'up', 'target': 1, 'call_dir': 'up', 'stops': [9, 3], 'per_floor_s': 2, 'stop_s': 10}, 42), ('boundary: stop at the target floor', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'up', 'stops': [8, 5], 'per_floor_s': 2, 'stop_s': 10}, 22), ('control 12', {'floor': 12, 'dir': 'down', 'target': 11, 'call_dir': 'down', 'stops': [4, 8, 7, 15], 'per_floor_s': 3, 'stop_s': 10}, 3), ('control 15', {'floor': 15, 'dir': 'up', 'target': 11, 'call_dir': 'down', 'stops': [3], 'per_floor_s': 3, 'stop_s': 12}, 12), ('control 18', {'floor': 1, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [8, 2, 11, 1], 'per_floor_s': 2, 'stop_s': 10}, 16)], [('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('control 77', {'floor': 12, 'dir': 'down', 'target': 8, 'call_dir': 'up', 'stops': [14, 10, 3], 'per_floor_s': 3, 'stop_s': 12}, 66), ('boundary: stops behind served on return', {'floor': 6, 'dir': 'up', 'target': 1, 'call_dir': 'up', 'stops': [9, 3], 'per_floor_s': 2, 'stop_s': 10}, 42), ('boundary: stop at the target floor', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'up', 'stops': [8, 5], 'per_floor_s': 2, 'stop_s': 10}, 22), ('control 23', {'floor': 4, 'dir': 'up', 'target': 13, 'call_dir': 'up', 'stops': [], 'per_floor_s': 2, 'stop_s': 12}, 18), ('control 26', {'floor': 14, 'dir': 'up', 'target': 15, 'call_dir': 'down', 'stops': [1, 14], 'per_floor_s': 2, 'stop_s': 8}, 2), ('control 29', {'floor': 8, 'dir': 'down', 'target': 6, 'call_dir': 'down', 'stops': [14, 15, 3], 'per_floor_s': 3, 'stop_s': 10}, 6)], [('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('boundary: stops beyond the target', {'floor': 2, 'dir': 'up', 'target': 6, 'call_dir': 'up', 'stops': [4, 10], 'per_floor_s': 2, 'stop_s': 10}, 18), ('boundary: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('boundary: call behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('control 34', {'floor': 7, 'dir': 'down', 'target': 7, 'call_dir': 'up', 'stops': [10, 7], 'per_floor_s': 2, 'stop_s': 8}, 0), ('control 37', {'floor': 14, 'dir': 'up', 'target': 11, 'call_dir': 'up', 'stops': [7, 4, 13, 1], 'per_floor_s': 2, 'stop_s': 10}, 16), ('control 40', {'floor': 10, 'dir': 'down', 'target': 11, 'call_dir': 'down', 'stops': [4, 10, 12, 5], 'per_floor_s': 3, 'stop_s': 10}, 59)], [('regression: call at the current floor', {'floor': 5, 'dir': 'up', 'target': 5, 'call_dir': 'up', 'stops': [9], 'per_floor_s': 2, 'stop_s': 10}, 26), ('boundary: call ahead but opposite direction', {'floor': 2, 'dir': 'up', 'target': 8, 'call_dir': 'down', 'stops': [5, 11], 'per_floor_s': 2, 'stop_s': 10}, 44), ('control 6', {'floor': 5, 'dir': 'down', 'target': 3, 'call_dir': 'up', 'stops': [2], 'per_floor_s': 3, 'stop_s': 10}, 22), ('boundary: call behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('boundary: stops behind served on return', {'floor': 6, 'dir': 'up', 'target': 1, 'call_dir': 'up', 'stops': [9, 3], 'per_floor_s': 2, 'stop_s': 10}, 42), ('control 45', {'floor': 2, 'dir': 'down', 'target': 0, 'call_dir': 'down', 'stops': [3, 12, 7, 11], 'per_floor_s': 2, 'stop_s': 8}, 4), ('control 48', {'floor': 8, 'dir': 'down', 'target': 2, 'call_dir': 'up', 'stops': [8, 7, 4, 6], 'per_floor_s': 3, 'stop_s': 8}, 42), ('control 51', {'floor': 11, 'dir': 'up', 'target': 4, 'call_dir': 'down', 'stops': [], 'per_floor_s': 3, 'stop_s': 12}, 21)]]\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-hall-call-eta-direct-service-condition","generated_at":"2026-09-29T14:47:53.902132+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.","root_cause":"The direct-service test accepts the current floor.","sha256":"ddc14af4d6920b6662f733d6b3dd4d3e743358c4d4aeb54460e9945dc590899a","title":"Hall call ETA with intermediate stops: direct service condition · 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.886,"exit_code":1,"observations":[{"actual":26,"check":"regression: call at the current floor","expected":26,"passed":true},{"actual":22,"check":"boundary: call ahead but opposite direction","expected":44,"passed":false},{"actual":6,"check":"control 6","expected":22,"passed":false},{"actual":22,"check":"boundary: down car mirrored","expected":22,"passed":true},{"actual":30,"check":"boundary: call behind a down car","expected":30,"passed":true},{"actual":48,"check":"control 1","expected":48,"passed":true},{"actual":62,"check":"control 4","expected":62,"passed":true},{"actual":24,"check":"control 7","expected":24,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: call at the current floor\", \"actual\": 26, \"expected\": 26, \"passed\": true}, {\"check\": \"boundary: call ahead but opposite direction\", \"actual\": 22, \"expected\": 44, \"passed\": false}, {\"check\": \"control 6\", \"actual\": 6, \"expected\": 22, \"passed\": false}, {\"check\": \"boundary: down car mirrored\", \"actual\": 22, \"expected\": 22, \"passed\": true}, {\"check\": \"boundary: call behind a down car\", \"actual\": 30, \"expected\": 30, \"passed\": true}, {\"check\": \"control 1\", \"actual\": 48, \"expected\": 48, \"passed\": true}, {\"check\": \"control 4\", \"actual\": 62, \"expected\": 62, \"passed\": true}, {\"check\": \"control 7\", \"actual\": 24, \"expected\": 24, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.424,"exit_code":1,"observations":[{"actual":0,"check":"regression: call at the current floor","expected":26,"passed":false},{"actual":44,"check":"boundary: call ahead but opposite direction","expected":44,"passed":true},{"actual":22,"check":"control 6","expected":22,"passed":true},{"actual":22,"check":"boundary: down car mirrored","expected":22,"passed":true},{"actual":30,"check":"boundary: call behind a down car","expected":30,"passed":true},{"actual":48,"check":"control 1","expected":48,"passed":true},{"actual":62,"check":"control 4","expected":62,"passed":true},{"actual":24,"check":"control 7","expected":24,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: call at the current floor\", \"actual\": 0, \"expected\": 26, \"passed\": false}, {\"check\": \"boundary: call ahead but opposite direction\", \"actual\": 44, \"expected\": 44, \"passed\": true}, {\"check\": \"control 6\", \"actual\": 22, \"expected\": 22, \"passed\": true}, {\"check\": \"boundary: down car mirrored\", \"actual\": 22, \"expected\": 22, \"passed\": true}, {\"check\": \"boundary: call behind a down car\", \"actual\": 30, \"expected\": 30, \"passed\": true}, {\"check\": \"control 1\", \"actual\": 48, \"expected\": 48, \"passed\": true}, {\"check\": \"control 4\", \"actual\": 62, \"expected\": 62, \"passed\": true}, {\"check\": \"control 7\", \"actual\": 24, \"expected\": 24, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}