Skip to content

fix(updates): let a release candidate's manual check see newer RCs - #1448

Merged
EtienneLescot merged 1 commit into
mainfrom
fix/1447-rc-manual-check
Oct 31, 2026
Merged

EtienneLescot merged 1 commit into
mainfrom
fix/1447-rc-manual-check

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Problem

On a release candidate, Check for Updates said "up to date" while a newer RC was published (#1447). It read releases/latest, which GitHub resolves to the latest stable only. Seen in the v2.2.0-rc.1 → rc.2 e2e on macOS and Windows.

Fix

  • Running a prerelease: read releases?per_page=30 and compare against the newest entry, stable or prerelease. That entry is either the next RC or the stable release that supersedes it.
  • Running a stable version: unchanged, still releases/latest.
  • The release-URL check and draft rejection still apply.

Tests

electron/update-checker.test.ts: next RC offered, superseding stable offered, current on the newest RC, and empty, non-list and draft responses rejected. 23/23 pass, and Biome is clean.

Fixes #1447

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Update checks for release-candidate versions now identify the newest available release candidate and can offer a newer candidate or its superseding stable release.
    • Invalid release-list responses, including empty lists and entries containing drafts, are rejected rather than treated as valid updates.
    • Stable-version update checks continue to use the latest stable release.

releases/latest only resolves to a stable release, so an RC compared
itself against the last stable, found it older, and said up to date
while the next RC was live. On a prerelease, read the release list and
compare against the newest entry, stable or not. Stable installs keep
reading releases/latest.

Fixes #1447
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d2e4152b-e27a-498a-a3c7-a5614e172a47
Commits

Reviewing files that changed from the base of the PR and between 093569c and 5c9b89e.

Files selected for processing: 2
  • electron/update-checker.test.ts
  • electron/update-checker.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

checkLatestRelease now uses GitHub’s releases list for prerelease versions and selects the highest semantic-version release. Stable versions continue to use the latest-release endpoint. Tests cover prerelease updates and invalid release-list responses.

Changes: Release checks

Layer / File(s) Summary
Select and validate releases
electron/update-checker.ts, electron/update-checker.test.ts
Prerelease checks fetch and validate a releases list, then select its highest semantic-version release. Stable checks continue to validate the latest stable release. Tests cover RC updates and invalid list responses.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant checkLatestRelease
  participant GitHubReleasesAPI
  participant newestRelease
  participant asRelease
  alt Current version is a prerelease
    checkLatestRelease->>GitHubReleasesAPI: Request releases list
    GitHubReleasesAPI-->>checkLatestRelease: Return release list
    checkLatestRelease->>newestRelease: Validate entries and select highest semver
    newestRelease->>asRelease: Validate release payloads
    asRelease-->>newestRelease: Return validated releases
    newestRelease-->>checkLatestRelease: Return newest release
  else Current version is stable
    checkLatestRelease->>GitHubReleasesAPI: Request latest release
    GitHubReleasesAPI-->>checkLatestRelease: Return latest release
    checkLatestRelease->>asRelease: Validate stable release payload
    asRelease-->>checkLatestRelease: Return validated release
  end
Loading

Possibly related PRs

  • getopenscreen/openscreen#1425: Adds the background update flow; this change updates the manual check path that supplies its release comparison.

Suggested reviewers: arhxam

Merge Risk: Minimal · up to 5c9b8

Prerelease checks now consider newer RCs and superseding stable releases, while stable checks retain their existing endpoint. No actionable merge-blocking issue was established; the change is mergeable subject to normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the fix and the affected behavior: a release candidate's manual update check now detects newer RCs. The raw summary and objectives both describe prerelease manual checks reading the re…
Description check Passed The description covers the problem, the fix, and the tests. It describes the bug (#1447), the prerelease and stable behavior split, and test coverage with results. It includes the "Fixes #1447" refere…
Linked Issues check Passed Issue #1447 requires manual checks on prerelease installs to consider newer prereleases and stable releases, while stable installs continue to use releases/latest. checkLatestRelease detects a pre…
Out of Scope Changes check Passed The changes are limited to electron/update-checker.ts and its tests. The implementation and tests directly support issue #1447. No unrelated product behavior or unrelated files changed.
Full details: Title check

Explanation

The title names the fix and the affected behavior: a release candidate's manual update check now detects newer RCs. The raw summary and objectives both describe prerelease manual checks reading the releases list, so the title matches the main change. It is specific and follows conventional commit style.

Full details: Description check

Explanation

The description covers the problem, the fix, and the tests. It describes the bug (#1447), the prerelease and stable behavior split, and test coverage with results. It includes the "Fixes #1447" reference. The template sections for Type of change, Release impact, Desktop impact, and Screenshots are not filled in. The Testing section is brief and gives no commands. Those omissions are non-critical for a bug fix, so the description is mostly complete.

Full details: Linked Issues check

Explanation

Issue #1447 requires manual checks on prerelease installs to consider newer prereleases and stable releases, while stable installs continue to use releases/latest. checkLatestRelease detects a prerelease version, fetches releases?per_page=30, validates the release entries, selects the highest semver release, and keeps the existing release-URL validation. Stable versions still use releases/latest. The added tests cover a newer RC, a superseding stable release, the newest RC, and invalid list responses.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@EtienneLescot
EtienneLescot merged commit b4432a8 into main Oct 31, 2026
43 of 46 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.

fix(updates): manual check on an RC ignores newer RCs

1 participant