Skip to content

feat(doctor): add backend mismatch warnings#7847

Merged
jdx merged 1 commit intomainfrom
doctor-backend-mismatch-warnings
Jan 27, 2026
Merged

feat(doctor): add backend mismatch warnings#7847
jdx merged 1 commit intomainfrom
doctor-backend-mismatch-warnings

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Jan 27, 2026

Summary

  • Add a new check to mise doctor that warns when installed tools have backends that don't match the current registry recommendations
  • Helps users identify tools that may benefit from reinstallation to use improved backends
  • Shows different messages for explicit vs automatic backend choices
  • Provides migration command in the warning message

Test plan

  • Build passes
  • Linting passes
  • E2E tests pass (mise run test:e2e test_doctor)
  • Manual testing confirms warnings appear correctly in both text and JSON output

🤖 Generated with Claude Code


Note

Adds a backend mismatch diagnostic to mise doctor.

  • New analyze_backend_mismatches compares installed tool backends (from install_state) to current registry recommendations (REGISTRY) and emits warnings when they differ
  • Distinguishes explicit vs automatic backend selection and suggests migration commands
  • Wired into both text and JSON doctor outputs

Written by Cursor Bugbot for commit 36946f5. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings January 27, 2026 11:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new backend mismatch detection feature to the mise doctor command, which warns users when their installed tools are using backends that differ from the current registry recommendations. Additionally, it updates the Claude Code registry to use aqua as the preferred backend on Linux and macOS platforms.

Changes:

  • Added analyze_backend_mismatches() function to detect and warn about tools using outdated backends
  • Updated Claude Code registry to prioritize aqua backend over http backend
  • Removed Linux-specific URL override from aqua registry configuration

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/cli/doctor/mod.rs Implements backend mismatch detection logic that compares installed tool backends with registry recommendations
registry/claude.toml Adds aqua backend as the preferred option for Linux and macOS platforms
crates/aqua-registry/aqua-registry/pkgs/anthropics/claude-code/registry.yaml Removes Linux-specific URL override configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cli/doctor/mod.rs
Comment on lines +430 to +431
let stored_stripped = stored_full.split('[').next().unwrap_or(stored_full);
let registry_stripped = registry_full.split('[').next().unwrap_or(registry_full);
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bracket-stripping logic is duplicated. Consider extracting this into a helper function like strip_backend_options(backend: &str) -> &str to improve maintainability and make the intent clearer.

