-
Notifications
You must be signed in to change notification settings - Fork 155
feat: add context-aware wiki link resolution with source_path support #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add source_path parameter to resolve_link() for context-aware wiki link resolution. When a source file path is provided, the resolver now: 1. Tries relative path resolution first for paths containing "/" - [[nested/deep-note]] from testing/link-test.md → testing/nested/deep-note.md 2. Uses proximity-based resolution for duplicate titles - Prefers notes in same folder, then parent folders, then elsewhere - Breaks ties by shortest absolute path 3. Supports strict mode (no fuzzy search fallback) for wiki links Also updates EntityResolveRequest schema with source_path field and modifies get_by_title() to return results ordered by shortest path. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @groksrc's task in 1m 31s —— View job PR Review: Context-Aware Wiki Link ResolutionReviewed this PR against the Basic Memory team checklist. Overall this is a solid enhancement with excellent test coverage. Found a few areas for improvement related to Windows compatibility and code documentation. Code Quality & Standards ✅
Issues found: Testing & Documentation
|
Address PR review feedback: - Document that all paths are stored as POSIX strings for cross-platform compatibility - Add decision point comments to _find_closest_entity() explaining: - Why same-folder matches get priority 0 (most contextually relevant) - Why ancestors get priority 1-N (shared parent context) - Why descendants get priority 100+N (less contextually relevant) - Why unrelated paths get priority 1000 (minimal contextual relevance) - Enhance docstring with proximity scoring algorithm documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @groksrc's task in 1m 58s —— View job PR Review: Context-Aware Wiki Link ResolutionReviewing this PR against the Basic Memory team checklist. Todo List:
Code Quality & Standards ✅
Findings: All standards met. Code quality is excellent. Testing & Documentation ✅
Findings: Testing and documentation are exemplary. The recent commit addressed all previous review feedback. Basic Memory Architecture ✅
Findings: Architecture principles fully respected. Security & Performance ✅
Findings: No security issues. Performance optimizations are sound. Compatibility ✅
Findings: Windows compatibility concerns from previous review have been fully addressed with documentation. Previous Review Comments ✅The most recent commit (
SummaryVerdict: APPROVED ✅ This is high-quality work that significantly improves wiki link resolution with excellent test coverage and documentation. All previous review feedback has been addressed. Strengths:
Changes Made:
No additional changes needed. This PR is ready to merge. |
The hardcoded strict=True was breaking case-insensitive title lookups since it disabled the fuzzy search fallback. Now strict defaults to False (preserving existing behavior) and can be explicitly set to True when needed (e.g., for wiki link resolution in the cloud). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @groksrc's task in 2m 9s —— View job PR Review: Context-Aware Wiki Link ResolutionReviewing this PR against the Basic Memory team checklist. This PR adds context-aware wiki link resolution with Todo List:
Code Quality & Standards ✅
Findings: All standards met. Code quality is excellent with proper separation of concerns. Testing & Documentation ✅
Findings: Testing and documentation are exemplary. The PR demonstrates excellent attention to edge cases and follows literate programming principles. Basic Memory Architecture ✅
Findings: Architecture principles fully respected. The feature integrates cleanly with existing patterns. Security & Performance ✅
Findings: No security issues. Performance optimizations are sound and leverage database-level operations. Compatibility ✅
Findings: Windows compatibility properly addressed with POSIX path documentation. No emoji/unicode issues. Additional ObservationsStrengths ✨
Code Architecture Highlights
SummaryVerdict: APPROVED ✅ This PR is high-quality work that significantly enhances wiki link resolution. All checklist items are satisfied, and previous review feedback has been fully addressed. Changes Implemented
Test Coverage Summary
No Issues FoundAll previous review comments have been addressed:
This PR is ready to merge. 🚀 |
Summary
source_pathparameter toresolve_link()for context-aware wiki link resolution[[nested/deep-note]]fromtesting/link-test.md→testing/nested/deep-note.mdget_by_title()to return results ordered by shortest path firstChanges
link_resolver.py: Addedsource_pathparameter and_find_closest_entity()methodknowledge_router.py: Passsource_pathandstrict=Trueto resolve endpointentity.py: Addedsource_pathfield toEntityResolveRequestschemaentity_repository.py: Orderget_by_title()results by path lengthTest plan
🤖 Generated with Claude Code