From 9ee4397408426fe52b4b2a092e23ad61eafbd8cc Mon Sep 17 00:00:00 2001 From: ethernet Date: Mon, 21 Sep 2026 06:48:59 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20round-9=20Windows=20lane=20=E2=80=94=20r?= =?UTF-8?q?etry=20argv=20keeps=20--force;=20mint=20fixture=20carries=20ven?= =?UTF-8?q?v=5Fsync;=20stamp=20probe=20reports=20the=20child?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - desktop-update/windows.ps1: the legacy-install retry re-sends the identical request (--force included); the contract test compares both attempts. - test_mint_launchers: the bootstrap imports hermes_cli.venv_sync/steward before prepare_launch can return early for a fixture repo; copy them into the tree. - test_source_build_env: when the pwsh child writes no stamp, fail with the child's stdout/stderr instead of a bare FileNotFoundError (the Windows lane hides the cause). --- scripts/desktop-update/windows.ps1 | 4 +++- tests/scripts/test_mint_launchers.py | 5 ++++- tests/scripts/test_source_build_env.py | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/desktop-update/windows.ps1 b/scripts/desktop-update/windows.ps1 index 637acbc51a..26bceb4b48 100644 --- a/scripts/desktop-update/windows.ps1 +++ b/scripts/desktop-update/windows.ps1 @@ -1588,7 +1588,9 @@ try { $runtimeCommand = @(Get-HermesRuntimeCommand -InstallRoot $InstallRoot) $pythonExe = $runtimeCommand[0] $runtimeArgs = @($runtimeCommand | Select-Object -Skip 1) - $updateArgs = $runtimeArgs + @('update', '--yes') + $gatewayArg + $targetArgs + # Same request as the first attempt (--force included): the installation is still the + # legacy one being converted until this run succeeds. + $updateArgs = $runtimeArgs + @('update', '--yes') + $gatewayArg + $forceArg + $targetArgs $res = Invoke-HermesStep $pythonExe $updateArgs 'update' } diff --git a/tests/scripts/test_mint_launchers.py b/tests/scripts/test_mint_launchers.py index b03e9f2e96..ab4924c812 100644 --- a/tests/scripts/test_mint_launchers.py +++ b/tests/scripts/test_mint_launchers.py @@ -68,7 +68,10 @@ def payload_tree(tmp_path: Path): # Exercise the real bootstrap before the fixture entry point. for relative in ("hermes_bootstrap.py", "hermes_constants.py", "hermes_cli/__init__.py", "pm/environments.py", "hermes_cli/runtime_state.py", - "hermes_cli/_early_recovery.py", "hermes_cli/_parser.py"): + "hermes_cli/_early_recovery.py", "hermes_cli/_parser.py", + # prepare_launch returns early for a fixture repo (no .git), but the bootstrap + # imports these two before it can tell. + "hermes_cli/venv_sync.py", "hermes_cli/steward.py"): shutil.copy2(_REPO / relative, repo / relative) (repo / "hermes_cli" / "main.py").write_text( "import os, sys\n" diff --git a/tests/scripts/test_source_build_env.py b/tests/scripts/test_source_build_env.py index e88d3106f7..68a6017e69 100644 --- a/tests/scripts/test_source_build_env.py +++ b/tests/scripts/test_source_build_env.py @@ -97,6 +97,8 @@ catch { if ($_.Exception.Message -ne 'child failure') { throw } } result = subprocess.run(command, env=env, cwd=tmp_path, capture_output=True, text=True, encoding="utf-8", timeout=30) assert result.returncode == 0, result.stdout + result.stderr + assert Path(env["PROBE_OUT"]).is_file(), ( + f"the build child wrote no stamp\n--- stdout ---\n{result.stdout}\n--- stderr ---\n{result.stderr}") stamp = json.loads(Path(env["PROBE_OUT"]).read_text(encoding="utf-8-sig")) assert (stamp["commit"], stamp["branch"], stamp["source"], stamp["payload"]) == ( sha, "installed", "local", "bootstrap")