test: cover hidden files in optimized and fallback source globs - #2918
test: cover hidden files in optimized and fallback source globs#2918Napolitain wants to merge 1 commit into
Conversation
|
The behavior choice I would like input on is whether My preference is to include them. A leading dot does not mean that a file is The draft is intentionally red and keeps production code unchanged while that |
|
@andreynering hey, note that the tests fail on purpose. While I am in favor of matching dotfiles via |
|
I do believe this problem is solved with usage of |
Related to #2917.
This draft adds tests for recursive source globbing and fingerprint caching
through both the optimized and fallback paths.
add tests for :
**fallback patterns;
The tests propose that source globs include hidden entries consistently. They
currently demonstrate the mismatch on
main: optimized cases pass, whilefallback inclusions omit hidden inputs and fallback exclusions fail to remove
hidden inputs found by an optimized inclusion.
This PR intentionally changes no production behavior and is not merge-ready.
It is a tests-only draft intended to make the inconsistency and its cache impact
concrete while we decide between preserving the historical shell behavior or
adopting consistent hidden-entry inclusion.
Validation:
golangci-lint runpasses with no issues.go test ./internal/fsext -count=1passes.go test ./... -count=1fails intentionally only in the new fallbackexpectations under
internal/fingerprint.DotGlobtemporarily makes the new fingerprint and filesystem testspass; that production change is deliberately not included here.
AI assistance: I used Codex to help develop and validate these tests. I reviewed
and understand the changes.