fix(exclude-patterns): enforce exclude_patterns in git indexer and dynamic edges#308
Merged
RaghavChamadiya merged 1 commit intoMay 30, 2026
Conversation
Contributor
Author
|
Part of the #296 exclude_patterns series.
Planned follow-up PRs:
Keeping these separate so each stays focused and easy to review. |
…namic edges exclude_patterns was honored by file traversal but bypassed by the git indexer and by dynamic-edge creation, so excluded files still appeared in git metadata and as phantom graph nodes (issues 1 and 2 of repowise-dev#296). - GitIndexer accepts exclude_patterns and filters them out of `git ls-files`; threaded through _run_git_indexing and the orchestrator git stage (init path). - The incremental update path passes exclude_patterns to GitIndexer and filters changed paths via a new _build_filtered_changed_paths helper. - GraphBuilder accepts exclude_patterns; add_dynamic_edges no longer creates phantom nodes for excluded targets. Threaded into the ingestion phase and the update rebuild path. Tests: GitIndexer ls-files filtering, _build_filtered_changed_paths, and dynamic-edge phantom-node skipping. Closes repowise-dev#296 (issues 1 and 2)
1b30ada to
80d89e1
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Make
exclude_patternsactually exclude files from the git indexer and from dynamic-edge graph construction.Why
exclude_patternswas honored by file traversal but bypassed in two places (issues 1 and 2 of #296):git ls-filesand indexed every tracked file, so excluded paths still produced git metadata (churn, ownership, hotspots).How
GitIndexeracceptsexclude_patternsand filters them out ofgit ls-files. Threaded through_run_git_indexingand the orchestrator's git stage (init path)._rebuild_graph_and_git) passesexclude_patternstoGitIndexerand filters changed paths via a new_build_filtered_changed_pathshelper.GraphBuilderacceptsexclude_patterns;add_dynamic_edgesno longer creates phantom nodes for excluded targets. Threaded into the ingestion pipeline phase and the update rebuild path.All filtering uses
pathspec(gitwildmatch), consistent with how traversal already appliesexclude_patterns.Tests
tests/unit/test_git_indexer.py::TestExcludePatterns:_get_tracked_filesfilters excluded paths and is a no-op without patterns.tests/unit/cli/test_commands.py::TestBuildFilteredChangedPaths: changed-path filtering.tests/unit/ingestion/test_graph.py::TestDynamicEdgeExcludeFilter: excluded dynamic-edge targets do not create phantom nodes; non-excluded targets still do.This change is Python-only and does not touch
packages/web.Closes #296 (issues 1 and 2; the remaining issues 3 and 5 are separate follow-up PRs).