Repository navigation
feat: add beta release channel plumbing - #507
Merged
Merged
Conversation
Implement the beta release channel policy: - Enforce #503's rejected-nightly decision: remove the nightly channel option and edge-mapping branches from release.yml and restrict scripts/verify-release-assets.cjs to latest/beta manifests. - Document verified electron-updater channel semantics for this app's electron-builder 26.x / electron-updater 6.8.x pair in docs/release-process.md: GitHub publish configs generate exactly one channel manifest set (beta builds emit only beta*.yml), stable clients follow GitHub's Latest pointer and ignore prereleases, and beta clients resolve the newest feed entry then fetch that release's channel manifest with a latest.yml fallback for stable targets. - Add workflow-text assertions to tests/release-config.test.ts proving stable-feed isolation: PRERELEASE/MANIFEST_PREFIX gating, --latest=false, prerelease-flagged promotion refusal, stable-only AppX submission, and zero nightly publish paths. - Add main/update-channel.ts (pure) resolving the effective updater feed from the running version stamp plus a persisted opt-in; nightly/alpha stamps fall back to stable updates. - Wire the beta-channel opt-in across main + preload + electron.d.ts as updates:get-beta-channel / updates:set-beta-channel, persisted in the SQLite settings store (updates.beta_channel_enabled). Switching is refused while an update is staged or in flight (#467 honest-state) and resets the updater to a real pre-check state followed by an immediate re-check against the new feed. - Add docs/release-process.md runbooks for cutting a beta and manually promoting it to stable; betas remain the N+1 source for the #468 matrix. - New tests/update-channel.test.ts wired into npm test.
…le IPC duplication
Contributor
Greptile SummaryThe PR adds persisted beta-channel selection for desktop updates and restricts release automation to stable and beta channels.
Confidence Score: 2/5The PR is not safe to merge until managed installs reject the unsupported beta opt-in and the beta runbook is aligned with the executable release workflow. Managed installations can report a successful beta opt-in without ever checking that feed, while following the documented beta procedure either fails changelog extraction or launches a redundant release run that is refused after publication. Files Needing Attention: main/index.ts, main/preload.ts, docs/release-process.md, .github/workflows/release.yml
|
| Filename | Overview |
|---|---|
| main/index.ts | Adds persisted beta-channel IPC handlers and reconfigures the updater after safe state-transition checks. |
| main/update-channel.ts | Defines the pure stable/beta channel resolution and strict persisted-value parsing. |
| .github/workflows/release.yml | Removes nightly publishing and keeps prerelease publication and stable promotion as separate release paths. |
| docs/release-process.md | Documents beta channel semantics, beta release operations, and manual stable promotion. |
| scripts/verify-release-assets.cjs | Restricts release asset verification to stable and beta manifest sets. |
Reviews (2): Last reviewed commit: "no-mistakes(document): Corrected stale b..." | Re-trigger Greptile
…heckout no longer fails under `pipefail` when calculating the optional previous tag. Verified with `npm run test:release-config` and `git diff --check`; both passed
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Implement FloCafe's beta release channel plumbing (epic #463, policy decision #503). Policy (decided, do not revisit): beta builds publish as prerelease-flagged GitHub releases with tags like 3.3.1-beta.1 carrying correct electron-updater channel manifests so beta-enabled clients can find them; stable installs (pre-releases disabled) can never be offered a beta; promotion from beta to stable is always a deliberate human action with no automatic path; nightly releases are explicitly rejected; betas later serve as the N+1 update source for the #468 runtime upgrade matrix.
Delivered: (1) removed the rejected nightly publish path from .github/workflows/release.yml and scripts/verify-release-assets.cjs (the beta publish capability itself already exists in release.yml via workflow_dispatch channel=beta from prior work #488 - verified against installed electron-builder 26.x that GitHub publish configs generate exactly one channel manifest set, beta builds emit only beta*.yml, never latest.yml, so the stable feed is structurally isolated); documented these electron-updater 6.8.x channel semantics in docs/release-process.md. (2) Added workflow-text assertions to tests/release-config.test.ts proving stable-feed isolation: PRERELEASE/MANIFEST_PREFIX gated on non-stable channels, --latest=false on draft creation, promotion job refuses non-stable/prerelease releases, stable-only AppX Store submission, zero nightly paths. (3) Implemented updates:get-beta-channel()/updates:set-beta-channel(enabled) IPC across main/index.ts + main/preload.ts + frontend/src/types/electron.d.ts, persisted in the SQLite settings store as updates.beta_channel_enabled, resolving through new pure module main/update-channel.ts; switching is refused while an update is staged or in flight (#467 honest-state model), then resets to real pre-check state and re-checks the new feed; no renderer UI files touched (sibling crew owns those). (4) Added cut-a-beta and manual promote-to-stable runbooks to docs/release-process.md.
Acceptance: manual dispatch of channel=beta produces a draft/prerelease release without touching the stable feed; stable clients never see betas; IPC round-trip persists across restarts; workflow-text tests pass; lint/build/i18n unaffected.
Environment notes for validation: the pipeline worktree starts without node_modules - run npm ci before testing; use assertion/log-based evidence only, no screenshots.
What Changed
Risk Assessment
Testing
All targeted automated checks passed. The actual main-process beta IPC handlers returned the expected initial value, successful write, persisted SQLite value, and same value after database restart; resolver output confirmed stable-feed isolation, explicit beta opt-in, beta-build channel behavior, and nightly fallback. No screenshots were produced because the supplied validation context requires assertion/log evidence only; no test-generated files remain in the worktree.
Evidence: Effective update-channel resolution scenarios
Evidence: Main-process beta IPC persistence harness
Evidence: Beta updater manifest mapping
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 2 issues found → auto-fixed ✅
main/index.ts- merge conflict rebasing onto origin/mainpackage.json- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
main/index.ts:811- The new IPC registrations are inserted inside an extrarestart-and-installhandler at line 811, while the original handler remains at line 848. They therefore are not registered during initialization, contradicting the required “IPC round-trip persists across restarts” behavior. Register the beta handlers alongside the existing handler and retain only one restart registration.main/update-channel.ts:65-resolveUpdateChannelenablesallowDowngradefor a stable install that opts into beta. A stable 3.4.0 client can therefore auto-download a lower3.4.0-beta.1becauseautoDownloadis enabled, risking an updater/schema downgrade. Only a prerelease-stamped install should enable downgrade; update the resolver and its assertion at tests/update-channel.test.ts:52.tests/release-config.test.ts:169- The new stable-feed checks assert behavior by searching shell snippets and entire source files withincludes, so comments or dead code can satisfy them without proving workflow behavior. Keep the required coverage, but use normalized workflow structure and executable metadata/argument behavior instead of source-content matching.docs/release-process.md:114- The beta runbook says to push the tag and then manually dispatch the workflow, but release.yml already triggers on pushed tags. A successful automatic run publishes the release; the instructed manual run is then queued and fails because the release is no longer a draft. Clarify whether beta releases are push-triggered or dispatch-only and make the runbook match.🔧 Fix: Fixed beta channel review findings and verified focused checks
3 warnings still open:
main/index.ts:813- The beta IPC is exposed for managed installs too. On MAS/MSIX builds, updater setup is skipped; on Linux deb/rpm/snap installs, checks returnstore-managed/linux-managed. Nevertheless the Settings toggle sees a valid boolean API, reports success, and persists an opt-in that can never check a beta feed. Gate this contract to self-updating artifacts or return unsupported for managed installs.docs/release-process.md:114- The beta runbook instructs adding## [X.Y.Z-beta.N]to CHANGELOG.md, but the workflow strips the prerelease suffix and callschangelog-notes.shwithX.Y.Z; that script only matches## [X.Y.Z]. Following the runbook for3.3.1-beta.1therefore makes draft creation fail due to missing release notes.docs/release-process.md:116- The workflow still triggers on every numeric tag, including beta tags, so pushing3.3.1-beta.1automatically runs and publishes the beta. The runbook then instructs a manual dispatch for the same tag; that second run finds the published release and exits atrelease.yml:168-170. Choose one beta trigger path and align the runbook and workflow.main/index.ts:99- New beta-channel handlers bypass the sharedwithDatabaseRequestmaintenance boundary, allowing preference reads/writes to race backup/restore/reset operations. Route them through the database request gate and serialize the channel transition.main/index.ts:836- Database restore can changeupdates.beta_channel_enabled, but the updater is reconfigured only at startup or toggle time. After restoring beta-off settings, the running updater may still fetch beta updates (or miss them in the reverse case). Re-derive the channel at the restore/check boundary or define restore behavior.ℹ️
docs/release-process.md:13- The docs say non-beta prereleases get stable updates only, butbetaOptIn=truedeliberately overrides that stamp and follows the beta feed. Align the documentation with this opt-in behavior or make unsupported prereleases always stable.🔧 Fix: Gated beta preference IPC through serialized database requests
2 issues (1 warning, 1 info) still open:
main/index.ts:844- After restoring or resetting the database, the persisted beta preference can change but the running updater is not reconfigured. A stable install with beta enabled can restore a backup with beta disabled, thencheckForUpdates()still usesbeta.ymland may stage a prerelease. Re-derive the channel at the restore/reset completion boundary.docs/release-process.md:13- The docs say any non-beta prerelease gets stable updates only, butresolveUpdateChannelassigns the beta feed whenbetaOptIn=trueeven for nightly/alpha versions. Align the documentation with the explicit opt-in behavior or make unsupported prerelease stamps always use stable.✅ **Test** - passed
✅ No issues found.
npm cinpm run test:update-channelnpm run test:update-statenpm run test:update-uinpm run test:electron-api-contractnpm run test:release-configInline main-process IPC/SQLite close-reopen harnessTransient artifact cleanup check✅ No issues found.
npm run test:update-channelnpm run test:electron-api-contractnpm run test:update-uinpm run test:update-statenpm run test:release-configInline resolver scenarios vianode -r ts-node/register/transpile-onlyfor stable opt-out, stable beta opt-in, beta-stamped builds, and rejected nightly stampsInline stubbed-Electron harness invokingupdates:get-beta-channelandupdates:set-beta-channel, then closing/reopening SQLite and reading through the IPC handlerInline release-verifier checks for beta manifest names and Windows platform mappinggit diff --checkand final worktree-residue inspection✅ **Document** - passed
✅ No issues found.
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
✅ No issues found.