{"abstract":"A direct run charges a stop at the car current floor or stops beyond the target.","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":"Counting every stop ahead charges stops beyond the target.","family":"w2-elevator_dispatch_scheduling-hall-call-eta-direct-leg-stops","id":"FA-67556","implementations":{"attempt":{"sha256":"bd6707dde61f80672123c2aa80f0dca4d9002aafc1144a7d7c9ba7e7a8198ca5","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 s > f])\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 = [[('sampled regression 41', {'floor': 11, 'dir': 'down', 'target': 6, 'call_dir': 'down', 'stops': [8, 11, 13], 'per_floor_s': 3, 'stop_s': 12}, 27), ('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), ('control 7', {'floor': 7, 'dir': 'up', 'target': 11, 'call_dir': 'up', 'stops': [1, 13, 9, 2], 'per_floor_s': 3, 'stop_s': 12}, 24), ('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 10', {'floor': 3, 'dir': 'up', 'target': 1, 'call_dir': 'down', 'stops': [15, 13], 'per_floor_s': 3, 'stop_s': 10}, 98)], [('sampled regression 64', {'floor': 10, 'dir': 'up', 'target': 13, 'call_dir': 'up', 'stops': [10, 15], 'per_floor_s': 3, 'stop_s': 8}, 9), ('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: 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: 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: 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 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)], [('sampled regression 66', {'floor': 14, 'dir': 'down', 'target': 5, 'call_dir': 'down', 'stops': [14, 8, 0], 'per_floor_s': 2, 'stop_s': 10}, 28), ('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), ('control 19', {'floor': 15, 'dir': 'down', 'target': 7, 'call_dir': 'down', 'stops': [8, 13, 0], 'per_floor_s': 2, 'stop_s': 8}, 32), ('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)], [('sampled regression 41', {'floor': 11, 'dir': 'down', 'target': 6, 'call_dir': 'down', 'stops': [8, 11, 13], 'per_floor_s': 3, 'stop_s': 12}, 27), ('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), ('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 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)], [('sampled regression 64', {'floor': 10, 'dir': 'up', 'target': 13, 'call_dir': 'up', 'stops': [10, 15], 'per_floor_s': 3, 'stop_s': 8}, 9), ('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), ('control 30', {'floor': 7, 'dir': 'up', 'target': 9, 'call_dir': 'up', 'stops': [4, 0, 15, 2], 'per_floor_s': 3, 'stop_s': 12}, 6), ('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: 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 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":"e6167e0736c7a941825504e90504f27ca87f192fb044a3f0a48f45e8fbf64c7b","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 = [[('sampled regression 41', {'floor': 11, 'dir': 'down', 'target': 6, 'call_dir': 'down', 'stops': [8, 11, 13], 'per_floor_s': 3, 'stop_s': 12}, 27), ('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), ('control 7', {'floor': 7, 'dir': 'up', 'target': 11, 'call_dir': 'up', 'stops': [1, 13, 9, 2], 'per_floor_s': 3, 'stop_s': 12}, 24), ('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 10', {'floor': 3, 'dir': 'up', 'target': 1, 'call_dir': 'down', 'stops': [15, 13], 'per_floor_s': 3, 'stop_s': 10}, 98)], [('sampled regression 64', {'floor': 10, 'dir': 'up', 'target': 13, 'call_dir': 'up', 'stops': [10, 15], 'per_floor_s': 3, 'stop_s': 8}, 9), ('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: 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: 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: 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 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)], [('sampled regression 66', {'floor': 14, 'dir': 'down', 'target': 5, 'call_dir': 'down', 'stops': [14, 8, 0], 'per_floor_s': 2, 'stop_s': 10}, 28), ('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), ('control 19', {'floor': 15, 'dir': 'down', 'target': 7, 'call_dir': 'down', 'stops': [8, 13, 0], 'per_floor_s': 2, 'stop_s': 8}, 32), ('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)], [('sampled regression 41', {'floor': 11, 'dir': 'down', 'target': 6, 'call_dir': 'down', 'stops': [8, 11, 13], 'per_floor_s': 3, 'stop_s': 12}, 27), ('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), ('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 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)], [('sampled regression 64', {'floor': 10, 'dir': 'up', 'target': 13, 'call_dir': 'up', 'stops': [10, 15], 'per_floor_s': 3, 'stop_s': 8}, 9), ('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), ('control 30', {'floor': 7, 'dir': 'up', 'target': 9, 'call_dir': 'up', 'stops': [4, 0, 15, 2], 'per_floor_s': 3, 'stop_s': 12}, 6), ('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: 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 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-leg-stops","generated_at":"2026-09-29T14:47:53.949341+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 stop window is inclusive at both ends.","sha256":"1740e9c546b5f63355dcb1b8f1048c8dd73e0aa81e05e1b4e42e68c808ac19f2","title":"Hall call ETA with intermediate stops: direct leg stops · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":38.856,"exit_code":1,"observations":[{"actual":27,"check":"sampled regression 41","expected":27,"passed":true},{"actual":28,"check":"boundary: stops beyond the target","expected":18,"passed":false},{"actual":36,"check":"control 7","expected":24,"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":98,"check":"control 10","expected":98,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"sampled regression 41\", \"actual\": 27, \"expected\": 27, \"passed\": true}, {\"check\": \"boundary: stops beyond the target\", \"actual\": 28, \"expected\": 18, \"passed\": false}, {\"check\": \"control 7\", \"actual\": 36, \"expected\": 24, \"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 10\", \"actual\": 98, \"expected\": 98, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.936,"exit_code":1,"observations":[{"actual":39,"check":"sampled regression 41","expected":27,"passed":false},{"actual":18,"check":"boundary: stops beyond the target","expected":18,"passed":true},{"actual":24,"check":"control 7","expected":24,"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":98,"check":"control 10","expected":98,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"sampled regression 41\", \"actual\": 39, \"expected\": 27, \"passed\": false}, {\"check\": \"boundary: stops beyond the target\", \"actual\": 18, \"expected\": 18, \"passed\": true}, {\"check\": \"control 7\", \"actual\": 24, \"expected\": 24, \"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 10\", \"actual\": 98, \"expected\": 98, \"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."}}