Conversation
Greptile SummaryThis PR adds
Confidence Score: 4/5Safe to merge with the understanding that strict-metadata does not yet enforce created_at completeness at the run_single output layer One P1 finding: strict-metadata mode does not validate that returned versions actually carry created_at timestamps, so a silent all-null result still exits 0. All other changes are well-scoped and correctly wired. src/cli/ls_remote.rs — missing post-fetch created_at completeness check in run_single under --strict-metadata Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[mise ls-remote] --> B{--strict-metadata?}
B -- yes --> C[requires --json + --no-versions-host\nclap enforces]
C --> D[set_strict_metadata true\nskip versions host]
B -- no --> E[normal path\nversions host optional]
D --> F{single tool or all?}
E --> F
F -- single --> G[backend._list_remote_versions]
F -- all --> H[iterate all backends]
G --> I{backend type}
I -- Aqua --> J[get_tags_with_created_at]
J -- Err + strict --> K[bail with wrap_err]
J -- Err + not strict --> L[warn + return empty]
J -- Ok --> M[return versions]
I -- Ruby --> N[fetch_ruby_release_dates]
N -- Err + strict --> O[propagate error via ?]
N -- Err + not strict --> P[debug log + empty map]
N -- Ok --> Q[map versions + timestamps]
M --> R[run_single: output JSON/plain]
Q --> R
R -. P1: no created_at\ncompleteness check .-> S[exit 0 with null timestamps]
|
| static STRICT_METADATA: AtomicBool = AtomicBool::new(false); | ||
|
|
||
| pub fn set_strict_metadata(strict: bool) { | ||
| STRICT_METADATA.store(strict, Ordering::Relaxed); | ||
| } | ||
|
|
||
| pub fn strict_metadata() -> bool { | ||
| STRICT_METADATA.load(Ordering::Relaxed) | ||
| } |
There was a problem hiding this comment.
Global mutable state can leak across parallel integration tests
STRICT_METADATA is a process-global AtomicBool. Integration tests that invoke set_strict_metadata(true) will affect any other test running concurrently in the same process, since the Rust test harness runs tests on multiple threads by default. The unit tests added in this PR don't touch the flag, so they're fine, but future integration tests for ls-remote could be silently affected.
Consider resetting to false at the end of LsRemote::run (or using a scoped guard) to limit the blast radius.
There was a problem hiding this comment.
Code Review
This pull request introduces a new --strict-metadata flag for the ls-remote command, designed to ensure that JSON output includes complete version metadata, such as created_at timestamps. When enabled, the system will fail with an error if metadata cannot be fetched, rather than issuing a warning and providing a fallback list. The changes span documentation, CLI argument parsing, and backend logic across several modules. A review comment suggests using format! instead of eyre! within wrap_err_with for consistency with existing idiomatic patterns in the codebase.
| eyre!( | ||
| "failed to fetch version metadata from versions host for {}", | ||
| ba.to_string() | ||
| ) |
There was a problem hiding this comment.
For consistency with other parts of the codebase (e.g., src/backend/aqua.rs), it's more idiomatic to use format! here instead of eyre! when providing context to wrap_err_with. The eyre! macro is typically used for creating new errors, whereas format! is sufficient for generating a displayable context message.
| eyre!( | |
| "failed to fetch version metadata from versions host for {}", | |
| ba.to_string() | |
| ) | |
| format!( | |
| "failed to fetch version metadata from versions host for {}", | |
| ba.to_string() | |
| ) |
# Conflicts: # docs/cli/ls-remote.md # mise.usage.kdl # src/cli/ls_remote.rs
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33f708e. Configure here.
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.25 x -- echo |
24.4 ± 0.8 | 22.6 | 28.2 | 1.00 |
mise x -- echo |
24.4 ± 0.7 | 22.4 | 28.9 | 1.00 ± 0.04 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.25 env |
24.7 ± 1.1 | 22.4 | 30.1 | 1.06 ± 0.06 |
mise env |
23.2 ± 0.8 | 21.4 | 28.4 | 1.00 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.25 hook-env |
23.5 ± 0.8 | 22.0 | 26.7 | 1.00 |
mise hook-env |
24.3 ± 0.8 | 22.5 | 26.8 | 1.03 ± 0.05 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.25 ls |
24.6 ± 0.9 | 22.3 | 29.2 | 1.02 ± 0.05 |
mise ls |
24.1 ± 0.7 | 22.7 | 28.1 | 1.00 |
xtasks/test/perf
| Command | mise-2026.4.25 | mise | Variance |
|---|---|---|---|
| install (cached) | 161ms | 162ms | +0% |
| ls (cached) | 84ms | 85ms | -1% |
| bin-paths (cached) | 86ms | 87ms | -1% |
| task-ls (cached) | 843ms | 840ms | +0% |
### 🚀 Features - **(deps)** add aube provider by @jdx in [#9452](#9452) - **(ls-remote)** add strict metadata mode by @jdx in [#9448](#9448) ### 🐛 Bug Fixes - **(env)** parse concatenated short form `-Eval` correctly by @bts in [#9456](#9456) - **(http)** improve HTML detection by using Content-Type header by @phateffect in [#9407](#9407) - **(task)** install monorepo subdir tools before running deps by @jdx in [#9454](#9454) ### 📦️ Dependency Updates - update astral-tokio-tar advisory by @jdx in [#9449](#9449) - respect -q flag for provider command stream by @JamBalaya56562 in [#9457](#9457) ### New Contributors - @JamBalaya56562 made their first contribution in [#9457](#9457) - @bts made their first contribution in [#9456](#9456) - @phateffect made their first contribution in [#9407](#9407) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

