fix(tests): exclude .claude/worktrees/ from test-file discovery

find-based discovery in run-bats.sh and run-tests.sh picked up test
files nested inside on-disk git worktree checkouts under
.claude/worktrees/ (untracked, created by background agent isolation),
whose submodule-based test_helper isn't initialized there — causing
spurious pre-push failures unrelated to any real change.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Defame1297andClaude Sonnet 5 committed 2026-07-05 13:57:46 +00:00
1 parent ad5d61430c
commit fddf39e396
2 files changed
+2

No files matched your search

+1
View File
@@ -20,6 +20,7 @@ mapfile -t TEST_FILES < <(
find "$REPO_ROOT" -name "*.bats" \
-not -path "*/tests/bats/*" \
-not -path "*/test_helper/*" \
-not -path "*/.claude/worktrees/*" \
| sort
)
+1
View File
@@ -33,6 +33,7 @@ run_bats
mapfile -t SCRIPTS < <(
find "$SEARCH_ROOT" -name "test-*.sh" \
-not -path "*/.git/*" \
-not -path "*/.claude/worktrees/*" \
| sort
)