Skip to content

Update macOS over the air: download in the background, install on quit - #317

Merged
BunsDev merged 9 commits into
mainfrom
ota-updates
Oct 19, 2026
Merged

BunsDev merged 9 commits into
mainfrom
ota-updates

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Updates on macOS no longer need the release page.

What changes

  • Background download. When a check finds a newer release, Modex downloads it and verifies the archive and its publisher without a click. The banner shows progress and Cancel download.
  • One-click restart. The banner then reads "Modex X is ready to install" and offers Restart to update, the same preflight as before (drafts saved, work drained).
  • Install on quit. If nobody clicks Restart, the next quit installs it: before-quit runs the restart preflight with relaunch: false (staging without quitAndInstall), then quits normally, and Squirrel installs the staged bundle as Modex exits. Modex does not reopen. A refused preflight (a running turn, an open Browser/Canvas/Knowledge page), a failure, or a quit with the window already closed only skips the install, and the next launch downloads it again. A cancelled close lets the next quit try again.
  • What's new. The release link now reads "What’s new". It is never needed to update.
  • Cancel and failure. A cancelled download stays cancelled for that version until Download update or a relaunch. A failed automatic download is retried by checks only after an hour; Download update retries at once.
  • Dismiss. A ready update can be dismissed, because it still installs on quit.
  • Windows and Linux are unchanged (no banner; manual installs).

v0.2.0 users still click Download update once to reach the first release that has this, because their installed app runs the old code.

Tests

  • Unit: update-installation (download without a click, no Download flash, a cancelled version is not restarted, failure backoff, the relaunch choice is passed through); update-restart-coordinator (relaunch: false stages without quitting); recovery-controls runs the real before-quit handler (installs then quits; refused or failed install still quits once; a cancelled close retries; nothing is installed without a ready update, without a coordinator, during draft recovery, or after the window closed).
  • E2E: update-installation now starts with no click and ends by quitting with a ready update, which must stage exactly once and never call quitAndInstall. update-main waits for the automatic download and retries a Restart refused by a startup request. updates uses the new link name.
  • Locally: pnpm build passed. pnpm test had 5 failures: three recovery-controls quit tests that needed the new flag in their sandbox (fixed, 35/35), and two knowledge tests that pass alone (16/16) and failed only under load average ~40. The update e2e specs passed: 15 run once, then update-main and update-installation twice each (8/8).
  • Not run locally: scripts/native-update-acceptance.mjs, which runs on hosted Macs in the Release workflow. It now waits for the automatic download to fetch the tampered archive instead of clicking Download, and fails if it never does. The next release candidate exercises it.

Docs: README "Release notifications", docs/update-recovery.md "Download and restart", docs/status.md (On main, unreleased).

Coven-Harness: Claude Code / claude-opus-5-5

A check that finds a newer release now downloads and verifies it without a
click. The banner then says the update is ready and offers Restart to update.
An update nobody restarted into installs the next time Modex quits: the quit
runs the same restart preflight with relaunch off, Squirrel installs the staged
bundle as Modex exits, and Modex does not reopen. A refused preflight (a running
turn, an open page) or a quit with the window closed only skips the install.

The release page is now a "What's new" link, never the way to update. A
cancelled download stays cancelled for that version, and a failed automatic
one is retried by checks only after an hour. A ready update can be dismissed
because it still installs on quit. Windows and Linux are unchanged.

The native acceptance no longer clicks Download before the tampered-archive
check; it waits for the automatic download to fetch it.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 19, 2026 9:41pm UTC

Request Review

Coven-Harness: Claude Code / claude-opus-5-5
@github-code-quality

github-code-quality Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main 9a2e15f ota-updates 40043f4 +/-
63% 63% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 19, 2026 22:10 UTC

Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev

BunsDev commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Landing order note from the docs steward session.

main requires an up-to-date branch, so each landing restarts CI for every PR waiting behind it. #309 (CF-6 journal hardening, approved by Val) has passed every check three times and gone behind each time.

#311 is landing now. #309 is next: I'll merge main into it the moment #311 lands, and it needs about 35 minutes of CI. #317 is one commit behind main (#304), so its guard will stop at BEHIND either way.

Could you hold #317's branch update until #309 lands? I'll post here when it does. Coordination for the fidelity PRs is on #273.

Coven-Harness: Claude Code / claude-opus-5-5

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev

BunsDev commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

#309 landed as c345779, so #317 can go whenever its owner is ready. Thanks for holding.

Coven-Harness: Claude Code / claude-opus-5-5

Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5

This branch was successfully deployed

1 active deployment
Preview — 40043f4c Deployed Oct 19, 2026 by vercel[bot]
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.

1 participant