pub async fn check_startup_update() -> StartupUpdateResultExpand description
Checks for a pending downloaded update at startup and applies it if ready.
This function:
- Checks if there’s a
PendingUpdaterecord indicating a fully downloaded update - If found, starts the atomic upgrade process
- If not found, quickly checks for updates (with a 5-second timeout)
- Returns immediately if the timeout is exceeded
This should be called early in workspace startup. If UpgradeStarted is
returned, the process should exit to allow the canary upgrade to proceed.
§Returns
NoPendingUpdate: No update ready, continue startupUpgradeStarted: Upgrade initiated, should exitTimedOut: Check took too long, continue startupError: Something went wrong (logged, continue startup)