fix(aqua): drop empty-releases fallback to tags#9443
Conversation
When list_releases_including_prereleases returns Ok([]) (paginated/cached edge case, throttled response, or a repo that genuinely has no releases), the empty-result fallback to list_tags pulled in every git tag in the repo. For monorepos that tag sub-crates, that meant non-release tags like ripgrep's grep-regex-0.1.1 surfaced as candidate versions — and got written into the shared remote-versions snapshot, breaking installs for everyone consuming it. Aqua packages that legitimately use git tags as their version source already opt in via version_source = "github_tag"; those continue to work unchanged. For everything else, an empty release list now propagates as an empty version list rather than masquerading as "all the tags".
Greptile SummaryThis PR fixes a bug where Aqua packages without GitHub releases fell back to Confidence Score: 5/5Safe to merge — minimal, targeted change with no new logic paths introduced. Both changes are small deletions or renames with clear, well-reasoned motivations. The No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[get_tags_with_created_at] --> B{version_source == github_tag?}
B -- Yes --> C[github::list_tags]
C --> D[return tags with prerelease=false]
B -- No --> E[github::list_releases_including_prereleases]
E --> F{releases empty?}
F -- Yes BEFORE --> G_OLD[github::list_tags fallback]
G_OLD --> H_OLD[return all repo tags / monorepo tags included]
F -- Yes AFTER --> I[return empty list]
F -- No --> J[return releases with tag_name, created_at, prerelease]
Reviews (2): Last reviewed commit: "fix(backend): keep remote_versions cache..." | Re-trigger Greptile |
The bump to `remote_versions_v2.msgpack.z` invalidated every existing cache file with no real benefit. `VersionInfo` deserializes forwards-compatibly — `prerelease` defaults to `false` via `#[serde(default)]`, so old caches read fine. Users opting into pre-releases would just see no extra entries from a pre-feature cache until TTL expiry, which is the same staleness window any cache invalidation would create. Filename churn isn't worth it.
There was a problem hiding this comment.
Code Review
This pull request removes the fallback logic in the get_tags_with_created_at function within src/backend/aqua.rs, which previously queried GitHub tags if no releases were found. The function now exclusively returns results from the releases API. I have no feedback to provide as there were no review comments to evaluate.
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.24 x -- echo |
19.6 ± 0.8 | 18.2 | 22.2 | 1.01 ± 0.05 |
mise x -- echo |
19.5 ± 0.8 | 18.5 | 27.5 | 1.00 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.24 env |
18.5 ± 0.7 | 17.5 | 21.7 | 1.00 |
mise env |
19.0 ± 0.6 | 17.9 | 21.4 | 1.03 ± 0.05 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.24 hook-env |
19.6 ± 0.8 | 18.3 | 23.6 | 1.00 |
mise hook-env |
20.4 ± 0.5 | 19.3 | 22.1 | 1.04 ± 0.05 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.24 ls |
20.4 ± 1.0 | 19.0 | 30.9 | 1.00 |
mise ls |
21.3 ± 0.8 | 19.6 | 30.9 | 1.04 ± 0.06 |
xtasks/test/perf
| Command | mise-2026.4.24 | mise | Variance |
|---|---|---|---|
| install (cached) | 130ms | 132ms | -1% |
| ls (cached) | 70ms | 69ms | +1% |
| bin-paths (cached) | 72ms | 72ms | +0% |
| task-ls (cached) | 639ms | 640ms | +0% |
### 🚀 Features - **(task)** add --name-only flag to mise tasks ls by @jdx in [#9435](#9435) ### 🐛 Bug Fixes - **(Dockerfile)** install copr-cli via dnf for better dependency management by @bestagi in [#9421](#9421) - **(aqua)** drop empty-releases fallback to tags by @jdx in [#9443](#9443) - **(docs)** fix theme flicker on docs by @vhespanha in [#9427](#9427) - **(lockfile)** update global lockfile on upgrade by @jdx in [#9442](#9442) - **(ls-remote)** omit rolling/prerelease from JSON when false by @jdx in [#9439](#9439) - **(task)** support usage refs in dependency template tags by @jdx in [#9424](#9424) - **(task)** populate usage.cmd for subcommand-only tasks; share make_usage_ctx by @jdx in [#9431](#9431) - **(task)** resolve sandbox allow_read/allow_write against task dir by @jdx in [#9428](#9428) ### 📚 Documentation - **(site)** add self-hosted page tracker via Cloudflare Worker, drop GoatCounter by @jdx in [#9430](#9430) ### New Contributors - @vhespanha made their first contribution in [#9427](#9427) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Summary
Two related fixes from the prerelease feature aftermath:
1.
fix(aqua): drop empty-releases fallback to tagsWhen
list_releases_including_prereleasesreturnedOk([])— paginated/cached edge case, throttled response, or a repo that genuinely has no releases — the fallback tolist_tagspulled in every git tag in the repo. For monorepos that tag sub-crates, that meant non-release tags like ripgrep'sgrep-regex-0.1.1surfaced as candidate versions and got written into the sharedmise-versionssnapshot. End users hitting that snapshot then sawripgrep = "latest"resolve togrep-regex-0.1.1, which 404s on the GitHub release URL.Aqua packages that legitimately use git tags as their version source already opt in via
version_source = "github_tag"; those continue to work. For everything else, an empty release list now propagates as an empty version list rather than masquerading as "all the tags".mise-versionssnapshots will need to be regenerated with a release that includes this fix.2.
fix(backend): keepremote_versionscache filename stableThe bump to
remote_versions_v2.msgpack.zinvalidated every existing cache file with no real benefit.VersionInfodeserializes forwards-compatibly (prereleasedefaults tofalsevia#[serde(default)]), so old caches read fine. Users opting into pre-releases would just see no extra entries from a pre-feature cache until TTL expiry, which is the same staleness window any cache invalidation creates. Reverting toremote_versions.msgpack.z.Test plan
MISE_FETCH_REMOTE_VERSIONS_CACHE=0 mise ls-remote ripgrepreturns ripgrep release versions only (nogrep-regex-*,globset-*, etc.)mise install -f ripgrep@latestresolves to a real releaseversion_source = "github_tag"remote_versions.msgpack.zcache files continue to be read🤖 Generated with Claude Code