Repository navigation
Conversation
|
| [[ $2 == "--tool" && $3 == "npm:example" && $4 == "tool" ]] || exit 91 | ||
| printf '%s\n' "$OMARCHY_MISE_RESOLVED_BIN" | ||
| exit "${OMARCHY_MISE_WHICH_STATUS:-0}" | ||
| ;; |
There was a problem hiding this comment.
The fake mise which --tool returns a preset path, and the fake mise x supplies the runtime variables itself. This checks the wrapper's shell logic, but not whether real mise resolves the requested package and preserves its runtime when given an absolute executable path. These tests can pass even if that lookup or launch fails.
Add an offline test with real mise and a local tool fixture, keeping the wrapper first in PATH.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Added test/shell.d/mise-wrapper-real-test.sh, an offline integration test using real mise and a local asdf plugin plus a linked tool fixture. The test isolates HOME/config/data/cache/state, keeps the generated wrapper first in PATH, bounds each invocation with a timeout, and checks plugin-provided runtime variables plus empty/spaced/literal-glob arguments. It also verifies that real mise's legacy bare-name lookup returns the wrapper itself, reproducing the original failure condition without running a loop. Passed with mise 2026.10.5, alongside the existing resolution and migration regressions. The test skips explicitly if mise is unavailable.
|
This looks good, and it's nicer than #14843. One question: have you tried the new |
|
Note Claude responding on behalf of Matt. A data point for comparing this PR with the PATH-scrubbing variant suggested in #14831. On my machine the wrapper directory enters PATH as P=":$PATH:"; P="${P//:$HOME\/.local\/bin:/:}"; P="${P#:}"; P="${P%:}"
PATH="$P" mise x copilot -- sh -c 'command -v copilot'
# /home/<user>/.local/share/../bin/copilot <- still the wrapperResolving the binary with exec mise x "copilot" -- "$(mise which "copilot" --tool "copilot")" "$@"With the aliased directory first in PATH, |
|
I read this pull request at e8e5010: the diff, #7234, and the open pull requests that touch the same wrapper. I ran nothing on a worker, because the item stops before verification. Its classification is still open: I read it as a bug fix for #7234. The second opinion (Codex Medium) is reachable but did not classify it, because this machine's review budget for today was used up. Without a second classification it gets no label and no verification yet. It will be picked up again on a later pass. It overlaps two open pull requests, so you can weigh them together. #8692 is older and fixes #7234 the same way: the wrapper resolves an absolute path before |
Summary
Fixes #7234.
Omarchy's generated mise wrappers can resolve their bare command name back to themselves when
~/.local/binprecedes mise's shims. On this machine aclaude auth statusprobe remained alive for 18 minutes and consumed sustained CPU. Safe lookup reproduction and environment details: #7234 (comment)mise which --toolafter activation, and execute its absolute path throughmise xto preserve the runtime environment.Related prior proposals include #8692 and #14843. This is another implementation of the existing issue, with migration and focused regression coverage.
Validation
Passed: mise-install-test.sh, mise-wrapper-quiet-migration-test.sh, mise-wrapper-resolution-test.sh, mise-wrapper-resolution-migration-test.sh,
./test/cli, andgit diff --check.The default-agent test's updated wrapper assertions pass, but the suite subsequently fails on an existing Grok migration assertion: the migration uses
mise unuse -y -g, while the assertion expectsunuse -g. The same failure was reproduced on untouched upstream HEAD77bfaca.