Summary
mise ls-remote --no-versions-hostto explicitly bypassmise-versionsfor direct backend checks--strict-metadatato be used with both--jsonand--no-versions-host, so strict mode validates direct backend metadata behavior instead of cached rowscreated_atoutputliqoctlfrom the registry because its defaultaqua:liqotech/liqopackage does not exist in aqua-registryWhy
The
mise-versionsupdate job needs a mode that does not silently accept empty fallback results when metadata-producing upstream calls fail. Requiring every backend row to containcreated_atis too broad because some registry defaults are not GitHub-backed and cannot provide timestamps.--no-versions-hostkeeps the direct-upstream behavior explicit instead of baking backend allowlists into strict metadata mode.Validation
cargo fmt --checkcargo checkcargo buildcargo build --all-featurestarget/debug/mise run render:usagetarget/debug/mise run render:mangentarget/debug/mise run render:figtarget/debug/mise ls-remote github:cli/cli --json --strict-metadatafails because--no-versions-hostis requiredtarget/debug/mise ls-remote github:cli/cli --no-versions-host --strict-metadatafails because--jsonis requiredtarget/debug/mise ls-remote github:cli/cli --json --no-versions-host --strict-metadata | jq 'length, .[0]'target/debug/mise ls-remote bun --json --no-versions-host --strict-metadata | jq 'length, .[0]'target/debug/mise ls-remote ruby --json --no-versions-host --strict-metadata | jq 'length, .[0]'hksuite, including all-featurescargo checkNote
Low Risk
Behavior changes are gated behind new
ls-remoteflags, but strict mode alters error handling by surfacing upstream metadata failures (aqua/ruby) that previously returned empty/partial results.Overview
mise ls-remotenow supports--no-versions-hostto force direct backend checks and--strict-metadata(requires--json+--no-versions-host) to fail instead of silently falling back when metadata-producing upstream calls fail.Introduces a shared strict-metadata toggle in
backendand updates the Aqua backend and Ruby core plugin to propagate GitHub/aqua metadata fetch errors in strict mode. Removes theliqoctlregistry entry due to an invalid default aqua package, and regenerates usage docs, the manpage, and the Fig completion spec to document the new flags.Reviewed by Cursor Bugbot for commit 5af4202. Bugbot is set up for automated code reviews on this repo. Configure here.