Repository navigation
feat(updates): add an opt-in beta update channel built from green main (needs owner OK) - #2805
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
… and stage the desktop beta at main's version
|
Review round 1 (omo: BLOCK at 348e974, Codex Terra xhigh), resolved in the next commit:
Left as is (LOW):
This PR adds a workflow that creates tags, publishes a prerelease, and uses the Mac signing secrets: it needs the owner's OK before merge. |
… that stable updaters never fetch beta tags
|
Review round 2 (omo: BLOCK at 6e22efb, Codex Terra xhigh), resolved in the next commit:
Left as follow-ups (MEDIUM/LOW, round limit reached):
|
|
Final review at 9257e28. CodeRabbit did not review this head (review limit reached), so these review agents stand in for it:
Round 1 and round 2 findings and their fixes are in the comments above. Not run: the workflow itself (it runs on main only). |
|
Owner-approved (delegated to the lead on 2026-11-05): the new beta.yml workflow and its use of the Mac signing secrets behind DESKTOP_MAC_SIGN. |
|
Merge note: owner decisions delegated to the lead (workflow/signing approved). omo CLEAR at this head, Codex rounds done (no HIGH left), required checks green. |
What
An opt-in beta update channel, so a PC that opts in gets fixes from
mainwithin hours instead of at the next release. It is off by default, and a PC that did not opt in is never offered a beta.server/updater.ts,shared/update.ts): on thebetachannel the updater also fetches and takesbeta/vX.Y.Z-beta.Ntags. They live outsidev*on purpose: the installers (install.sh,install.ps1), the Windows app setup, and the--latestchecks inmac-dmg.yml/windows-app.ymlreadv*as releases, and git's version sort would rank a beta above its release. Tags are ordered in code (latestTag):v0.4.23outranks everybeta/v0.4.23-beta.N, andbeta.10outranksbeta.9. A stable PC neither fetches nor considers betas. A beta installs exactly like a release: private checkout, typecheck, build, health check, and rollback if the health check fails. Nothing is ever downgraded. A PC that leaves the channel stays on its beta until a release is a descendant of it. The channel comes fromOVIS_UPDATE_CHANNEL, else from theupdate-channelfile in the app's state dir, elsestable. It is read at every check, so writing the file takes effect without a restart.UpdateStatus.channelreports it.current_versionstays the build'spackage.jsonversion (the client's stale-tab check compares against it). A beta offer's notes are read under its base version.app/electron/src/updates.ts,main.ts): the same setting, read from the server's state dir (<userData>/server/update-channel) when the app starts. Onbetathe app reads thedesktop-betaprerelease feed (beta-*.yml), withchannel = "beta"andallowPrereleaseset.allowDowngradeis forced back tofalse, because electron-updater turns it on whenever a channel is set. Onstablethe channel is pinned tolatest..github/workflows/beta.yml, new): it runs afterCIsucceeds for a push tomain(same repository only), or by hand frommain.tagpicks the newest main commit with a successful CI push run, whichever run triggered it, so a queued or displaced run loses nothing and a manual run never publishes an unchecked commit. It tags that commitbeta/vX.Y.Z-beta.Nthrough the API. X.Y.Z ispackage.json's version, or its next patch once that version is released, and N counts up per version. A commit that a newer tag already contains gets no tag. A commit that is already tagged is rebuilt only by a manual run, which is how a failed desktop build is retried. Runs are serialized (concurrency: beta, no cancel).host-build/host-publish: when no build of the Rust PTY host exists for the commit'scrates/pty-sidecartree (the release ofpackage.json's version was built from another tree, or is not out yet), the run builds one withpty-sidecar.ymland attaches it to the prereleasepty-sidecar-<tree>, manifest last. That happens before the beta tag exists, because the updater's install of the beta fetches the host. It is built once per crate tree.desktopstages hc, Bun and the server at main's own version, then packages the app at the beta version: Linux x64 and arm64 AppImages and an arm64 Mac build. The Mac build is signed and notarized only whenDESKTOP_MAC_SIGNistrue, with the same gate and secrets as the desktop release job. The app is built with the stable feed, so an app that leaves the channel waits for the release.desktop-publishuploads the builds to the rollingdesktop-betaprerelease, feed files last. It keeps the previous beta's files, for an app that read the old feed moments before, and removes older ones. A prerelease is never GitHub's latest, so the stable feed (releases/latest/download) never sees it. The job with the write token runs no repository code.No tag is pushed by hand: the workflow makes the beta tags. No workflow triggers on
beta/*, and tags created withGITHUB_TOKENtrigger no workflows.scripts/pty-sidecar.ts):installtakes the host of releasev<package.json version>only when that release was built from this checkout's crate tree. Now, when the release has no host or has another tree's, it falls back to thepty-sidecar-<tree>prerelease, which goes through the same checks: crate tree, SHA-256, and that it runs here. Without this, every beta since fix(usage): report a browser sign-in's own outcome #2649 changed the crate would run without the Rust host, and the desktop app, which ships Bun but not Node, would mirror its panes.Needs owner OK
This adds a workflow that creates tags, publishes a prerelease, and uses the Mac signing secrets (behind
DESKTOP_MAC_SIGN).Coordination
release.ymlanddesktop.ymlare untouched (they belong to the desktop release work).beta.ymlrepeatsdesktop.yml's build steps for now. Oncedesktop.ymltakes a channel input, it can call that instead.Validation
bun test server/updater.test.ts: new cases with real Git repositories and builds. A stable PC is never offered a beta tag (or av*pre-release). A beta PC opts in through the file without a restart, installs the newest beta, and then takes the release that follows. Unit cases cover tag ordering and channel precedence. The old updater had no beta channel: itsRELEASE_TAGfilter dropped every-beta.Ntag, so the beta install case cannot pass against it.bun test scripts/pty-sidecar.test.ts: a new case installs the host from the crate tree's prerelease when the release's is from other sources, and refuses one built from other sources or one whose SHA-256 does not match.bun test app/electron/src/updates.test.tsandbun run typecheckinapp/electron.bun run check fast: passed. That covers workflow syntax and actionlint, typecheck, build, and unit tests (11247 pass, 0 fail).beta.yml, run against a scratch Git repository with a stubbedgh: a released commit, a new commit (beta/v0.4.23-beta.1from 0.4.22 released), an already-tagged commit (skipped automatically, reused by hand), and an older commit contained by a newer beta (skipped).beta.yml.main), and a real electron-updater update from adesktop-betafeed.