The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(e2e): pure-ASCII PowerShell/AHK (PS 5.1 parser choke on non-ASCII)
Tekniumf83548420a16
diff --git a/tests/install/e2e-assets/install-and-launch.ahk b/tests/install/e2e-assets/install-and-launch.ahkindex 03079212099..960a740bb30 100644--- a/tests/install/e2e-assets/install-and-launch.ahk+++ b/tests/install/e2e-assets/install-and-launch.ahk@@ -6,14 +6,14 @@; the real Hermes.exe (Electron desktop) window to appear.;; Adapted from @ethernet8023's e2e/windows/install-hermes-desktop.ahk-; (PR #68183) — same ImageSearch approach; the install-button template was+; (PR #68183) -- same ImageSearch approach; the install-button template was; re-captured from a live CI frame (the #68183 templates predated the; installer UI restyle to the "[ INSTALL ]" bracket look and never matched).;-; Robustness beyond the original — every one earned from a real CI failure:+; Robustness beyond the original -- every one earned from a real CI failure:; * Log() survives a missing stdout. GUI-subsystem AHK started via; Start-Process has no console, so FileAppend to '*' throws-; "(6) The handle is invalid" — that single throw killed attempt 1.+; "(6) The handle is invalid" -- that single throw killed attempt 1.; * We wait for a REAL-sized installer window before reading geometry.; ahk_exe matched a hidden 16x16 helper window first (attempt 2's; "Window found at ... w=16 h=16"), so relative-position math was@@ -131,7 +131,7 @@ try {Log("WARNING: could not activate installer window")}-; ── Step 1: click Install ───────────────────────────────────────────────+; -- Step 1: click Install -----------------------------------------------installClicked := falsedeadline := A_TickCount + 30000while (A_TickCount < deadline) {@@ -150,8 +150,8 @@ if !installClicked {Log("FALLBACK: install template never matched; clicked window-relative position")}-; ── Step 2: wait for the install to finish ──────────────────────────────-; Primary: the "bootstrap complete" line in the installer's own log — the+; -- Step 2: wait for the install to finish ------------------------------+; Primary: the "bootstrap complete" line in the installer's own log -- the; authoritative done signal. Secondary: the Launch button template.launchX := 0, launchY := 0launchFound := false@@ -187,7 +187,7 @@ if (complete and !launchFound) {}}-; ── Step 3: click Launch — the hand-off under test ──────────────────────+; -- Step 3: click Launch -- the hand-off under test ----------------------if launchFound {ClickWithMarker(launchX, launchY)Log("Launch clicked (template)")diff --git a/tests/install/windows-desktop-gui-e2e.ps1 b/tests/install/windows-desktop-gui-e2e.ps1index f466d716d18..2a7b80e53f7 100644--- a/tests/install/windows-desktop-gui-e2e.ps1+++ b/tests/install/windows-desktop-gui-e2e.ps1@@ -9,7 +9,7 @@# then clicks Launch. The real Electron Hermes.exe must appear.# The exe runs EXACTLY as shipped: it downloads its own pinned# install.ps1 from GitHub raw and installs its baked-# BUILD_PIN_COMMIT — so the "before" version in this harness is+# BUILD_PIN_COMMIT -- so the "before" version in this harness is# the website release pin, the literal starting point of every# real GUI user. (The strict HEAD~1 -> HEAD guarantee is the# contract harness's job; this one covers the production pin.)@@ -30,7 +30,7 @@## DEVIATIONS FROM PRODUCTION (each one deliberate and small):# * git URL redirect (GIT_CONFIG_GLOBAL) routes the canonical repo URLs-# to the staged serve.git — the staging requirement itself. The+# to the staged serve.git -- the staging requirement itself. The# installer's raw.githubusercontent install.ps1 download and the pinned# ZIP fallback are NOT redirected (real network, as shipped).# * serve.git gets uploadpack.allowAnySHA1InWant=true so the installer's@@ -198,7 +198,7 @@ function Stop-DesktopRecorder($proc, [string]$OutDir) {function Stop-HermesAppProcesses([string]$Label) {# Close the desktop app the blunt way between legs (a user quitting).- # Only Hermes.exe (Electron) — never hermes.exe (the venv CLI shim).+ # Only Hermes.exe (Electron) -- never hermes.exe (the venv CLI shim).$procs = @(Get-Process -Name "Hermes" -ErrorAction SilentlyContinue)foreach ($p in $procs) {try { Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue } catch {}@@ -226,7 +226,7 @@ function Get-ManagedNode {}# -----------------------------------------------------------------------------# Phase: stage — reuse the contract driver's stage (identical staging)+# Phase: stage -- reuse the contract driver's stage (identical staging)# ----------------------------------------------------------------------------function Invoke-PhaseStage {Write-Step "STAGE (gui): delegating to windows-desktop-e2e.ps1 -Phase stage"@@ -244,7 +244,7 @@ function Invoke-PhaseStage {}# -----------------------------------------------------------------------------# Phase: install-gui — website Hermes-Setup.exe, headed, AHK-driven+# Phase: install-gui -- website Hermes-Setup.exe, headed, AHK-driven# ----------------------------------------------------------------------------function Invoke-PhaseInstallGui {$state = Read-State@@ -287,7 +287,7 @@ function Invoke-PhaseInstallGui {try {Save-DesktopScreenshot (Join-Path $proof "00-before-installer.png")- # Launch the REAL installer, headed — exactly a double-click.+ # Launch the REAL installer, headed -- exactly a double-click.$installer = Start-Process -FilePath $setupExe -PassThruWrite-Host " Hermes-Setup.exe launched (pid $($installer.Id))"@@ -334,14 +334,14 @@ function Invoke-PhaseInstallGui {# Close the freshly launched app (user quits after first look).Stop-HermesAppProcesses "post-install"- # The website exe installs its baked release pin — record it as the+ # The website exe installs its baked release pin -- record it as the# "before" version. It must differ from CURRENT (an update is genuinely# available). We do NOT require it to be an ancestor of CURRENT: on a# real `push: main` run CURRENT is main's tip and the release pin is# behind it (ancestor), but on a feature branch CURRENT has diverged# from main, so the release pin legitimately isn't in its ancestry. The# update leg resets the checkout to serve.git's main ref regardless, and- # asserts it lands on CURRENT — that is the real forward-update proof.+ # asserts it lands on CURRENT -- that is the real forward-update proof.$installedSha = Get-InstalledHeadWrite-Host " installer landed on: $installedSha (website release pin)"Assert-True ($installedSha -ne $state.current) "installed pin differs from CURRENT (an update is genuinely available)"@@ -352,7 +352,7 @@ function Invoke-PhaseInstallGui {if ($isAncestor) {Write-Host " [ok] installed pin is an ancestor of CURRENT (linear before -> current)"} else {- Write-Host " [note] installed pin is NOT an ancestor of CURRENT — expected on a diverged feature branch; the update leg still resets to CURRENT"+ Write-Host " [note] installed pin is NOT an ancestor of CURRENT -- expected on a diverged feature branch; the update leg still resets to CURRENT"}Test-HermesRuns "post-install-gui"Assert-True ($null -ne (Get-DesktopExe)) "packaged Desktop Hermes.exe exists"