Keep make test from collecting tests in nested checkouts #82

Merged
clawbot merged 1 commits from issue-25-vitest-exclude into next2 2026-09-23 02:18:32 +02:00
Collaborator

Fixes #25.

vitest does not read .gitignore when it looks for tests, so a checkout nested under .claude/ had its whole test/ tree run as part of this suite, and the run still passed. The new vitest.config.ts keeps vitest's default excludes and adds .claude/**.

test/packaging/nested-checkout.test.ts makes a temp directory holding test/real.test.ts and .claude/worktrees/other/test/real.test.ts, asks vitest (with this repo's config) which test files it would run, and expects only the first. With .claude/** removed from the config, this test fails and lists the nested file.

Counts from make test with a full clone of next2 placed at .claude/worktrees/probe: before 78 files / 886 tests; after 40 files / 444 tests (the real suite, including the new test).

Lint and format checks were already safe (see the issue comments), so they are unchanged.

Judgement call: .claude/** is the only extra exclude. No other .gitignore entry is a place where a checkout would live, and vitest's defaults already cover node_modules and dist.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/quak/issues/25. vitest does not read `.gitignore` when it looks for tests, so a checkout nested under `.claude/` had its whole `test/` tree run as part of this suite, and the run still passed. The new `vitest.config.ts` keeps vitest's default excludes and adds `.claude/**`. `test/packaging/nested-checkout.test.ts` makes a temp directory holding `test/real.test.ts` and `.claude/worktrees/other/test/real.test.ts`, asks vitest (with this repo's config) which test files it would run, and expects only the first. With `.claude/**` removed from the config, this test fails and lists the nested file. Counts from `make test` with a full clone of `next2` placed at `.claude/worktrees/probe`: before 78 files / 886 tests; after 40 files / 444 tests (the real suite, including the new test). Lint and format checks were already safe (see the issue comments), so they are unchanged. Judgement call: `.claude/**` is the only extra exclude. No other `.gitignore` entry is a place where a checkout would live, and vitest's defaults already cover `node_modules` and `dist`. Model: opus-5-5
clawbot added the needs-review label 2026-09-23 01:59:02 +02:00
clawbot self-assigned this 2026-09-23 01:59:02 +02:00
Author
Collaborator

FAIL (needs rebase) on c07a0929 against next2 3871d62.

  • TODO.md, Completed Steps (top of the list): the PR no longer applies to current next2. Its new entry for #25 conflicts with the entry for #9 that has since landed there. Acceptable: rebase onto current next2, keep both entries, and force-push.

Nothing else blocks. With that conflict resolved locally, the change meets the definition of done.

Model: opus-5-5

FAIL (needs rebase) on `c07a0929` against `next2` `3871d62`. - `TODO.md`, Completed Steps (top of the list): the PR no longer applies to current `next2`. Its new entry for https://git.eeqj.de/sneak/quak/issues/25 conflicts with the entry for https://git.eeqj.de/sneak/quak/issues/9 that has since landed there. Acceptable: rebase onto current `next2`, keep both entries, and force-push. Nothing else blocks. With that conflict resolved locally, the change meets the definition of done. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-09-23 02:06:52 +02:00
clawbot added needs-rebase and removed needs-rework labels 2026-09-23 02:08:21 +02:00
clawbot added 1 commit 2026-09-23 02:16:58 +02:00
vitest does not read .gitignore when finding tests, so a checkout nested
under .claude/ had its whole test/ tree run as part of this suite.
vitest.config.ts adds .claude/** to vitest's default excludes. The new
packaging test plants a nested checkout in a temp directory and fails if
vitest, run with this config, would collect it.

Model: opus-5-5
clawbot force-pushed issue-25-vitest-exclude from c07a092900 to 06343337e2 2026-09-23 02:16:58 +02:00 Compare
clawbot added needs-review and removed needs-rebase labels 2026-09-23 02:17:00 +02:00
clawbot merged commit b44c4ba6d7 into next2 2026-09-23 02:18:32 +02:00
clawbot deleted branch issue-25-vitest-exclude 2026-09-23 02:18:32 +02:00
Sign in to join this conversation.