From 12ea769844417b30dffba3ec346c2154bf63ab3c Mon Sep 17 00:00:00 2001 From: Jeff Repanich Date: Sat, 12 Sep 2026 06:44:51 -0400 Subject: [PATCH] chore: keep agent worktrees out of git and test discovery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude Code creates git worktrees under .claude/worktrees/. They are full checkouts of the repo, so vitest discovered their copy of every suite alongside the real ones — this repo reported 28 test files where only 6 exist, with the duplicates failing. Exclude them from test discovery and add .claude/ to .gitignore. --- .gitignore | 3 +++ vite.config.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 9415986..f6775ca 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ coverage/ test-results/ artifacts/ tests/visual/*-snapshots/*-darwin.png + +# Local agent state and worktrees +.claude/ diff --git a/vite.config.ts b/vite.config.ts index 168a950..9ad3f9a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,6 +20,9 @@ export default defineConfig({ "tests/production.test.ts", "node_modules/**", "dist/**", + // Agent worktrees are full checkouts of this repo; without this their + // copies of every suite get discovered alongside the real ones. + "**/.claude/**", ], }, build: { manifest: true, sourcemap: "hidden" },