test(update-windows): spawn stubs accept the per-profile home argument

_spawn_detached now forwards home= to _build_gateway_argv so the post-update
cold-start can launch another profile's gateway; the two windows_only spawn
tests stubbed _build_gateway_argv with a zero-arg lambda and raised TypeError
on the Windows runner.
This commit is contained in:
teknium1
2026-09-14 20:03:01 -07:00
committed by Teknium
parent 8fbae2813b
commit b19e5786e2

View File

@@ -93,7 +93,7 @@ def test_spawn_detached_marks_primary_breakaway_success(monkeypatch, tmp_path, c
monkeypatch.setattr(
gateway_windows,
"_build_gateway_argv",
lambda: (argv, cwd, {"HERMES_GATEWAY_DETACHED": "1"}),
lambda home=None: (argv, cwd, {"HERMES_GATEWAY_DETACHED": "1"}),
)
monkeypatch.setattr("hermes_cli.config.get_hermes_home", lambda: tmp_path)
monkeypatch.setattr(gateway_windows.subprocess, "Popen", fake_popen)
@@ -131,7 +131,7 @@ def test_spawn_detached_warns_and_marks_no_breakaway_fallback(
monkeypatch.setattr(
gateway_windows,
"_build_gateway_argv",
lambda: (
lambda home=None: (
argv,
cwd,
{"HERMES_GATEWAY_DETACHED": "1", "SECRET_SENTINEL": "do-not-log"},