{"abstract":"ETAs for down-travelling cars count the wrong stops.","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":"Using mirrored values only in the filter still leaves the stops unmirrored.","family":"w2-elevator_dispatch_scheduling-hall-call-eta-direction-mirroring","id":"FA-67536","implementations":{"attempt":{"sha256":"47929df7646cbd41678aae8b2967007a9d97dd5c27cb17a8ee3022e59ee8b6dd","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 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: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('sampled regression 4', {'floor': 1, 'dir': 'down', 'target': 14, 'call_dir': 'down', 'stops': [3, 10, 5], 'per_floor_s': 2, 'stop_s': 12}, 62), ('regression: 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), ('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), ('sampled regression 1', {'floor': 6, 'dir': 'down', 'target': 12, 'call_dir': 'down', 'stops': [3, 4], 'per_floor_s': 2, 'stop_s': 12}, 48), ('control 7', {'floor': 7, 'dir': 'up', 'target': 11, 'call_dir': 'up', 'stops': [1, 13, 9, 2], 'per_floor_s': 3, 'stop_s': 12}, 24), ('control 10', {'floor': 3, 'dir': 'up', 'target': 1, 'call_dir': 'down', 'stops': [15, 13], 'per_floor_s': 3, 'stop_s': 10}, 98)], [('regression: call behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('sampled regression 38', {'floor': 8, 'dir': 'down', 'target': 4, 'call_dir': 'up', 'stops': [11], 'per_floor_s': 2, 'stop_s': 8}, 8), ('sampled regression 19', {'floor': 15, 'dir': 'down', 'target': 7, 'call_dir': 'down', 'stops': [8, 13, 0], 'per_floor_s': 2, 'stop_s': 8}, 32), ('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), ('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), ('sampled regression 18', {'floor': 1, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [8, 2, 11, 1], 'per_floor_s': 2, 'stop_s': 10}, 16)], [('regression: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('sampled regression 58', {'floor': 14, 'dir': 'down', 'target': 6, 'call_dir': 'down', 'stops': [12, 9, 11], 'per_floor_s': 2, 'stop_s': 8}, 40), ('sampled regression 40', {'floor': 10, 'dir': 'down', 'target': 11, 'call_dir': 'down', 'stops': [4, 10, 12, 5], 'per_floor_s': 3, 'stop_s': 10}, 59), ('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 behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('sampled regression 72', {'floor': 3, 'dir': 'down', 'target': 1, 'call_dir': 'up', 'stops': [4, 1, 3, 2], 'per_floor_s': 3, 'stop_s': 8}, 14), ('sampled regression 52', {'floor': 6, 'dir': 'down', 'target': 13, 'call_dir': 'down', 'stops': [1, 2, 0, 15], 'per_floor_s': 2, 'stop_s': 12}, 74), ('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), ('regression: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('sampled regression 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), ('sampled regression 40', {'floor': 10, 'dir': 'down', 'target': 11, 'call_dir': 'down', 'stops': [4, 10, 12, 5], 'per_floor_s': 3, 'stop_s': 10}, 59)], [('regression: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('sampled regression 6', {'floor': 5, 'dir': 'down', 'target': 3, 'call_dir': 'up', 'stops': [2], 'per_floor_s': 3, 'stop_s': 10}, 22), ('sampled regression 66', {'floor': 14, 'dir': 'down', 'target': 5, 'call_dir': 'down', 'stops': [14, 8, 0], 'per_floor_s': 2, 'stop_s': 10}, 28), ('regression: 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), ('sampled regression 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":"1d1b6296cc213ed8869af3418d655a7c1362fdd548417161f1f64b615b2be227","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 for s in x['stops'] if s != x['target']]\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: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('sampled regression 4', {'floor': 1, 'dir': 'down', 'target': 14, 'call_dir': 'down', 'stops': [3, 10, 5], 'per_floor_s': 2, 'stop_s': 12}, 62), ('regression: 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), ('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), ('sampled regression 1', {'floor': 6, 'dir': 'down', 'target': 12, 'call_dir': 'down', 'stops': [3, 4], 'per_floor_s': 2, 'stop_s': 12}, 48), ('control 7', {'floor': 7, 'dir': 'up', 'target': 11, 'call_dir': 'up', 'stops': [1, 13, 9, 2], 'per_floor_s': 3, 'stop_s': 12}, 24), ('control 10', {'floor': 3, 'dir': 'up', 'target': 1, 'call_dir': 'down', 'stops': [15, 13], 'per_floor_s': 3, 'stop_s': 10}, 98)], [('regression: call behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('sampled regression 38', {'floor': 8, 'dir': 'down', 'target': 4, 'call_dir': 'up', 'stops': [11], 'per_floor_s': 2, 'stop_s': 8}, 8), ('sampled regression 19', {'floor': 15, 'dir': 'down', 'target': 7, 'call_dir': 'down', 'stops': [8, 13, 0], 'per_floor_s': 2, 'stop_s': 8}, 32), ('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), ('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), ('sampled regression 18', {'floor': 1, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [8, 2, 11, 1], 'per_floor_s': 2, 'stop_s': 10}, 16)], [('regression: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('sampled regression 58', {'floor': 14, 'dir': 'down', 'target': 6, 'call_dir': 'down', 'stops': [12, 9, 11], 'per_floor_s': 2, 'stop_s': 8}, 40), ('sampled regression 40', {'floor': 10, 'dir': 'down', 'target': 11, 'call_dir': 'down', 'stops': [4, 10, 12, 5], 'per_floor_s': 3, 'stop_s': 10}, 59), ('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 behind a down car', {'floor': 10, 'dir': 'down', 'target': 12, 'call_dir': 'up', 'stops': [6], 'per_floor_s': 2, 'stop_s': 10}, 30), ('sampled regression 72', {'floor': 3, 'dir': 'down', 'target': 1, 'call_dir': 'up', 'stops': [4, 1, 3, 2], 'per_floor_s': 3, 'stop_s': 8}, 14), ('sampled regression 52', {'floor': 6, 'dir': 'down', 'target': 13, 'call_dir': 'down', 'stops': [1, 2, 0, 15], 'per_floor_s': 2, 'stop_s': 12}, 74), ('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), ('regression: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('sampled regression 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), ('sampled regression 40', {'floor': 10, 'dir': 'down', 'target': 11, 'call_dir': 'down', 'stops': [4, 10, 12, 5], 'per_floor_s': 3, 'stop_s': 10}, 59)], [('regression: down car mirrored', {'floor': 10, 'dir': 'down', 'target': 4, 'call_dir': 'down', 'stops': [7], 'per_floor_s': 2, 'stop_s': 10}, 22), ('sampled regression 6', {'floor': 5, 'dir': 'down', 'target': 3, 'call_dir': 'up', 'stops': [2], 'per_floor_s': 3, 'stop_s': 10}, 22), ('sampled regression 66', {'floor': 14, 'dir': 'down', 'target': 5, 'call_dir': 'down', 'stops': [14, 8, 0], 'per_floor_s': 2, 'stop_s': 10}, 28), ('regression: 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), ('sampled regression 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-direction-mirroring","generated_at":"2026-09-29T14:47:53.768271+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":"Stops are not mirrored with the car and target floors.","sha256":"da72971d6357909e96ae07d6373fd614a8ff153d2360c013651b8bd65f5f411e","title":"Hall call ETA with intermediate stops: direction mirroring · 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.258,"exit_code":1,"observations":[{"actual":12,"check":"regression: down car mirrored","expected":22,"passed":false},{"actual":106,"check":"sampled regression 4","expected":62,"passed":false},{"actual":78,"check":"regression: call behind a down car","expected":30,"passed":false},{"actual":44,"check":"boundary: call ahead but opposite direction","expected":44,"passed":true},{"actual":26,"check":"boundary: call at the current floor","expected":26,"passed":true},{"actual":76,"check":"sampled regression 1","expected":48,"passed":false},{"actual":24,"check":"control 7","expected":24,"passed":true},{"actual":98,"check":"control 10","expected":98,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: down car mirrored\", \"actual\": 12, \"expected\": 22, \"passed\": false}, {\"check\": \"sampled regression 4\", \"actual\": 106, \"expected\": 62, \"passed\": false}, {\"check\": \"regression: call behind a down car\", \"actual\": 78, \"expected\": 30, \"passed\": false}, {\"check\": \"boundary: call ahead but opposite direction\", \"actual\": 44, \"expected\": 44, \"passed\": true}, {\"check\": \"boundary: call at the current floor\", \"actual\": 26, \"expected\": 26, \"passed\": true}, {\"check\": \"sampled regression 1\", \"actual\": 76, \"expected\": 48, \"passed\": false}, {\"check\": \"control 7\", \"actual\": 24, \"expected\": 24, \"passed\": true}, {\"check\": \"control 10\", \"actual\": 98, \"expected\": 98, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.423,"exit_code":1,"observations":[{"actual":12,"check":"regression: down car mirrored","expected":22,"passed":false},{"actual":106,"check":"sampled regression 4","expected":62,"passed":false},{"actual":78,"check":"regression: call behind a down car","expected":30,"passed":false},{"actual":44,"check":"boundary: call ahead but opposite direction","expected":44,"passed":true},{"actual":26,"check":"boundary: call at the current floor","expected":26,"passed":true},{"actual":76,"check":"sampled regression 1","expected":48,"passed":false},{"actual":24,"check":"control 7","expected":24,"passed":true},{"actual":98,"check":"control 10","expected":98,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: down car mirrored\", \"actual\": 12, \"expected\": 22, \"passed\": false}, {\"check\": \"sampled regression 4\", \"actual\": 106, \"expected\": 62, \"passed\": false}, {\"check\": \"regression: call behind a down car\", \"actual\": 78, \"expected\": 30, \"passed\": false}, {\"check\": \"boundary: call ahead but opposite direction\", \"actual\": 44, \"expected\": 44, \"passed\": true}, {\"check\": \"boundary: call at the current floor\", \"actual\": 26, \"expected\": 26, \"passed\": true}, {\"check\": \"sampled regression 1\", \"actual\": 76, \"expected\": 48, \"passed\": false}, {\"check\": \"control 7\", \"actual\": 24, \"expected\": 24, \"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."}}