From 1649a22f5a9a22ff94a71f8fb0ce465a92cb0ed7 Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Sat, 6 Jun 2026 16:16:39 -0700 Subject: [PATCH] =?UTF-8?q?Release=20v0.51.301=20=E2=80=94=20stage-3710=20?= =?UTF-8?q?(hide=20test-helper=20console=20windows=20on=20Windows=20#3710)?= =?UTF-8?q?=20(#3753)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test(windows): hide test helper console windows (#3706) * test(windows): use CREATE_NO_WINDOW constant (#3706) * test(windows): hide test-helper console windows on Windows (#3710 fixes #3706) @rodboev. Long-lived test helper subprocesses (test server, browser-smoke, TLS helper, ctl helpers) now spawn with CREATE_NO_WINDOW on Windows so a local pytest run doesn't pop focus-stealing console windows. sys.platform=='win32' guarded → no-op on macOS/Linux (expands to **{}). Test-only, no production code, no user impact. + CHANGELOG v0.51.301. --------- Co-authored-by: Rod Boev Co-authored-by: nesquena-hermes <[email protected]> --- CHANGELOG.md | 5 +++++ tests/browser_smoke.py | 1 + tests/conftest.py | 1 + tests/test_ctl_script.py | 10 ++++++++-- tests/test_tls_support.py | 4 +++- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34ea077d..2d28c473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ ## [Unreleased] +## [v0.51.301] — 2026-06-06 — Release JQ (stage-3710 — hide test-helper console windows on Windows) + +### Changed +- **Developer experience (Windows):** the test suite's long-lived helper subprocesses (main test server, browser-smoke server, TLS helper, and the `ctl` test helpers) now spawn with `CREATE_NO_WINDOW` on Windows, so a local `pytest` run no longer pops up several focus-stealing console windows. Windows-only (`sys.platform == "win32"` guard); no behavior change on macOS/Linux. (#3710 fixes #3706, @rodboev) + ## [v0.51.300] — 2026-06-06 — Release JP (stage-3726 — context-length indicator honors provider per-model overrides) ### Fixed diff --git a/tests/browser_smoke.py b/tests/browser_smoke.py index 7d84ae04..e606731a 100644 --- a/tests/browser_smoke.py +++ b/tests/browser_smoke.py @@ -114,6 +114,7 @@ def main(): proc = subprocess.Popen( [sys.executable, server_py], cwd=repo_root, env=env, stdout=log, stderr=subprocess.STDOUT, + **({"creationflags": subprocess.CREATE_NO_WINDOW} if sys.platform == "win32" else {}), ) try: if not _wait_for_health(timeout=30): diff --git a/tests/conftest.py b/tests/conftest.py index 5a9d7bb7..dea1a6ae 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -636,6 +636,7 @@ def test_server(): env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, + **({"creationflags": subprocess.CREATE_NO_WINDOW} if sys.platform == "win32" else {}), ) if not _wait_for_server(TEST_BASE, timeout=20): diff --git a/tests/test_ctl_script.py b/tests/test_ctl_script.py index fc4dfff5..7827bdf3 100644 --- a/tests/test_ctl_script.py +++ b/tests/test_ctl_script.py @@ -143,7 +143,10 @@ def windows_pid(pid: int) -> int | None: def start_fake_launchd_process() -> subprocess.Popen: - return subprocess.Popen(["bash", "-lc", "exec sleep 30"]) + return subprocess.Popen( + ["bash", "-lc", "exec sleep 30"], + **({"creationflags": subprocess.CREATE_NO_WINDOW} if sys.platform == "win32" else {}), + ) def _kill_tree(pid: int) -> None: @@ -316,7 +319,10 @@ def test_stale_pid_file_is_removed_without_killing_unrelated_process(tmp_path): hermes_home = tmp_path / ".hermes" hermes_home.mkdir() pid_file = hermes_home / "webui.pid" - sleeper = subprocess.Popen([sys.executable, "-c", "import time; time.sleep(30)"]) + sleeper = subprocess.Popen( + [sys.executable, "-c", "import time; time.sleep(30)"], + **({"creationflags": subprocess.CREATE_NO_WINDOW} if sys.platform == "win32" else {}), + ) try: pid_file.write_text(str(sleeper.pid), encoding="utf-8") result = run_ctl(tmp_path, "stop") diff --git a/tests/test_tls_support.py b/tests/test_tls_support.py index a43e8996..06385744 100644 --- a/tests/test_tls_support.py +++ b/tests/test_tls_support.py @@ -8,9 +8,10 @@ import json import os import ssl import subprocess +import sys +import tempfile import textwrap import time -import tempfile import unittest from contextlib import suppress from pathlib import Path @@ -79,6 +80,7 @@ def _start_server(port: int, cert: str = None, key: str = None) -> subprocess.Po [os.sys.executable, str(ROOT / "server.py")], env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, + **({"creationflags": subprocess.CREATE_NO_WINDOW} if sys.platform == "win32" else {}), ) return proc