Exercise selected AI ports against the 4.0.2 baseline
Keep provisioning tests isolated from application refresh and link the real command-presence helper into the Hermes remover fixture. Cover only selected AI menu/scaffold additions, retained default agents and Dictation placement, and new-user/migration mise pruning parity. (cherry picked from commit 1bd969eb386169e107d0b9f15be4b3e1d2a9b4cb)
This commit is contained in:
1 parent
256bfeaa75
commit
461cbe9b9c
3 files changed
+93
-10
No files matched your search
@@ -15,25 +15,48 @@ for command in xdg-user-dirs-update xdg-settings xdg-mime; do
|
||||
done
|
||||
chmod +x "$mock_bin"/*
|
||||
|
||||
# Provisioning prepends $OMARCHY_PATH/bin, which shadows a mock for anything
|
||||
# Omarchy ships, so the install suite is stubbed out at its path instead. The
|
||||
# real one rethemes the session it runs in: hyprctl reload against the live
|
||||
# compositor, gsettings against the live desktop, and a global Node install.
|
||||
mkdir -p "$test_tmp/install/user"
|
||||
# Isolate both setup leaves and application refresh. Refresh also invokes the
|
||||
# mise leaf through OMARCHY_PATH, independently of OMARCHY_INSTALL.
|
||||
fixture="$test_tmp/omarchy"
|
||||
mkdir -p "$fixture/bin" "$test_tmp/install/user"
|
||||
cp "$ROOT/bin/omarchy-provision-user" "$ROOT/bin/omarchy-done" "$fixture/bin/"
|
||||
ln -s "$ROOT/default" "$fixture/default"
|
||||
printf '#!/bin/bash\nexit 0\n' >"$fixture/bin/omarchy-refresh-applications"
|
||||
chmod +x "$fixture/bin/omarchy-refresh-applications"
|
||||
: >"$test_tmp/install/user/all.sh"
|
||||
|
||||
HOME="$test_tmp/home" PATH="$mock_bin:$ROOT/bin:$PATH" OMARCHY_PATH="$ROOT" \
|
||||
OMARCHY_INSTALL="$test_tmp/install" bash "$ROOT/bin/omarchy-provision-user" >/dev/null ||
|
||||
fail "omarchy-provision-user finishes"
|
||||
provision() {
|
||||
HOME="$test_tmp/home" PATH="$mock_bin:$fixture/bin:$PATH" OMARCHY_PATH="$fixture" \
|
||||
OMARCHY_INSTALL="$test_tmp/install" bash "$fixture/bin/omarchy-provision-user" "$@" >/dev/null ||
|
||||
fail "omarchy-provision-user finishes"
|
||||
}
|
||||
provision
|
||||
|
||||
for skill in omarchy diagnose-crash; do
|
||||
link="$test_tmp/home/.hermes/skills/$skill"
|
||||
[[ -L $link && $(readlink "$link") == "$ROOT/default/agents/skills/$skill" ]] ||
|
||||
[[ -L $link && $(readlink "$link") == "$fixture/default/agents/skills/$skill" ]] ||
|
||||
fail "omarchy-provision-user provisions the $skill skill for Hermes"
|
||||
|
||||
link="$test_tmp/home/.hermes/profiles/james/skills/$skill"
|
||||
[[ -L $link && $(readlink "$link") == "$ROOT/default/agents/skills/$skill" ]] ||
|
||||
[[ -L $link && $(readlink "$link") == "$fixture/default/agents/skills/$skill" ]] ||
|
||||
fail "omarchy-provision-user provisions the $skill skill for a Hermes profile"
|
||||
done
|
||||
|
||||
pass "omarchy-provision-user provisions Hermes skills"
|
||||
|
||||
provision --force
|
||||
for skill in omarchy diagnose-crash; do
|
||||
for directory in .agents/skills .claude/skills .codex/skills .pi/agent/skills .hermes/skills .hermes/profiles/james/skills; do
|
||||
link="$test_tmp/home/$directory/$skill"
|
||||
[[ -L $link && $(readlink "$link") == "$fixture/default/agents/skills/$skill" ]] ||
|
||||
fail "forced provisioning keeps baseline and Hermes skill links idempotent"
|
||||
done
|
||||
done
|
||||
pass "forced provisioning keeps baseline and Hermes skill links idempotent"
|
||||
|
||||
rm -rf "$test_tmp/home"
|
||||
mkdir -p "$test_tmp/home"
|
||||
provision
|
||||
[[ ! -e $test_tmp/home/.hermes/profiles ]] || fail "provisioning does not invent Hermes profiles"
|
||||
[[ ! -e $test_tmp/home/.gemini ]] || fail "Hermes provisioning does not add unrelated Antigravity setup"
|
||||
pass "provisioning without existing profiles adds only the Hermes default skill home"
|
||||
Reference in new issue
Block a user