From 1ab7983641fb245247ade2190d2bb8dfd9a25127 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Wed, 7 Oct 2026 06:59:55 -0700 Subject: [PATCH] test(ci): the CI replay does not run Git Bash under x64 emulation on Windows arm64 Mechanism: Git for Windows on arm64 ships native git.exe but an x86-64 MSYS usr/bin/bash.exe, which runs under the WoA x64 emulator. With the os-tests lane's 16 parallel workers, a replayed step's bash dies before running a line with 0xC000026F (STATUS_WX86_INTERNAL_ERROR) or 0xC0000005 and empty stdout/stderr, so an unmodified baseline replay fails as a bare AssertionError (jobs 112635777217 and 112764629268, two different nodeids). Repro (throwaway workflows on the real runners, previous commit's diagnostics): - windows-latest-32-arm-core, 16 copies of the file's replay tests at once, 4 rounds: 21/64 copies red, every failure 0xC000026F. - Same load, windows-latest-32-core (x64): 0/64. - Passing SYSTEMROOT/WINDIR or the full Windows env to the step: 12/48 and 17/48 vs 15/48 base, so the stripped env is not the cause. - One process, 32 threads, 600 replays: 0 crashes; it takes concurrent processes, i.e. host-wide emulator load. Seam: _NATIVE_WINDOWS_TOO keeps platforms("linux", "windows") and adds a skipif for win32 + native_arch() == arm64. The x64 Windows row still runs the replay on the Windows layout (python.exe-only venv, Git Bash), Linux arm64 keeps it (native bash), and the routing guard that pins the marker passes. --- tests/ci/test_update_ci_routing.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/ci/test_update_ci_routing.py b/tests/ci/test_update_ci_routing.py index 7863d9a79a..81f0717132 100644 --- a/tests/ci/test_update_ci_routing.py +++ b/tests/ci/test_update_ci_routing.py @@ -32,6 +32,7 @@ from typing import Any import pytest +from hermes_platform.host.facts import native_arch from tests.ci import _gha_expr as gha from tests.ci import workflow_steps @@ -49,7 +50,19 @@ _spec.loader.exec_module(cc) # bash is Git Bash: the replay, its dispatch chain and the ineffective-step controls carry this # marker so a green Windows job has run them on that layout (review F81-R). Not "any": macOS # bash 3.2 is not a host the replay has been run on. -_NATIVE_WINDOWS_TOO = pytest.mark.platforms("linux", "windows") +_NATIVE_WINDOWS_PLATFORMS = pytest.mark.platforms("linux", "windows") +# Not Windows on arm64: Git for Windows ships an x86-64 MSYS bash.exe there, run under emulation, +# and with the os-tests lane's 16 workers it dies with 0xC000026F (STATUS_WX86_INTERNAL_ERROR) or +# 0xC0000005 before running a line, on replays of unchanged workflows: one copy of this file red +# in ~3 when 16 run at once, against 0/64 on x64 Windows under the same load. The emulator's +# crash is not the replay's to assert on; the x64 Windows row runs the same layout natively. +_EMULATED_BASH = pytest.mark.skipif( + sys.platform == "win32" and native_arch() == "arm64", + reason="Git Bash is x86-64 under emulation on Windows arm64 and crashes under parallel load") + + +def _NATIVE_WINDOWS_TOO(test): + return _NATIVE_WINDOWS_PLATFORMS(_EMULATED_BASH(test)) _lister_spec = importlib.util.spec_from_file_location("list_os_marked", _REPO / "scripts/ci/list_os_marked_tests.py") assert _lister_spec is not None and _lister_spec.loader is not None lister = importlib.util.module_from_spec(_lister_spec)