fix(lockfile): respect existing platforms during auto-lock#9621
Conversation
Greptile Summary
Confidence Score: 5/5Safe to merge; the logic change is well-reasoned, fully tested, and the lockfile updates are expected consequences of the fix. No P0 or P1 issues found. The curated-vs-fresh heuristic is correct (snapshot before write, non-empty → authoritative), unit tests cover all three branches (multi-platform curated, single-platform curated, fresh/empty), and the e2e test validates the end-to-end regression scenario. No files require special attention. Reviews (7): Last reviewed commit: "fix(lockfile): respect existing platform..." | Re-trigger Greptile |
There was a problem hiding this comment.
Code Review
This pull request updates several tool versions in the mise lockfile, including aube, bun, fd, gh, hk, lua-language-server, sops, stylua, and usage, and changes the aube version requirement to 'latest' in mise.toml. A critical issue was identified in the lockfile where the update to fd version 10.4.2 resulted in the removal of macos-x64 platform entries, which will break the development environment for users on Intel-based Macs.
|
|
||
| [[tools.fd]] | ||
| version = "10.3.0" | ||
| version = "10.4.2" |
There was a problem hiding this comment.
The update to fd version 10.4.2 in the lockfile has resulted in the removal of the macos-x64 and macos-x64-baseline platform entries. These were present in the previous version (10.3.0) and are still available in the upstream release. This change will break the development environment for users on Intel-based Macs. Please regenerate the lockfile to ensure all supported platforms are included.
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.0 x -- echo |
20.0 ± 0.8 | 18.2 | 23.1 | 1.00 |
mise x -- echo |
20.5 ± 1.0 | 18.7 | 25.5 | 1.02 ± 0.07 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.0 env |
19.5 ± 0.9 | 18.0 | 24.4 | 1.00 |
mise env |
19.8 ± 1.2 | 18.3 | 33.3 | 1.02 ± 0.07 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.0 hook-env |
20.2 ± 0.9 | 18.4 | 25.9 | 1.00 |
mise hook-env |
20.4 ± 1.0 | 18.8 | 26.4 | 1.01 ± 0.07 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.0 ls |
20.2 ± 0.9 | 18.2 | 26.0 | 1.17 ± 0.08 |
mise ls |
17.3 ± 0.9 | 15.6 | 21.4 | 1.00 |
✅ Performance improvement for ls is 17% |
xtasks/test/perf
| Command | mise-2026.5.0 | mise | Variance |
|---|---|---|---|
| install (cached) | 128ms | 127ms | +0% |
| ls (cached) | 62ms | 60ms | +3% |
| bin-paths (cached) | 63ms | 64ms | -1% |
| task-ls (cached) | 542ms | 547ms | +0% |
Bumps aube to latest and refreshes mise.lock entries for several dev tools (bun, fd, gh, hk, lua-language-server, sops, stylua, usage). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1d7c57f. Configure here.
9e3e302 to
bd1beea
Compare
`determine_target_platforms_from_lockfile` (the auto-lock path) always unioned `Platform::common_platforms()` into the target set, which made the lockfile additive: platforms removed from `mise.lock` would silently reappear on the next `mise install` because auto-lock would re-resolve them. Match the explicit `mise lock` behavior in `determine_existing_platforms`: when the lockfile already has platform entries, treat those (plus the current platform) as authoritative; only fall back to common defaults when the lockfile has no entries yet. The `lockfile_platforms` setting remains the highest-priority override. Also drops the now-stale `platforms.macos-x64` and `platforms.macos-x64-baseline` entries from `mise.lock`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
### 🚀 Features - **(aqua)** support registry libc variants by @jdx in [#9652](#9652) - **(bin-paths)** add executable names output by @risu729 in [#9617](#9617) ### 🐛 Bug Fixes - **(aqua)** preserve configured file extensions by @risu729 in [#9611](#9611) - **(aqua)** support registry file links by @risu729 in [#9610](#9610) - **(backend)** reject bare package backend names by @risu729 in [#9608](#9608) - **(backend)** apply inline tool option overrides by @risu729 in [#9306](#9306) - **(backend)** skip versions host for local tool opts by @risu729 in [#9568](#9568) - **(github)** chmod explicit archive bin by @risu729 in [#9609](#9609) - **(install)** skip remote-versions refresh in prefer-offline mode by @jdx in [#9627](#9627) - **(lock)** scope targets to active project root by @risu729 in [#9319](#9319) - **(lockfile)** respect existing platforms during auto-lock by @jdx in [#9621](#9621) - **(pipx)** filter yanked pypi releases by @risu729 in [#9607](#9607) - **(pipx)** declare python as a backend dependency by @jdx in [#9678](#9678) - **(schema)** update refs to $defs in mise-registry-tool.json by @risu729 in [#9671](#9671) - **(task)** terminate parallel siblings on failure via process groups by @jdx in [#9655](#9655) - **(task)** stable MISE_PROJECT_ROOT for monorepo tasks, add MISE_MONOREPO_ROOT by @jdx in [#9657](#9657) - **(trust)** run enter hooks after trusting config by @risu729 in [#9634](#9634) - **(ui)** stop clearing screen for prompts by @jdx in [#9619](#9619) - use /bin/cp on macos by @pdehlke in [#9656](#9656) ### 🚜 Refactor - **(aqua)** store aqua var defaults as strings by @risu729 in [#9645](#9645) - **(config)** support structured TOML values in registry backend options by @risu729 in [#9584](#9584) - **(deps)** remove serde_derive dependency by @risu729 in [#9670](#9670) - **(deps)** remove anyhow dependency by @risu729 in [#9661](#9661) - **(deps)** use std::sync::LazyLock instead of once_cell::Lazy by @risu729 in [#9668](#9668) - **(schema)** generate task schema from mise schema by @risu729 in [#9581](#9581) - **(schema)** reuse task props with unevaluatedProperties by @risu729 in [#9582](#9582) - **(schema)** reuse registry common types by @risu729 in [#9648](#9648) - **(schema)** reuse plugin script config by @risu729 in [#9647](#9647) - **(schema)** use $defs in schema files by @risu729 in [#9646](#9646) ### 📚 Documentation - **(node)** add tips for enabling node idiomatic by @fu050409 in [#9675](#9675) ### 🧪 Testing - **(cli)** remove nondeterministic tool depends assertion by @risu729 in [#9633](#9633) - **(e2e)** pin uv to 0.11.8 around astral-sh/uv#19278 by @jdx in [#9618](#9618) - **(e2e)** wait for docker env cleanup by @risu729 in [#9631](#9631) - **(zig)** use official zig instead of mach mirror by @jdx in [#9659](#9659) ### 📦️ Dependency Updates - fall through to hash check when providers have no outputs by @jdx in [#9622](#9622) - bump Cargo.lock by @jdx in [#9625](#9625) ### 📦 Registry - remove registry depends by @risu729 in [#9571](#9571) - add code-review-graph (pipx:code-review-graph) by @chautruonglong in [#9673](#9673) ### Chore - **(ci)** split large registry test-tool changes by @risu729 in [#9628](#9628) - **(ci)** make perf script robust to runner noise by @jdx in [#9635](#9635) - **(ci)** skip hyperfine comments without permission by @risu729 in [#9629](#9629) ### New Contributors - @chautruonglong made their first contribution in [#9673](#9673) - @pdehlke made their first contribution in [#9656](#9656) ## 📦 Aqua Registry Updates ### New Packages (5) - [`anthropics/anthropic-cli`](https://github.com/anthropics/anthropic-cli) - [`crates.io/wasmi_cli`](https://github.com/wasmi-labs/wasmi) - [`openclaw/gogcli`](https://github.com/openclaw/gogcli) - `racket-lang.org/racket-minimal` - [`runs-on/cli`](https://github.com/runs-on/cli) ### Updated Packages (13) - [`UpCloudLtd/upcloud-cli`](https://github.com/UpCloudLtd/upcloud-cli) - [`aristocratos/btop`](https://github.com/aristocratos/btop) - [`dprint/dprint`](https://github.com/dprint/dprint) - [`j178/prek`](https://github.com/j178/prek) - [`jdx/hk`](https://github.com/jdx/hk) - [`jdx/mise`](https://github.com/jdx/mise) - [`jdx/usage`](https://github.com/jdx/usage) - [`jreleaser/jreleaser`](https://github.com/jreleaser/jreleaser) - [`jreleaser/jreleaser/standalone`](https://github.com/jreleaser/jreleaser) - [`pnpm/pnpm`](https://github.com/pnpm/pnpm) - [`suzuki-shunsuke/cmdx`](https://github.com/suzuki-shunsuke/cmdx) - [`suzuki-shunsuke/ghir`](https://github.com/suzuki-shunsuke/ghir) - [`twpayne/chezmoi`](https://github.com/twpayne/chezmoi)

