$ErrorActionPreference = 'Stop' $taskProjectRoot = [IO.Path]::GetFullPath('C:\wechat_rpa') $taskArtifactRoot = [IO.Path]::GetFullPath('C:\kefu\deploy\review-contacts-20260917') $taskBuildPython = Join-Path $taskProjectRoot '.build-venv\Scripts\python.exe' $env:LOCALAPPDATA = Join-Path $taskArtifactRoot 'frozen-qa-profile\Local' $env:APPDATA = Join-Path $taskArtifactRoot 'frozen-qa-profile\Roaming' $env:QT_QPA_PLATFORM = 'offscreen' $env:PYTHONDONTWRITEBYTECODE = '1' New-Item -ItemType Directory -Path $env:LOCALAPPDATA,$env:APPDATA -Force | Out-Null & $taskBuildPython (Join-Path $taskArtifactRoot 'verify_frozen_release.py') if ($LASTEXITCODE -ne 0) { throw 'Frozen release verification failed' } & $taskBuildPython (Join-Path $taskArtifactRoot 'run_frozen_regressions.py') *> (Join-Path $taskArtifactRoot 'frozen-runner.log') if ($LASTEXITCODE -ne 0) { throw 'Frozen regressions failed' } Get-Content -LiteralPath (Join-Path $taskArtifactRoot 'frozen-continuity-tests.json') & $taskBuildPython (Join-Path $taskArtifactRoot 'verify_nsis_payload.py') if ($LASTEXITCODE -ne 0) { throw 'Installer integrity verification failed' } & (Join-Path $taskArtifactRoot 'finalize_release.ps1')