fix(ci): harden desktop prerelease tag computation - #6044
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview When It also stops swallowing release-query failures ( Reviewed by Cursor Bugbot for commit 89a6487. Configure here. |
Greptile SummaryHardens desktop prerelease tag computation in CI so invalid or missing stable tags no longer produce bad channel versions.
Confidence Score: 5/5Safe 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.
|
| 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
Summary
gh release list --jq '.[0].tagName'prints the literal stringnull—${LATEST:-v0.0.0}doesn't treat that as empty, so the tag becamevnull..1-beta.Nandgh release createfails on the invalid ref:-fallback with a^v?[0-9]+\.[0-9]+\.[0-9]+$shape check, sonull/ empty / any non-semver tag correctly falls back tov0.0.0|| true, which swallowed a failed release query and fell back tov0.0.0— that published av0.0.1-beta.Nprerelease 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/simtoday (200 releases,v0.7.47stable, 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
Testing
Tested manually — ran the tag logic against each input:
LATESTv0.7.47v0.7.48-beta.42.1(unchanged)nullv0.0.1-beta.42.1""/v0.7/v1.2.3-rc1v0.0.1-beta.42.1::error::actionlintreports nothing new on the edited block (remaining output is pre-existing Blacksmith runner labels and unrelated SC2086).Checklist