Copilot uses AI. Check for mistakes.
Comment thread src/cli/doctor/mod.rs
Comment on lines +437 to +445
r#"tool '{short}' installed with explicit backend '{stored_full}'
differs from registry recommendation '{registry_full}'.
To switch: mise uninstall --all {short} && mise install {short}"#
)
} else {
formatdoc!(
r#"tool '{short}' installed with backend '{stored_full}'
but registry now recommends '{registry_full}'.
To migrate: mise uninstall --all {short} && mise install {short}"#
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation in the multi-line error message includes leading whitespace that will appear in the output. The formatdoc! macro should handle this, but verify that the displayed message doesn't have unexpected leading spaces on lines 438-439.

Suggested change
r#"tool '{short}' installed with explicit backend '{stored_full}'
differs from registry recommendation '{registry_full}'.
To switch: mise uninstall --all {short} && mise install {short}"#
)
} else {
formatdoc!(
r#"tool '{short}' installed with backend '{stored_full}'
but registry now recommends '{registry_full}'.
To migrate: mise uninstall --all {short} && mise install {short}"#
r#"
tool '{short}' installed with explicit backend '{stored_full}'
differs from registry recommendation '{registry_full}'.
To switch: mise uninstall --all {short} && mise install {short}"#
)
} else {
formatdoc!(
r#"
tool '{short}' installed with backend '{stored_full}'
but registry now recommends '{registry_full}'.
To migrate: mise uninstall --all {short} && mise install {short}"#

Copilot uses AI. Check for mistakes.
Add a new check to `mise doctor` that warns when installed tools have
backends that don't match the current registry recommendations. This
helps users identify tools that may benefit from reinstallation to use
improved backends.

The check:
- Skips plugin-based tools (they use the plugin as their backend)
- Compares stored backend with registry recommendation
- Strips options for comparison (e.g., github:repo[exe=bin] -> github:repo)
- Shows different messages for explicit vs automatic backend choices
- Provides migration command in the warning message

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jdx jdx force-pushed the doctor-backend-mismatch-warnings branch from 0a46a4e to 36946f5 Compare January 27, 2026 11:58
@jdx jdx merged commit 5442a11 into main Jan 27, 2026
35 checks passed
@jdx jdx deleted the doctor-backend-mismatch-warnings branch January 27, 2026 12:13
@github-actions
Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.1.8 x -- echo 20.1 ± 0.9 19.0 30.7 1.00
mise x -- echo 21.1 ± 0.8 19.7 31.1 1.05 ± 0.06

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.1.8 env 19.4 ± 1.0 18.5 34.0 1.00
mise env 20.1 ± 0.9 19.2 36.4 1.04 ± 0.07

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.1.8 hook-env 19.6 ± 0.3 18.8 20.8 1.00
mise hook-env 20.3 ± 0.5 19.2 22.0 1.03 ± 0.03

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.1.8 ls 17.3 ± 0.4 16.6 19.2 1.00
mise ls 18.1 ± 0.8 17.1 25.8 1.04 ± 0.05

xtasks/test/perf

Command mise-2026.1.8 mise Variance
install (cached) 112ms 113ms +0%
ls (cached) 67ms 69ms -2%
bin-paths (cached) 72ms 72ms +0%
task-ls (cached) 287ms 287ms +0%

mise-en-dev added a commit that referenced this pull request Jan 28, 2026
### 🚀 Features

- **(doctor)** add backend mismatch warnings by @jdx in
[#7847](#7847)
- **(http)** add rename_exe support for archive extraction by @jdx in
[#7874](#7874)
- **(http)** send x-mise-ci header for CI environment tracking by @jdx
in [#7875](#7875)
- **(install)** auto-install plugins from [plugins] config section by
@jdx in [#7856](#7856)
- **(registry)** add vercel by @mikecurtis in
[#7844](#7844)
- **(task)** support glob patterns in task_config.includes by @jdx in
[#7870](#7870)
- **(task)** add task templates for reusable task definitions by @jdx in
[#7873](#7873)

### 🐛 Bug Fixes

- **(backend)** change registry mismatch log from info to debug by @jdx
in [#7858](#7858)
- **(ci)** use squash merge for auto-merge-release workflow by @jdx in
[7e5e71e](7e5e71e)
- **(ci)** remove --auto flag to merge immediately when CI passes by
@jdx in
[23ed2ed](23ed2ed)
- **(github)** select platform-matching provenance file for SLSA
verification by @jdx in [#7853](#7853)
- **(go)** filter out version "1" from available versions by @jdx in
[#7871](#7871)
- **(install)** skip CurDir components when detecting archive structure
by @jdx in [#7868](#7868)
- **(pipx)** ensure Python minor version symlink exists for postinstall
hooks by @jdx in [#7869](#7869)
- **(registry)** prevent duplicate -stable suffix in Flutter download
URLs by @jdx in [#7872](#7872)
- **(task)** pass env to usage parser for env-backed arguments by @jdx
in [#7848](#7848)
- **(task)** propagate MISE_ENV to child tasks when using -E flag by
@jdx in
[06ee776](06ee776)
- **(vfox-dotnet)** use os.execute() to fix Windows installation by
@prodrigues1912 in [#7843](#7843)

### 📚 Documentation

- update cache-behavior with env_cache information by @jdx in
[#7849](#7849)

### ◀️ Revert

- remove task inheritance from parent configs in monorepos by @jdx in
[#7851](#7851)
- Revert "fix(ci): remove --auto flag to merge immediately when CI
passes" by @jdx in
[0606187](0606187)

### 📦 Registry

- add mago
([aqua:carthage-software/mago](https://github.com/carthage-software/mago))
by @scop in [#7845](#7845)

### Chore

- **(ci)** auto-merge release branch into main daily at 4am CST by @jdx
in [#7852](#7852)

### New Contributors

- @mikecurtis made their first contribution in
[#7844](#7844)
- @prodrigues1912 made their first contribution in
[#7843](#7843)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants