Repository navigation
Conversation
When mise shims sat after ~/.local/bin on PATH, `mise x` did not reorder PATH, so a generated wrapper resolved `<bin>` back to itself and exec'd in a loop forever. `mise which --tool` returns the real install path, so exec that instead. Fixes omacom#13040. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Automated AI review
Verified: the new wrapper form stops the self-exec loop from #13040 for newly generated wrappers. Two gaps remain: wrappers already installed on user machines are not upgraded, and two existing shell tests still assert the old exec line. A third, narrower behavior change is noted below. Packaged mise binary (offline, synthetic Verified in the same setup and in mise source (2026.9.4 run; lookup logic unchanged through 2026.9.12):
Existing wrappers keep the looping exec lineThe PR changes only the generator. Nothing regenerates wrappers already in A wrapper written by the current generator was byte-identical after running both migrations at the PR head. Impact: the machines that hit the loop in #13040 (for example Suggested change: add a migration that regenerates wrappers exactly matching the current form ( Two existing shell tests still assert the old exec lineTest-suite only, not a production defect. Both pass at base and fail at head:
In Suggested change: have the A project-pinned version that is not installed now stops the wrapperNarrow behavior change. Observed offline for head; for base, the install attempt was observed and online success is inferred from mise source. Impact: running a wrapped CLI from a project that pins the same tool through mise at a version not yet installed (for example Suggested change: either accept and document this, or retry after Optional test improvement: the updated Related, outside this diff: the Hermes CLI wrapper written by Review informationTest scope: Pinned head AI process: Opus 5.5 Medium coordination and synthesis; independent Opus 5.5 Xhigh and GPT 6 Sol Xhigh technical assessments, with claims cross-checked against source and sealed isolated runs; Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
|
Thanks, this was a thorough one. In b0ebcec:
|
Automated AI review
Follow-up on Verified: the new migration upgrades existing wrappers, and both previously failing tests pass. One newly found, narrow behavior difference in the
Verified in isolated runs with the real generator and a logging stub
|
When ~/.local/bin precedes mise shims, mise x -- <bin> re-enters the wrapper forever. Resolve with mise which --tool and exec that path (omacom#13090). Co-authored-by: AnPod <[email protected]>
|
Reviewed by Claude Opus 5.5, with Codex Medium as a separate second opinion. I did not run this on a worker, because another open pull request fixes the same loop in a way we think is better, and verifying a fix that will not be merged would not help anyone. Competing fixes. Four other open pull requests change the same generator line to stop the self-exec loop in #13040: #8692, #13677, #13614 and #13769. We compared all five diffs. Both reviewers picked #8692 on their own. Why #8692 over this one. This pull request resolves the binary with What this pull request adds is worth keeping, whichever fix lands: the migration and the updated What happens next. Choosing between the competing fixes is up to the maintainer, so this one is waiting on them. You don't need to do anything for now. |
|
Thank you for this, @surim0n. #8692 got there first with a fix for the same problem, so this is closed in favour of it, and the credit stays with the first fix. If it does not cover your case, please say so there. Closed at the maintainer's request. The review comment above has the details; it was done by Claude Opus 5.5 with Codex Medium as a second opinion, whose agreement is not independent. |
Fixes #13040.
When a generated mise wrapper ran under a PATH that had
~/.local/binbeforemise's shims,
mise xleft PATH order untouched and the wrapper resolved<bin>back to itself, exec'ing forever in the same PID.mise which --tool <package> <bin>resolves the real install pathTested:
test/shell.d/mise-install-test.shverifies the wrapper callsmise whichand execs the returned absolute path
Generated with Devin