Skip to content

Release v0.51.301 — stage-3710 (hide test-helper console windows on Windows #3710) - #3753

Merged
nesquena-hermes merged 3 commits into
masterfrom
release/stage-3710
Jun 6, 2026
Merged

nesquena-hermes merged 3 commits into
masterfrom
release/stage-3710

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Release stage for v0.51.301 — test-only, Windows dev-experience.

#3710 → fixes #3706 — hide test-helper console windows on Windows

@rodboev, +13/−3, 4 test files only. Windows local pytest runs spawn long-lived helper subprocesses (test server, browser-smoke, TLS helper, ctl helpers) via subprocess.Popen; each unflagged child opened a visible console window. Each spawn now adds CREATE_NO_WINDOW on Windows.

All changes are **({"creationflags": subprocess.CREATE_NO_WINDOW} if sys.platform == "win32" else {}) — on macOS/Linux they expand to **{} (literal no-op). Zero production code, zero non-Windows behavior change.

Gate (all green)

  • Full suite: 8116 passed, 0 failed
  • Codex regression: SAFE TO SHIP (all 5 spawn sites win32-guarded; no unconditional CREATE_NO_WINDOW that would NameError on Linux; existing Popen kwargs preserved; no production files touched)
  • Ruff forward gate: CLEAN
  • revert-guard: origin/master is an ancestor

(#3710 fixes #3706)

rodboev and others added 3 commits June 6, 2026 23:07
#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.
@greptile-apps

greptile-apps Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds CREATE_NO_WINDOW to all long-lived helper Popen calls in the test suite, suppressing focus-stealing console windows during local pytest runs on Windows. The flag is applied via a sys.platform == "win32" inline guard everywhere, leaving macOS/Linux behavior completely unchanged.

  • 5 spawn sites patched across browser_smoke.py, conftest.py, test_ctl_script.py, and test_tls_support.py — all test-only files, zero production code touched.
  • test_tls_support.py also gains the previously missing import sys and has its import block sorted alphabetically, both of which were prerequisites for the guard expression.

Confidence Score: 5/5

Safe to merge — all changes are test-only, platform-gated, and preserve existing Popen kwargs without conflict.

Every spawn site is correctly guarded with sys.platform == 'win32', the subprocess.CREATE_NO_WINDOW constant is accessible on all Python platforms so there is no risk of AttributeError on Linux/macOS, no existing creationflags values are overwritten, and no production code is touched. The import sys addition in test_tls_support.py was genuinely missing and was the only outstanding prerequisite.

No files require special attention.

Important Files Changed

Filename Overview
tests/browser_smoke.py Adds CREATE_NO_WINDOW guard to the browser-smoke server Popen call; pattern is correct and platform-gated.
tests/conftest.py Adds CREATE_NO_WINDOW guard to the main test-server Popen in test_server fixture; no logic change.
tests/test_ctl_script.py Adds CREATE_NO_WINDOW to two Popen calls (start_fake_launchd_process and the sleeper subprocess); both correctly guarded.
tests/test_tls_support.py Adds missing import sys, fixes alphabetical import ordering, and adds CREATE_NO_WINDOW guard to _start_server.
CHANGELOG.md Adds v0.51.301 release entry documenting the Windows console-window fix; entry is accurate and well-formed.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[pytest run on Windows] --> B{spawn subprocess}
    B --> C["sys.platform == 'win32'?"]
    C -- Yes --> D["creationflags=CREATE_NO_WINDOW\n(no console window)"]
    C -- No --> E["**{} — no-op\n(macOS / Linux unchanged)"]
    D --> F[Popen called]
    E --> F
    F --> G[test_server / browser_smoke /\nTLS helper / ctl helpers]
Loading

Reviews (1): Last reviewed commit: "test(windows): hide test-helper console ..." | Re-trigger Greptile

@nesquena-hermes
nesquena-hermes merged commit 1649a22 into master Jun 6, 2026
11 checks passed
@nesquena-hermes
nesquena-hermes deleted the release/stage-3710 branch June 6, 2026 23:16
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
…indows nesquena#3710) (nesquena#3753)

* test(windows): hide test helper console windows (nesquena#3706)

* test(windows): use CREATE_NO_WINDOW constant (nesquena#3706)

* test(windows): hide test-helper console windows on Windows (nesquena#3710 fixes nesquena#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 <rod.boev@gmail.com>
Co-authored-by: nesquena-hermes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: multiple subprocess.Popen helpers spawn visible console windows on Windows

2 participants