fix: round-9 Windows lane — retry argv keeps --force; mint fixture carries venv_sync; stamp probe reports the child

- 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).
This commit is contained in:
ethernet
2026-09-21 06:48:59 -04:00
parent 9de542c15b
commit 9ee4397408
3 changed files with 9 additions and 2 deletions

View File

@@ -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'
}

View File

@@ -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"

View File

@@ -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")