Repository navigation
fix: pass file filters to the wiki structure step by keyword - #627
Closed
yeonjin-roh wants to merge 1 commit into
Closed
yeonjin-roh wants to merge 1 commit into
yeonjin-roh wants to merge 1 commit into
Conversation
_determine_structure called read_repo_file_tree with the filters in (excluded_dirs, excluded_files, included_dirs, included_files) order, but the function takes (included_files, included_dirs, excluded_files, excluded_dirs). Exclusions were applied as inclusions and vice versa when building the file tree sent to the LLM. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Problem
_determine_structure(api/services/wiki/tasks.py) passes the file filters toread_repo_file_treepositionally:but the signature is:
So when building the file tree sent to the LLM for the wiki structure,
excluded_dirsis treated asincluded_files,included_filesasexcluded_dirs, and so on. For example, excludingnode_modulesputs the structure step into inclusion mode, and the LLM only sees files matching that pattern. Indexing and page generation are not affected; they get the filters by keyword throughChatCompletionRequest.Fix
Pass the filters by keyword.
Test
Added
test_determine_structure_passes_file_filters, which checks that each filter reachesread_repo_file_treeunder the right name. It fails before the fix and passes after.pytest tests/backend: 54 passed.Not related to #593, which changes how the filters are matched in
api/config.py.🤖 Generated with Claude Code