Skip to content

fix(shim): recognize legacy rtx executable name - #11641

Closed
Marukome0743 wants to merge 1 commit into
jdx:mainfrom
Marukome0743:pr11641
Closed

Marukome0743 wants to merge 1 commit into
jdx:mainfrom
Marukome0743:pr11641

Conversation

@Marukome0743

@Marukome0743 Marukome0743 commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Restore the documented legacy rtx executable symlink compatibility by recognizing rtx and platform-suffixed names such as rtx.exe as mise itself.

The recursive hang described in the original report has since become a bounded invalid-shim error, but the underlying misclassification remained: invoking a symlink named rtx still entered tool-shim dispatch instead of running the mise CLI.

Changes

  • Treat rtx and rtx.* as mise executable names in the shared shim-detection predicate.
  • Keep names such as rtx-tiny available for normal tool shim dispatch.
  • Add an end-to-end test using a real rtx symlink that covers --version, activate bash, and reshim.
  • Add unit coverage for Unix and platform-suffixed legacy names.

This aligns runtime behavior with the existing migration documentation, which recommends symlinking rtx to mise while transitioning existing shell setup.

Validation

  • mise exec -- cargo test --all-features env::tests::test_is_mise_binary_includes_legacy_rtx_name
  • mise run test:e2e e2e/cli/test_rtx_compat_symlink
  • mise run test:e2e e2e/plugins/test_tiny_shim e2e/cli/test_system_shims_no_recursion e2e/cli/test_reshim_with_shims_on_path
  • mise exec -- cargo check --all-features
  • mise exec -- cargo clippy --workspace --all-features --all-targets -- -D warnings
  • mise exec -- cargo fmt --all
  • mise exec -- shfmt -w e2e/cli/test_rtx_compat_symlink
  • mise exec -- shellcheck e2e/cli/test_rtx_compat_symlink

mise run format and mise run lint could not start because hk does not recognize this Sapling working copy as a Git repository; the applicable formatting, shell, compilation, Clippy, unit, and E2E checks above passed individually.

Addresses #3223

AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable.

Summary by CodeRabbit

  • New Features

    • Added compatibility for the legacy rtx executable name, including version reporting, shell activation, and reshim support.
    • Recognizes rtx and related executable variants while continuing to support existing mise names.
  • Tests

    • Added end-to-end and validation coverage for legacy executable compatibility and shim-name handling.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change recognizes legacy rtx executable names as mise binaries. It adds unit tests for name classification and an end-to-end test for rtx symlink behavior.

Changes

rtx compatibility

Layer / File(s) Summary
Legacy binary detection and unit coverage
src/env.rs
is_mise_binary accepts rtx and rtx.* names. Tests preserve exclusions for shim names and node.
rtx symlink end-to-end validation
e2e/cli/test_rtx_compat_symlink
The test creates an rtx symlink to mise and checks version output, Bash activation output, and reshim.
Estimated code review effort: 2 (Simple) ~10 minutes

Possibly related PRs

  • jdx/mise#11277: Both changes modify executable-name and shim-detection logic in src/env.rs.

Suggested reviewers: jambalaya56562, jdx, risu729

Poem

A rabbit hops past rtx in disguise,
The mise path opens before its eyes.
Version prints clear, activation springs,
reshim completes on symlink wings.
Compatibility now quietly sings.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: recognizing the legacy rtx executable name in shim handling.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR recognizes the legacy rtx executable name as mise itself instead of treating it as a tool shim.

  • Extends executable-name classification to rtx and extension variants such as rtx.exe and rtx.cmd.
  • Adds unit coverage for accepted legacy names and excluded shim names.
  • Adds an end-to-end test covering version, shell activation, and reshim through an rtx symlink.

Confidence Score: 5/5

The PR appears safe to merge, with the documented legacy symlink path correctly classified and covered by unit and end-to-end tests.

The bare rtx alias and platform extension variants now avoid shim dispatch, while the test harness discovers the new test without requiring executable permissions and runs it in an isolated working directory.

Important Files Changed

Filename Overview
src/env.rs Extends main-binary detection to the documented legacy rtx alias and adds focused positive and negative unit cases.
e2e/cli/test_rtx_compat_symlink Adds an isolated compatibility test confirming that an rtx symlink invokes mise correctly for version, activation, and reshim operations.

Reviews (1): Last reviewed commit: "fix(shim): recognize legacy rtx executab..." | Re-trigger Greptile

@jdx jdx closed this Aug 2, 2026
@jdx

jdx commented Aug 2, 2026

Copy link
Copy Markdown
Owner

we don't need this

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