The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(windows): exercise installer stages and isolate runner handoff
ethernet4be4382b0fc9
diff --git a/tests/test_install_ps1_desktop_stage.py b/tests/test_install_ps1_desktop_stage.pyindex 47d6461f0b6..7a7ad55faa2 100644--- a/tests/test_install_ps1_desktop_stage.py+++ b/tests/test_install_ps1_desktop_stage.py@@ -124,7 +124,9 @@ function ie4uinit.exe {$global:LASTEXITCODE = 0}-. $InstallerPath -Stage desktop -Json -HermesHome $HermesHome -InstallDir $InstallDir+# Load the definitions, then execute the real stage dispatcher.+. $InstallerPath -InstallDir $InstallDir -HermesHome $HermesHome+Invoke-StageByName 'desktop'exit $LASTEXITCODE'''@@ -253,8 +255,6 @@ def test_desktop_stage_uses_pm_sync_and_product_cli(tmp_path: Path) -> None:calls = [l.split("\u0001") for l in py_log.read_text().splitlines()] if py_log.exists() else "NO LOG"assert run.returncode == 0, f"{run.stdout}{run.stderr}\nFAKE LOG:\n{calls}"- frame = json.loads(run.stdout.splitlines()[-1])- assert frame["ok"] is True and frame["stage"] == "desktop"assert isinstance(calls, list)# 1. wake/voice extras via pm's venv sync (the pm-owned path).diff --git a/tests/test_install_ps1_managed_python_provenance.py b/tests/test_install_ps1_managed_python_provenance.pyindex 0a8d297c81d..8969623025f 100644--- a/tests/test_install_ps1_managed_python_provenance.py+++ b/tests/test_install_ps1_managed_python_provenance.py@@ -36,7 +36,9 @@ function Get-Command {Microsoft.PowerShell.Core\Get-Command $Name}function Invoke-WebRequest { throw 'network access outside test boundary' }-. $Installer -Stage python-deps -Json -InstallDir $InstallDir -HermesHome $HomeDir+# Load the definitions, then execute the real stage dispatcher.+. $Installer -InstallDir $InstallDir -HermesHome $HomeDir+Invoke-StageByName 'python-deps'exit $LASTEXITCODE''', encoding="utf-8-sig")run = subprocess.run([powershell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", str(wrapper),diff --git a/tests/test_run_tests_parallel.py b/tests/test_run_tests_parallel.pyindex 950f0dc9c3f..004a2e90ced 100644--- a/tests/test_run_tests_parallel.py+++ b/tests/test_run_tests_parallel.py@@ -39,17 +39,6 @@ def isolated_probe_environment(monkeypatch):monkeypatch.setenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", "1")-# Both tests share the same handoff file: the leaker writes here, the-# verifier reads here. We park it in $TMPDIR with a unique-per-run name-# so concurrent invocations of the suite don't clobber each other.-_HANDOFF_DIR = Path(os.environ.get("TMPDIR", "/tmp")) / "hermes-isolation-probe"-_HANDOFF_DIR.mkdir(exist_ok=True)---def _handoff_path_for(nonce: str) -> Path:- return _HANDOFF_DIR / f"grandchild-{nonce}.json"--def _probe_root(tmp_path):root = tmp_path / "runner-root"scripts = root / "scripts"@@ -137,9 +126,7 @@ def test_grandchild_leak_is_killed_by_runner(tmp_path: Path) -> None:probe_dir.mkdir()probe = probe_dir / "test_probe_leaker.py"nonce = f"{os.getpid()}-{int(time.time() * 1000)}"- handoff = _handoff_path_for(nonce)- if handoff.exists():- handoff.unlink()+ handoff = tmp_path / f"grandchild-{nonce}.json"probe_src = textwrap.dedent(f"""import json, os, subprocess, sys, time