Skip to content

fix(validator): validate untracked-but-not-ignored tool directories#704

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/validate-untracked-tool-dirs
Jul 3, 2026
Merged

fix(validator): validate untracked-but-not-ignored tool directories#704
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/validate-untracked-tool-dirs

Conversation

@potiuk

@potiuk potiuk commented Jul 3, 2026

Copy link
Copy Markdown
Member

What

Improves the git filter in collect_tool_dirs (added in #692), which scopes the tools/ scan to git's view so gitignored artifact directories (e.g. __pycache__, build output) aren't mistaken for tools — but uses tracked files only (git ls-files).

Why

The tracked-only filter silently drops a freshly-authored tool directory that hasn't been git added yet — exactly when a new tool most needs validating. Switch to non-ignored files (git ls-files --cached --others --exclude-standard): untracked-but-not-ignored tool dirs are still checked, while gitignored artifact dirs stay excluded.

Tests

The same change is bundled (in its original tracked-only form) into #693/#694/#695; those will be rebased to drop the duplicate now that this supersedes it on main.

collect_tool_dirs (added in apache#692) filters the tools/ scan through git so
gitignored artifact directories are not treated as tools, but the
tracked-only `git ls-files` filter silently drops a freshly-authored
tool directory that has not been `git add`ed yet — exactly when a new
tool most needs validating. Switch to `git ls-files --cached --others
--exclude-standard` so untracked-but-not-ignored dirs are still checked;
gitignored artifact directories remain excluded. Add a regression test.
@potiuk potiuk force-pushed the fix/validate-untracked-tool-dirs branch from 0e4d094 to 0c1141e Compare July 3, 2026 13:06
@potiuk potiuk merged commit 93eff67 into apache:main Jul 3, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant