From f89bf46929caabaa7fdcc560d134c42246d5a388 Mon Sep 17 00:00:00 2001 From: ethernet Date: Wed, 23 Sep 2026 09:47:04 -0400 Subject: [PATCH] test(e2e): reset installer desktop state before chat --- tests/install/windows-e2e.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/install/windows-e2e.ps1 b/tests/install/windows-e2e.ps1 index 25671879e6..a02fef033f 100644 --- a/tests/install/windows-e2e.ps1 +++ b/tests/install/windows-e2e.ps1 @@ -834,6 +834,15 @@ function Invoke-PhaseInstallGui { # The installer Launch proof above must pass before a test-owned launch. $script:ChatFailure = $true Close-VerifiedDesktop (Get-DesktopExe) + # The installer-launched renderer boots before the journey seeds its local + # mock provider. Its disposable userData can therefore persist the release's + # default OpenRouter choice and override the mock on the checkpoint relaunch. + # Reset only this driver-owned pre-checkpoint state; OLD -> HEAD keeps the + # state created by the checkpoint itself. + if (Test-Path -LiteralPath $env:HERMES_DESKTOP_USER_DATA_DIR) { + Remove-Item -LiteralPath $env:HERMES_DESKTOP_USER_DATA_DIR -Recurse -Force + } + New-Item -ItemType Directory -Path $env:HERMES_DESKTOP_USER_DATA_DIR -Force | Out-Null $chatPhase = if ($Mode -eq 'install') { 'old' } else { 'new' } @{ phase=$chatPhase; launch='post-installer-launch'; handoffProof=$proof } | ConvertTo-Json | Set-Content (Join-Path $ProofRoot "desktop-chat-$chatPhase-launch.json")