diff --git a/.github/workflows/tests-os.yml b/.github/workflows/tests-os.yml index 1cb17c95f6..91bf910d49 100644 --- a/.github/workflows/tests-os.yml +++ b/.github/workflows/tests-os.yml @@ -81,7 +81,10 @@ jobs: - name: Set up locked Python and test dependencies uses: ./.github/actions/setup-pm with: - packages: ripgrep + # Installer stage tests inherit setup-pm's HERMES_RUNTIME_DIR. Prepare + # the verified Git pin once, before per-file parallelism; otherwise + # each isolated PowerShell stage races to download/extract the archive. + packages: ${{ matrix.marker == 'windows' && 'git,ripgrep' || 'ripgrep' }} extras: '["all", "telegram", "anthropic", "mistral", "fal", "modal", "daytona", "hindsight", "parallel-web"]' test-environment: 'true' prune-python-cache: true diff --git a/tests/scripts/install/test_install_ps1_staged_git.py b/tests/scripts/install/test_install_ps1_staged_git.py index 30fad69734..d839fd078a 100644 --- a/tests/scripts/install/test_install_ps1_staged_git.py +++ b/tests/scripts/install/test_install_ps1_staged_git.py @@ -43,6 +43,11 @@ def test_stage_processes_restore_pinned_git_and_never_fall_back(tmp_path): stage("prerequisites") staged = list(store.glob("git-*/cmd/git.exe")) assert len(staged) == 1 + # A wrong Git earlier on the parent's PATH must not win in either new stage. + poison = tmp_path / "poison" + poison.mkdir() + (poison / "git.cmd").write_text("@echo unpinned git invoked 1>&2 & exit /b 73\r\n", encoding="utf-8") + env["PATH"] = str(poison) + os.pathsep + env["PATH"] stage("repository") # new process; prerequisites' PATH cannot propagate stage("complete") # the marker's bare git call is also a new process checkout = home / "hermes-agent"