Repository navigation
fix(rag): index explicitly configured directory symlinks - #23
Merged
Merged
Conversation
Owner
|
Thanks — real bug, minimal fix; |
This was referenced Nov 16, 2026
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.
Replacing an indexed directory such as
docswith a symbolic link to the same files currently makes discovery return no documents. Indexing then silently prunes their previous records.os.Statfollows the configured link, butfilepath.WalkDirdoes not traverse it.Walk the explicitly configured directory through
fs.WalkDir(os.DirFS(...), ".", ...)and map entries back to their logical configured paths. Document IDs and exclusions remain stable. Nested directory links remain untraversed to avoid cycles; the individual-file path is unchanged.Validation: regression tests fail on the unmodified base and pass with this fix. They cover relative/absolute configured links, retained search results after replacement, newly added files, logical excludes, nested external links, and cycles. Local
make test vet evalandgo test -race ./internal/ragpassed. Two independent code reviews and a documentation consistency review found no introduced issues. All five Linux/macOS checks passed in fork CI.This PR is independent of #21 (discovery failures) and #22 (Ollama model selection).
An additional local live-model regression run combined this fix with #21 and #22: 74 documents / 1,436 vector chunks stayed unchanged after replacing the configured directories with links, and all 50 bilingual queries retained identical ranked paths. The private corpus is not included in this PR.
Updated against upstream 0.18.0 by merging
main, preserving the published branch history. The feature patch is unchanged; the changelog conflict is resolved. The linked fork checks passed on this updated head.