From 758e9eccc30b247ca2bb521f5b90457339c73b1b Mon Sep 17 00:00:00 2001 From: Daniel Nouri Date: Sun, 8 Mar 2026 21:33:13 +0100 Subject: [PATCH] fix(coding-agent): update Anthropic compaction model and HTTPS package test (#1960) * fix(coding-agent): use supported Anthropic compaction model The Anthropic compaction test was pinned to claude-3-7-sonnet-latest, which now fails with a 404 because that model line was retired. Switch the test to the existing claude-sonnet-4-5 convention used elsewhere in coding-agent tests. * test(coding-agent): disable git prompts in HTTPS parsing test The HTTPS URL parsing test intentionally clones a nonexistent GitHub repo to verify that bare HTTPS sources dispatch to git. Under a TTY, git can prompt on that path and hang the test run. Set GIT_TERMINAL_PROMPT=0 in that test so it still exercises real git but fails fast instead of waiting for terminal input. --- .../test/compaction-thinking-model.test.ts | 4 ++-- .../coding-agent/test/package-manager.test.ts | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/coding-agent/test/compaction-thinking-model.test.ts b/packages/coding-agent/test/compaction-thinking-model.test.ts index ea679cfe..0f9edb98 100644 --- a/packages/coding-agent/test/compaction-thinking-model.test.ts +++ b/packages/coding-agent/test/compaction-thinking-model.test.ts @@ -193,8 +193,8 @@ describe.skipIf(!HAS_ANTHROPIC_AUTH)("Compaction with thinking models (Anthropic return session; } - it("should compact successfully with claude-3-7-sonnet and thinking level high", async () => { - const model = getModel("anthropic", "claude-3-7-sonnet-latest")!; + it("should compact successfully with claude-sonnet-4-5 and thinking level high", async () => { + const model = getModel("anthropic", "claude-sonnet-4-5")!; createSession(model, "high"); // Send a simple prompt diff --git a/packages/coding-agent/test/package-manager.test.ts b/packages/coding-agent/test/package-manager.test.ts index 91ec5955..a15e6c8d 100644 --- a/packages/coding-agent/test/package-manager.test.ts +++ b/packages/coding-agent/test/package-manager.test.ts @@ -373,12 +373,22 @@ Content`, it("should recognize github URLs without git: prefix", async () => { const events: ProgressEvent[] = []; packageManager.setProgressCallback((event) => events.push(event)); + const previousGitTerminalPrompt = process.env.GIT_TERMINAL_PROMPT; + process.env.GIT_TERMINAL_PROMPT = "0"; - // This should be parsed as a git source, not throw "unsupported" try { - await packageManager.install("https://github.com/nonexistent/repo"); - } catch { - // Expected to fail - repo doesn't exist + // This should be parsed as a git source, not throw "unsupported" + try { + await packageManager.install("https://github.com/nonexistent/repo"); + } catch { + // Expected to fail - repo doesn't exist + } + } finally { + if (previousGitTerminalPrompt === undefined) { + delete process.env.GIT_TERMINAL_PROMPT; + } else { + process.env.GIT_TERMINAL_PROMPT = previousGitTerminalPrompt; + } } // Should have attempted clone, not thrown unsupported error