Skip to content

Harden app update download process - #1665

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Aug 6, 2026
Merged

Harden app update download process#1665
cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the in-app updater’s staging workflow by preventing multiple concurrent attempts to stage an update, closing a timing window where staging could be started more than once.

Changes:

  • Introduces a reserveStaging() helper to atomically “claim” staging before launching async work.
  • Updates automatic and manual update flows to reserve staging up-front before spawning Tasks.
  • Centralizes staging release (isStaging = false) via defer inside stageUpdate.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
MarkEditMac/Sources/Updater/AppUpdater+Install.swift Adds reserveStaging() and adjusts staging lifecycle handling during stageUpdate.
MarkEditMac/Sources/Updater/AppUpdater.swift Uses reserveStaging() in update entry points to prevent concurrent staging tasks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread MarkEditMac/Sources/Updater/AppUpdater+Install.swift
@cyanzhong
cyanzhong merged commit 89b067c into main Aug 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants