feat(ls-remote): add prereleases setting and --prerelease flag#9415
feat(ls-remote): add prereleases setting and --prerelease flag#9415
prereleases setting and --prerelease flag#9415Conversation
Companion to #9329. That PR added per-tool `prerelease = true` opt-in for `github:` and `aqua:` backends; this PR adds a global escape hatch so consumers that mirror the full release catalog (the versions host's update pipeline, internal CI, anyone querying `ls-remote` ad-hoc without per-tool config) can include pre-releases without listing every tool. - New `prereleases` setting (`MISE_PRERELEASES`). Layered into `include_prereleases()` ahead of the per-tool option, so flipping it acts like `prerelease = true` on every tool. Has no effect on backends that don't carry an upstream prerelease flag (e.g. `github_tag`). - New `--prerelease` flag on `mise ls-remote`. Sets the setting for the duration of the command via a small `Settings::override_with` helper that merges into the existing `CLI_SETTINGS` partial — `Settings::reset` would clobber overrides installed earlier in startup like `--offline` and `--quiet`. - Test for the global-setting path alongside the existing per-tool test in `backend::tests`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Greptile SummaryAdds a global Confidence Score: 5/5Safe to merge — default behavior is unchanged (prereleases still filtered by default) and the new flag/setting is purely opt-in. No P0/P1 findings. The locking strategy in No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant LsRemote
participant Settings
participant Backend
User->>LsRemote: mise ls-remote --prerelease github:cli/cli
LsRemote->>Settings: override_with(|s| s.prereleases = Some(true))
Note over Settings: CLI_SETTINGS mutex locked<br/>partial.prereleases = Some(true)<br/>BASE_SETTINGS cleared
LsRemote->>Settings: Config::get() → Settings::get()
Settings-->>LsRemote: Arc<Settings> (prereleases=true)
LsRemote->>Backend: list_remote_versions()
Backend->>Settings: include_prereleases(&opts)
Note over Settings: Settings::get().prereleases == true<br/>→ returns true immediately
Backend-->>LsRemote: Vec<VersionInfo> (pre-releases included)
LsRemote-->>User: output with pre-release versions
Reviews (2): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile |
…140) ## Summary Sibling to #135. That PR plumbed `prerelease = true` through the TOML pipeline, but on its own the field is dead code: `mise ls-remote --json` filters pre-release tags out before emitting JSON unless the caller has opted in. With ~900 tools, per-tool config isn't viable. [jdx/mise#9415](jdx/mise#9415) adds a global `MISE_PRERELEASES` env var (and a matching `--prerelease` CLI flag) that flips the filter for every tool at once. ## Changes - **`.github/workflows/update.yml`** — set `MISE_PRERELEASES: "1"` at the job env level. Covers the host-side `mise ls-remote --json` call in `generate_toml_file` (the JSON path that actually feeds `generate-toml.js`). - **`scripts/update.sh`** — forward `-e MISE_PRERELEASES` into the Docker container. Covers the plain-text `docker run jdxcode/mise -y ls-remote` call in `fetch()`. ## Verification (after deploy) After the next run, expect to see `prerelease = true` flags on tools whose upstream releases are flagged as pre-releases — e.g. tools with `-rc1` / `-beta` / `-dev.N` GitHub releases. Until then: zero hits, despite #135 being merged. Confirmed against the most recent run ([24968319913](https://github.com/jdx/mise-versions/actions/runs/24968319913)) which touched 646 tools through the JSON path with zero `prerelease = true` flags emitted. ## Sequencing Optimistic — depends on: 1. A mise release containing jdx/mise#9415 in the host mise installed by `aube install` / `mise.run`. (Today's host mise = v2026.4.23, which has #9329 but not #9415.) 2. A rebuild of the `jdxcode/mise` Docker image with the same release for the plain-text fallback path. Until both ship, `MISE_PRERELEASES` is silently ignored — same TOML output as today, no regression. Safe to merge whenever; it activates on its own as soon as the upstream pieces land. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only toggles an environment flag and forwards it into the Dockerized `mise ls-remote` call, changing which versions are included but not altering control flow or security-sensitive logic. > > **Overview** > Enables global inclusion of prerelease tags during the automated versions update run by setting `MISE_PRERELEASES=1` in the `update` GitHub Actions workflow. > > Also forwards `MISE_PRERELEASES` into the `docker run jdxcode/mise ... ls-remote` invocation in `scripts/update.sh`, allowing downstream TOML generation to populate the new `prerelease = true` metadata when upstream marks releases as prereleases. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b8f30b5. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.22 x -- echo |
21.8 ± 0.4 | 21.1 | 26.5 | 1.00 |
mise x -- echo |
22.1 ± 0.4 | 21.5 | 26.6 | 1.02 ± 0.02 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.22 env |
21.4 ± 0.6 | 20.8 | 26.5 | 1.00 |
mise env |
21.8 ± 1.0 | 21.0 | 31.7 | 1.02 ± 0.05 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.22 hook-env |
22.1 ± 0.4 | 21.3 | 26.4 | 1.00 |
mise hook-env |
22.4 ± 0.3 | 21.7 | 25.0 | 1.01 ± 0.02 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.22 ls |
22.3 ± 0.3 | 21.7 | 24.9 | 1.00 |
mise ls |
22.9 ± 0.3 | 22.3 | 24.5 | 1.03 ± 0.02 |
xtasks/test/perf
| Command | mise-2026.4.22 | mise | Variance |
|---|---|---|---|
| install (cached) | 164ms | 158ms | +3% |
| ls (cached) | 78ms | 81ms | -3% |
| bin-paths (cached) | 80ms | 81ms | -1% |
| task-ls (cached) | 817ms | 794ms | +2% |
### 🚀 Features - **(ls-remote)** add `prereleases` setting and `--prerelease` flag by @jdx in [#9415](#9415) ### 🐛 Bug Fixes - **(http)** retry transient HTTP failures with backoff and warn on rescue by @jdx in [#9414](#9414) - **(release)** purge mise.en.dev CDN zone after each S3 publish by @jdx in [#9416](#9416) ### 📚 Documentation - prefix GitHub star count with ★ glyph by @jdx in [#9417](#9417) - update intro messaging by @jdx in [#9418](#9418)
Summary
Companion to #9329, which added per-tool
prerelease = trueopt-in for thegithub:andaqua:backends. That covers the case where a user wants pre-releases for one specific tool. This PR adds the global escape hatch — equivalent to settingprerelease = trueon every tool — for consumers that mirror the full release catalog or want pre-release tags to surface inls-remotewithout per-tool config.The motivating case: the versions host pipeline calls
mise ls-remote --jsonfor every tracked tool to populatedocs/*.toml. Per-tool config there isn't viable (≈900 tools), but without a global opt-in, mise filters every prerelease before emitting JSON, and the versions host can't carry the newprerelease = truefield that jdx/mise-versions#135 just plumbed through.Changes
New setting
prereleases(MISE_PRERELEASES) insettings.toml. Layered intoinclude_prereleases()ahead of the per-tool option, so flipping it acts likeprerelease = trueon every tool. Has no effect on backends that don't carry an upstream prerelease flag (e.g.github_tagversion source — git tags don't carry the prerelease bit).New
--prereleaseflag onmise ls-remote. Calls a smallSettings::override_withhelper that merges into the existingCLI_SETTINGSpartial —Settings::resetreplaces wholesale, which would clobber overrides installed earlier in startup like--offline/--quiet. The merge approach lets a subcommand layer one extra override on top.Test for the global-setting path alongside the existing per-tool test in
backend::tests.Test plan
cargo test --bin mise backend::— 193 passcargo test --bin mise config::settings— 22 pass (incl.test_settings_toml_is_sorted)mise ls-remote --helpshows the new flag,mise ls-remote --json --prerelease github:cli/cliruns without errorCompatibility
prereleases = false, prereleases stay filtered. All existing tool configs continue to work.prerelease = trueoption is unaffected — both paths feed into the sameinclude_prereleases()helper, which now ORs them together.Note
Medium Risk
Medium risk because it changes version filtering behavior and settings layering/caching for remote version listings (and
latest/fuzzy resolution viainclude_prereleases), which could affect tool resolution outputs across backends when enabled.Overview
Adds a new global
prereleasessetting (MISE_PRERELEASES) that, when enabled, makesinclude_prereleases()opt into upstream pre-release versions regardless of per-toolprereleaseoptions.Extends
mise ls-remotewith--prerelease, implemented by merging a CLI-layer settings override (Settings::override_with) so the flag can be applied without clobbering other startup overrides.Updates generated CLI docs/usage spec accordingly and adds a regression test ensuring the global setting enables prerelease inclusion by default.
Reviewed by Cursor Bugbot for commit c6f5ffb. Bugbot is set up for automated code reviews on this repo. Configure here.