From 12116f7619955d5a4a384ae87f636102f20d833d Mon Sep 17 00:00:00 2001 From: fangliquanflq Date: Sun, 16 Aug 2026 16:57:12 +0800 Subject: [PATCH] fix(scripts): align retry recovery documentation --- scripts/desktop-update/retry-policy.ps1 | 5 ++--- scripts/desktop-update/windows.ps1 | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/desktop-update/retry-policy.ps1 b/scripts/desktop-update/retry-policy.ps1 index 771c5dd1a8..004287874c 100644 --- a/scripts/desktop-update/retry-policy.ps1 +++ b/scripts/desktop-update/retry-policy.ps1 @@ -9,9 +9,8 @@ function Test-HermesUpdateShouldRetry { # Exit 2 is shared by non-retryable safety refusals and the self-lock # deferral. Only the latter writes this marker. The handoff treats it as a - # retry signal for one fresh-process attempt; early recovery does not run - # while argv contains "update". + # retry signal for one fresh-process attempt, whose early-recovery pass + # completes core dependencies before native modules load. $deferredInstallMarker = Join-Path $InstallRoot ".update-incomplete" return Test-Path -LiteralPath $deferredInstallMarker } - diff --git a/scripts/desktop-update/windows.ps1 b/scripts/desktop-update/windows.ps1 index fdf4f5723a..7067cff335 100644 --- a/scripts/desktop-update/windows.ps1 +++ b/scripts/desktop-update/windows.ps1 @@ -1513,10 +1513,9 @@ try { # One retry for update-boundary failures. Most exit-2 safety refusals # remain terminal, but self-lock deferral also uses exit 2 and writes # .update-incomplete after the code swap. That marker is only a retry - # signal here: early recovery skips argv containing "update", so this - # fresh process must finish dependency sync without holding the locked - # native modules (lazy imports on the swapped checkout), then continue - # the remaining Desktop/skills stages of the full update pipeline. + # signal here: the fresh process's early-recovery pass finishes core + # dependency sync before native modules load, then `update` continues + # the remaining Desktop/skills stages of the full pipeline. Write-HandoffLog "first attempt left retryable update state; retrying once in a fresh process" Publish-UiProgress "Retrying update" $res = Invoke-HermesStep $pythonExe $updateArgs "update"