From 1cf6d455d7638e27d940c8e0cc7a90c2e04f41be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Mon, 24 Aug 2026 21:00:29 -0400 Subject: [PATCH] AI tests: responses-only codex mock, exercised installer branch Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp --- test/shell.d/omarchycn-ai-test.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/shell.d/omarchycn-ai-test.sh b/test/shell.d/omarchycn-ai-test.sh index 5fe2b1b2..e67ef5ed 100755 --- a/test/shell.d/omarchycn-ai-test.sh +++ b/test/shell.d/omarchycn-ai-test.sh @@ -110,8 +110,6 @@ class H(http.server.BaseHTTPRequestHandler): code = 200 elif self.path == "/responses" and b"input" in body and b"messages" not in body: code = 200 - elif self.path == "/chat/completions" and b"messages" in body: - code = 200 else: code = 404 self.send_response(code) @@ -136,11 +134,18 @@ if OMARCHYCN_AI_TEST_BASE_URL="http://127.0.0.1:$port" omarchy-cn-ai-test good > fi pass "mock regression: 200 pass, 401 fail, responses path exercised" -# ai-default merges into claude settings without clobbering user config +# ai-default merges into claude settings without clobbering user config. +# claude is absent; the install branch must run our omarchy-mise-install stub, +# which "installs" the claude stub and leaves a marker. +cat > "$TEST_HOME/stubs/omarchy-mise-install" < "$TEST_HOME/stubs/claude" chmod +x "$TEST_HOME/stubs/claude" +STUB +chmod +x "$TEST_HOME/stubs/omarchy-mise-install" echo "sk-secret-1" | omarchy-cn-ai-secret set deepseek > /dev/null mkdir -p "$HOME/.claude" printf '{"permissions":{"allow":["Bash"]},"env":{"KEEP":"1"}}' > "$HOME/.claude/settings.json" @@ -150,4 +155,5 @@ omarchy-cn-ai-default good > /dev/null [[ $(jq -r '.env.ANTHROPIC_BASE_URL' "$HOME/.claude/settings.json") == "https://api.deepseek.com/anthropic" ]] || fail "ai-default env written" [[ $(cat "$HOME/.config/omarchy/defaults/agent") == claude ]] || fail "upstream default agent set" [[ $(stat -c %a "$HOME/.claude/settings.json") == 600 ]] || fail "claude settings 0600" +[[ -f $TEST_HOME/installer-ran ]] || fail "missing harness triggered installer" pass "ai-default maps the profile onto the upstream agent entry"