Summary
Auto-lock (the path triggered after
mise install) was always unioningPlatform::common_platforms()into its target set, so platforms removed frommise.lockwould silently reappear on the next install. The explicitmise lockpath (determine_existing_platforms) already treats existing entries as authoritative; auto-lock should behave the same way once the lockfile has been curated.The trick is distinguishing "user-curated lockfile" from "fresh first-install" without breaking either. Counting platforms doesn't work — it bans 1-platform lockfiles. The signal that does work: was the lockfile populated before this install ran, or only as a side-effect of it?
This PR snapshots
lockfile.all_platform_keys()beforeupdate_lockfileswrites any current-platform entries (src/config/mod.rs), threads the snapshot through intoauto_lock_new_versions, and uses it indetermine_target_platforms_from_lockfile:touch mise.lock; mise use jqUX).The
lockfile_platformssetting still wins as the explicit override.Also bumps several dev tools (
aube,bun,fd,gh,hk,lua-language-server,sops,stylua,usage) and drops the now-staleplatforms.macos-x64/platforms.macos-x64-baselinerows frommise.lock— without the fix above, autofix.ci would put them right back.Regression coverage
Unit tests in
src/lockfile.rs:test_determine_target_platforms_respects_pre_install_keys— multi-platform pre-install snapshot, common defaults must NOT leak in.test_determine_target_platforms_one_platform_lockfile_is_authoritative— pre-install snapshot of one platform stays as one platform.test_determine_target_platforms_expands_for_fresh_lockfile— empty pre-install snapshot → all common platforms targeted.E2E test (
e2e/lockfile/test_lockfile_auto_lock) extended:platforms.macos-x64from a populated lockfile, thenmise installanother tool —macos-x64stays removed.Test plan
cargo test --bin mise lockfile::— 28 passedmise run test:e2e lockfile/test_lockfile_auto_lock— passes locally (covers fresh, no-op, new-tool, and removed-platform cases)🤖 Generated with Claude Code
Note
Medium Risk
Changes the platform-selection logic used during
mise installauto-locking, which can alter lockfile contents across developer environments. Risk is moderate due to behavioral changes in a core workflow, though it’s covered by new unit and e2e tests.Overview
Auto-lock during
mise installnow respects curated lockfiles. The install flow snapshots each affected lockfile’s pre-install platform keys and uses that snapshot to decide which platforms to auto-resolve, preventing deleted platforms from being silently reintroduced.auto_lock_new_versionsis updated to take the pre-install snapshot and target either (a) the existing platform set (plus current platform) when the lockfile already had platform entries, or (b) the common platform set for a fresh/empty lockfile;lockfile_platformsremains an override. Adds unit tests for these cases and extends the e2e lockfile suite to assert that removingplatforms.macos-x64persists across subsequent installs.Separately updates the repo
mise.lockwith new tool versions and removes severalplatforms.macos-x64/platforms.macos-x64-baselineentries, and switchesaubeinmise.tomltolatest.Reviewed by Cursor Bugbot for commit 752e1e8. Bugbot is set up for automated code reviews on this repo. Configure here.