Match the retired mise tool exactly in the global listing

Whether the environment mise built is gone was read by searching the global listing for the prefix `"pipx:hermes-agent`, so a tool that merely starts the same way, `pipx:hermes-agent-tools` say, read as the retired one still requested. Removing the real one changed nothing, the recheck failed again, and the migration stayed pending on every update. The key is matched whole now, with or without its options.

Co-Authored-By: Codex XHigh <noreply@openai.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
committed 2026-09-21 20:42:26 -05:00
1 parent 72608aed85
commit 44b0f2a70f
2 files changed
+12 -1

No files matched your search

+11
View File
@@ -44,6 +44,8 @@ case "$1" in
ls)
if [[ ${OMARCHY_TEST_MISE_BUILT:-0} == 1 && ! -e $OMARCHY_TEST_MISE_LOG.unrequested ]]; then
echo '{"pipx:hermes-agent[extras=all]": [{"version": "latest"}]}'
elif [[ ${OMARCHY_TEST_MISE_SIBLING:-0} == 1 ]]; then
echo '{"pipx:hermes-agent-tools": [{"version": "latest"}]}'
else
echo '{}'
fi
@@ -261,6 +263,15 @@ run_installer --retire-mise || fail "--retire-mise succeeds with nothing of Omar
[[ ! -s $mise_log ]] || fail "--retire-mise asks mise about an environment nothing proves Omarchy's" "$(cat "$mise_log")"
pass "--retire-mise removes the wrapper and the environment it built, and only with proof"
# A global tool whose name merely starts the same way is not the retired one;
# read as it, it could never be removed and the migration would stay pending.
write_legacy_stub "$hermes"
: >"$mise_log"
OMARCHY_TEST_MISE_SIBLING=1 run_installer --retire-mise || fail "--retire-mise succeeds beside a tool named like the retired one" "$(cat "$test_tmp/output")"
[[ ! -e $hermes ]] || fail "the wrapper goes when only a similarly named tool is requested"
! grep -q '^mise rm' "$mise_log" || fail "a similarly named tool is taken for the retired one" "$(cat "$mise_log")"
pass "a mise tool named like the retired one does not keep the migration pending"
# The shim mise put ahead of ~/.local/bin is what the agent would run until
# the environment goes; it goes with the uninstall, and so does the saved
# wrapper, since once the environment is gone the proof would only keep