Skip to content

fix(ci): harden desktop prerelease tag computation - #6044

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/desktop-prerelease-tag-empty-release-list
Jul 29, 2026
Merged

fix(ci): harden desktop prerelease tag computation#6044
waleedlatif1 merged 1 commit into
stagingfrom
fix/desktop-prerelease-tag-empty-release-list

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Flagged by Cursor Bugbot on v0.7.48: perf improvements, confluence and sharepoint fixes, dependency updates, global folders, desktop app #6042. With no stable releases, gh release list --jq '.[0].tagName' prints the literal string null${LATEST:-v0.0.0} doesn't treat that as empty, so the tag became vnull..1-beta.N and gh release create fails on the invalid ref
  • Replaced the :- fallback with a ^v?[0-9]+\.[0-9]+\.[0-9]+$ shape check, so null / empty / any non-semver tag correctly falls back to v0.0.0
  • Dropped the || true, which swallowed a failed release query and fell back to v0.0.0 — that published a v0.0.1-beta.N prerelease sorting below the shipped stable, so beta-channel shells would silently never see it as an update. Now fails loudly with ::error::

Not reachable on simstudioai/sim today (200 releases, v0.7.47 stable, and the prune job only deletes prereleases), but it breaks forks and the swallowed-failure path is a green run that quietly takes the update channel down.

Type of Change

  • Bug fix

Testing

Tested manually — ran the tag logic against each input:

LATEST resulting tag
v0.7.47 v0.7.48-beta.42.1 (unchanged)
null v0.0.1-beta.42.1
"" / v0.7 / v1.2.3-rc1 v0.0.1-beta.42.1
query fails exits 1 with ::error::

actionlint reports nothing new on the edited block (remaining output is pre-existing Blacksmith runner labels and unrelated SC2086).

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

An empty stable release list makes `gh ... --jq '.[0].tagName'` print the
literal string "null", which `${LATEST:-v0.0.0}` does not treat as empty,
producing a malformed tag like `vnull..1-beta.N`.

The `|| true` also swallowed a failed release query, silently falling back
to v0.0.0 and publishing a channel build that sorts below the shipped
stable — installed shells would never see it as an update.
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Building Building Preview, Comment Jul 29, 2026 3:12am

Request Review

@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
CI-only shell logic in one workflow step; behavior improves failure modes and semver fallback without touching runtime app code.

Overview
Hardens how CI picks the base version for alpha/beta desktop prerelease tags in create-desktop-prerelease.

When gh release list returns no stable tag, jq emits the literal string null, which the old ${LATEST:-v0.0.0} fallback did not replace—producing invalid tags like vnull..1-beta.N and failing gh release create. The workflow now validates LATEST with a semver shape regex and only then falls back to v0.0.0 (channel builds start at v0.0.1-…).

It also stops swallowing release-query failures (|| true removed): a failed query now exits with ::error:: instead of silently using v0.0.0, which could publish prereleases that sort below the real stable and hide updates from installed shells.

Reviewed by Cursor Bugbot for commit 89a6487. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Hardens desktop prerelease tag computation in CI so invalid or missing stable tags no longer produce bad channel versions.

  • Fail the job with ::error:: when gh release list fails instead of swallowing errors with || true.
  • Treat non-semver values (including jq’s literal null for an empty release list) as no stable baseline and fall back to v0.0.0 before bumping the patch for the channel tag.

Confidence Score: 5/5

Safe to merge; the workflow change correctly fails closed on release-query errors and only falls back when the latest stable tag is missing or not bare semver.

The updated shell logic matches the intended contract (no silent v0.0.x channel publish on query failure; null/empty/non-semver baselines map to v0.0.0 then bump), with no remaining incorrect path in the changed block.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Replaces empty-default + swallowed gh errors with fail-closed query handling and a bare vX.Y.Z shape check before computing the next beta/channel tag.

Reviews (1): Last reviewed commit: "fix(ci): harden desktop prerelease tag c..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit 6cacd7c into staging Jul 29, 2026
20 of 21 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/desktop-prerelease-tag-empty-release-list branch July 29, 2026 03:15
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