You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This draft adds tests for recursive source globbing and fingerprint caching
through both the optimized and fallback paths.
add tests for :
dotfiles and files below dot-directories;
exact file-set checks for optimized and fallback patterns;
optimized inclusions combined with optimized and fallback exclusions;
nonrecursive, wildcard-root, nested-suffix, brace, and multiple-**
fallback patterns;
source checksum invalidation through both globbing paths; and
individually listed generated outputs, so every missing output is checked.
The tests propose that source globs include hidden entries consistently. They
currently demonstrate the mismatch on main: optimized cases pass, while
fallback 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 run passes with no issues.
go test ./internal/fsext -count=1 passes.
The optimized glob and checksum controls pass.
go test ./... -count=1 fails intentionally only in the new fallback
expectations under internal/fingerprint.
Enabling DotGlob temporarily makes the new fingerprint and filesystem tests
pass; 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.
The behavior choice I would like input on is whether **/* for Task sources
should mean every file below the directory, including hidden entries.
My preference is to include them. A leading dot does not mean that a file is
irrelevant to a task or its cache; a hidden input can still change generated
output. I understand that the more backward-compatible alternative is to make
the optimized path skip hidden entries and preserve the older shell behavior.
The draft is intentionally red and keeps production code unchanged while that
choice is discussed.
@andreynering hey, note that the tests fail on purpose. While I am in favor of matching dotfiles via **/*, that needs to be agreed upon and I can understand if you prefer not doing so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.