Repository navigation
feat: add verified stable, beta, and nightly release channels - #488
Conversation
…mantic workflow tests
Greptile SummaryThe PR introduces draft-first, channel-aware release publishing for stable, beta, and nightly builds, with standardized artifact names and post-upload verification.
Confidence Score: 2/5The PR is not safe to merge until normal Linux manifests can pass verification, GitHub release API fields use the required types, and stable promotion proves the selected release was verified. The Linux manifest allowlist rejects package entries generated by the configured build, release publication still sends Files Needing Attention: .github/workflows/release.yml and scripts/verify-release-assets.cjs
|
| Filename | Overview |
|---|---|
| .github/workflows/release.yml | Adds channel metadata, draft release creation, platform-owned uploads, verification gating, publication, and explicit stable promotion jobs. |
| scripts/verify-release-assets.cjs | Adds release inventory, manifest mapping, version, availability, and SHA-512 validation. |
| main/index.ts | Selects beta or nightly electron-updater channels from the installed prerelease version while excluding store builds. |
| package.json | Changes platform release scripts to build with --publish never and adds release-verification commands. |
| tests/release-asset-verifier.test.cjs | Adds mocked stable, beta, and nightly verifier scenarios. |
| tests/release-config.test.ts | Adds structural checks for release scripts, updater configuration, artifact naming, and workflow behavior. |
| docs/release-process.md | Documents channel naming, release verification, publication, and promotion procedures. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
T[Tag push or manual dispatch] --> M[Determine release metadata]
M --> P{Promotion only?}
P -- No --> D[Create draft release]
D --> L[Build and upload Linux]
D --> A[Build and upload macOS]
D --> W[Build and upload Windows]
L --> V[Verify uploaded assets]
A --> V
W --> V
V --> R[Publish release]
P -- Yes --> G[Promote published stable release to GitHub Latest]
Reviews (2): Last reviewed commit: "Merge branch 'main' into fm/flocafe-466-..." | Re-trigger Greptile
Intent
Implement FloCafe #466 and the accepted D4 release-channel design: create GitHub releases as drafts until post-upload verification passes; use safe lowercase artifact names; provide stable, beta, and nightly opt-in channels; keep stable on latest*.yml while beta/nightly use channel-prefixed updater manifests; make stable promotion to GitHub Latest explicit rather than automatic; build platform artifacts with electron-builder --publish never and let the workflow own uploads and verification; keep store-delivered AppX/MAS/Snap packages outside electron-updater's channel behavior; preserve offline-first operation and existing customer data; validate the committed feature branch, push it, create a PR with body 'Fixes #466 Refs #463', and drive CI green without merging.
What Changed
electron-builder --publish never, standardized safe lowercase artifact names, and kept store-delivered AppX/MAS and Snap packages outside electron-updater channel behavior.Risk Assessment
🚨 High: The current verifier blocks all normal Linux releases, while the promotion path can expose an unverified release as the stable update target.
Testing
Fresh focused tests and end-to-end verifier simulations passed for all three channels. No full suite or linters were run per the assigned test-phase boundary; no rendered UI evidence applies to this CI/release workflow change.
Evidence: Stable, beta, and nightly verifier evidence
Evidence: Parsed release workflow model
Evidence: Artifact naming evidence
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
.github/workflows/release.yml:725-gh api -Fconvertsfalse/trueto JSON booleans, but GitHub'smake_latestrelease parameter is a string enum. The publish job therefore sends the wrong type and can fail for every release before the draft is published. Use raw string fields (-f make_latest=false/true). See gh api field typing and GitHub release API..github/workflows/release.yml:552- For a beta/nightly version such as3.3.0-beta.1, this computes3.3.0-beta.1.0, which is not the numeric AppX version emitted by electron-builder (normally3.3.0.0). The Windows verification step consequently rejects every prerelease channel. Derive the four-part Store version from the base semver instead. See electron-builder AppInfo version conversion..github/workflows/release.yml:627- This violates the required opt-in behavior: the intent says to “provide stable, beta, and nightly opt-in channels” and keep store-delivered packages outside electron-updater channel behavior, but the Windows Store publish step runs for every tag push and only adds a flight when an optional variable is set. A3.3.0-beta.1or nightly tag can therefore submit AppX to the production Store, exposing it to stable Store users. Gate prereleases to a required Store flight or skip AppX production publication for non-stable channels.scripts/verify-release-assets.cjs:121- The verifier discovers ARM64 manifests only from assets already present, so a release containinglatest-linux.ymland both x64/arm64 installers can pass withoutlatest-linux-arm64.yml. Electron-updater selects the Linux channel filename with an architecture suffix for non-x64 builds, leaving ARM64 installs unable to update. Require the ARM64 manifest unconditionally and make the ARM64 upload step require that exact filename. See electron-updater channel-file selection.scripts/verify-release-assets.cjs:217- The post-upload gate verifies hashes but never checks a manifest'sversionagainst--tag, nor that referenced artifact names carry that version. A draft containing stale or mismatched versioned artifacts plus matching stale manifests can satisfy the extension-count inventory and publish without producing a usable update. Parse and require the expected version, and validate the exact current-release artifact inventory.package.json:30- Required criterion: “build platform artifacts with electron-builder --publish never and let the workflow own uploads and verification.” The existingrelease:linux,release:mac, andrelease:winentry points still invoke--publish always, providing a reachable path that bypasses the new draft/verification workflow. Confirm whether these scripts should be retired or converted to non-publishing build commands.tests/release-config.test.ts:28- The newly added assertions inspect implementation source text for function names and file existence instead of exercising the verifier behavior, so dead/commented code can satisfy them and behavior-preserving refactors can break them. Replace these checks with executable verifier scenarios or remove them.tests/release-config.test.ts:178- The newly added workflow checks read.github/workflows/release.ymlas raw text and assert substrings/regexes across lines 171-309. This is the prohibited source-content-only pattern and does not prove GitHub Actions semantics. Parse the workflow into a semantic model and validate normalized jobs/steps, or exercise extracted workflow behavior where feasible.🔧 Fix: Fixed release gating, asset verification, and semantic workflow tests
5 issues (3 errors, 2 warnings) still open:
.github/workflows/release.yml:82- Required criterion: “make stable promotion to GitHub Latest explicit rather than automatic.” For every stable tag push, this setsPROMOTE=true, and the publish job then sendsmake_latest=true; the explicitpromote_stableinput is bypassed for tag pushes. Require an explicit promotion decision for push-triggered releases, or confirm this behavior is intentional..github/workflows/release.yml:165- Manual dispatch setsTAGto the package version, then creates the release without--verify-tagor--target. If that tag does not already exist, GitHub CLI can create it from the default branch while build jobs use the dispatched ref, allowing branch artifacts to be published under a different commit’s tag. Require an existing verified tag or explicitly target the workflow SHA..github/workflows/release.yml:553- For3.3.0-beta.1and3.3.0-nightly.*, this derives AppX version3.3.0.0, the same numeric version as stable3.3.0and other prereleases in that base series. Because prerelease AppX packages are submitted to Store flights, the Store may reject the duplicate/non-increasing package or fail to deliver it as an update. MSIX uses four-part numeric versions and update selection depends on version ordering (package-version rules, package flights). Choose a monotonic Store version scheme or explicitly skip nonstable AppX publication.main/index.ts:80- A nightly install is configured withautoUpdater.channel = nightly, but electron-updater’s GitHub provider does not fall back to stable releases when no nightly release exists. A nightly user can therefore receive “no published versions” instead of stable updates, despite the surrounding channel-transition documentation implying fallback behavior. Confirm whether nightly is intentionally isolated or implement an explicit stable fallback.tests/release-config.test.ts:94- The workflow tests parse YAML structure but still regex-match raw shell source inrunfields. Commented, dead, or no-op commands could satisfy these assertions, so they do not prove workflow behavior and remain the source-content-only test pattern prohibited by the review rules. Validate a normalized executable workflow model or remove these assertions.🔧 Fix: Removed raw shell-text matching from workflow tests
5 issues (4 errors, 1 warning) still open:
.github/workflows/release.yml:521- The Windows job defaults to PowerShell, where\is not a line-continuation character. This command passes the backslash as an argument and leaves the-c.publish.channelline as a separate command, so the Windows build fails. Use PowerShell backticks, one line, or an explicit Bash shell..github/workflows/release.yml:82- Required criterion: “make stable promotion to GitHub Latest explicit rather than automatic.” This unconditionally setsPROMOTE=truefor every stable tag push, and the publish job then setsmake_latest=truewithout an explicit promotion decision. Require explicit promotion for push-triggered releases or confirm this behavior is intentional..github/workflows/release.yml:165- Manual dispatch setsTAGtopackage.json’s version and creates the release without--verify-tagor--target. A dispatch from a branch can therefore create the tag from the default branch while build jobs package the dispatched ref, publishing artifacts under the wrong commit. Require an existing verified tag or explicitly targetgithub.sha..github/workflows/release.yml:553- For3.3.0-beta.1and every later3.3.0-beta.*or3.3.0-nightly.*, this expects AppX version3.3.0.0; successive Store submissions therefore reuse the same numeric version and may be rejected or fail to update flight users. MSIX updates require higher versions, and the Store reserves the fourth component (package version rules, update constraints). Choose a monotonic Store-version scheme or explicitly skip prerelease AppX publication.main/index.ts:80- A nightly install setsautoUpdater.channel = nightly, but electron-updater’s GitHub provider only selects Atom entries whose prerelease channel isnightly; when no nightly release exists, it throwsERR_UPDATER_NO_PUBLISHED_VERSIONSbefore its stable-manifest fallback can run. Confirm nightly is intentionally isolated, or implement an explicit stable fallback.🔧 Fix: Fixed Windows PowerShell continuation in release build
5 issues (3 errors, 2 warnings) still open:
.github/workflows/release.yml:82- Required criterion: “make stable promotion to GitHub Latest explicit rather than automatic.” Lines 82-85 forcePROMOTE=truefor every stable tag push, so publication automatically promotes it. Require an explicit promotion decision or confirm tag pushes are intended to be that decision..github/workflows/release.yml:58- Workflow dispatch setsTAGto package.json’s version even when building an arbitrary branch, then creates the release without--verify-tagor--target. A branch dispatch can publish branch artifacts under a tag created from the default branch and bypass the tag-based concurrency group; require an existing verified tag or explicitly target the workflow SHA..github/workflows/release.yml:553- For3.3.0-beta.1,3.3.0-beta.2, and nightly variants, electron-builder’s AppX conversion produces the same3.3.0.0package version, which this gate expects at line 553. Successive Store submissions can be rejected or fail to update flight users; choose a monotonic four-part Store-version scheme or skip prerelease AppX publication. MSIX update requirementsscripts/verify-release-assets.cjs:252- The post-upload verifier accepts any correctly hashed asset in each manifest. A release containing all expected assets can pass iflatest.ymlreferences a macOS ZIP, leaving Windows electron-updater without an.exe; similarly, Linux manifests need the correct AppImage/architecture entries. Validate manifest-to-platform, extension, and architecture mappings at this shared verification boundary.main/index.ts:80- A nightly install setsautoUpdater.channel = 'nightly'. The pinned electron-updater GitHub provider searches only for an exact nightly prerelease; when no nightly release exists, it throwsERR_UPDATER_NO_PUBLISHED_VERSIONSinstead of selecting stable. Confirm that nightly is intentionally isolated, or define an explicit stable fallback.🔧 Fix: Harden release promotion and manifest verification
2 errors still open:
scripts/verify-release-assets.cjs:153- electron-builder emits same-architecture deb/rpm entries into the Linux updater manifest, but this mapping allows only AppImage. Every release therefore fails verification atlatest-linux*.ymland is never published. Allow the corresponding deb/rpm artifacts while keeping AppImage required..github/workflows/release.yml:777- The promotion-only dispatch checks only that the release is published and non-prerelease before settingmake_latest=true; it does not prove the release passed asset verification. An incomplete manually published release with the exact tag can become GitHub Latest. Require a persisted verification proof or re-verify the published assets before promotion.✅ **Test** - passed
✅ No issues found.
npm run test:release-configMocked GitHub API execution ofscripts/verify-release-assets.cjsfor stable, beta, and nightly draft releasesParsed workflow semantic model covering draft gating, channel manifests, verification dependency, and explicit promotionCLI fixture check for safe lowercase artifact names and rejection of unsafe namesgit diff --checkand final worktree diff inspection✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.