Feature/multi source#4
Conversation
- source add <name> <path|url> - source list with awk parsing - JSON store at ~/.config/git-mem/sources.json - KISS: no jq dependency
- Multi-source search walks all enabled sources - Process substitution preserves raw_results variable - enable/disable toggle with awk (no jq) - Fixed awk regex (space not \s) - Tested: hermes-base + team sources
- Use cases: Hermes base, team sharing, work/personal - Commands reference - Architecture diagram - Edge case test results - Clean test suite instructions - 200 LOC, no jq dependency
Handle scp-style SSH remotes correctly in `git-mem source add`
|
@copilot please review and insure this is ready for main. I have been using it for 2-3 weeks now and did not see issues, but only set and forgot about it so. |
There was a problem hiding this comment.
Pull request overview
This PR adds multi-source (federated) memory search to git-mem, enabling users/agents to search a primary memory store plus additional read-only “source” repos without merging them into one repo.
Changes:
- Add
git-mem sourcesubcommands (add/list/enable/disable/remove/sync) and updatesearchto query enabled sources with source attribution (includingsearch --json). - Add a dedicated multi-source test suite and update existing tests for revised commit-count expectations.
- Expand documentation to describe multi-source usage and configuration.
Reviewed changes
Copilot reviewed 9 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
git-mem |
Implements federated search across sources and adds source management commands. |
tests/test-source.sh |
New end-to-end suite covering source lifecycle + multi-source search attribution. |
tests/test-basic.sh |
Updates commit-count expectations to include init/meta commit. |
tests/test-sync.sh |
Updates sync commit-count expectations to include init/meta commit. |
README.md |
Documents multi-source feature and updates command/config sections. |
MULTI-SOURCE.md |
Adds standalone multi-source documentation and design explanation. |
SKILL.md |
Updates skill docs to mention sources and new env var. |
docs/roadmap.md |
Marks multi-source work as done and updates test suite counts. |
docs/UBIQUITOUS_LANGUAGE.md |
Formatting-only adjustments (content unchanged). |
docs/benchmark.md |
Formatting-only adjustments (content unchanged). |
.gitattributes |
Enforces LF endings for shell scripts and git-mem for cross-platform safety. |
.gitignore |
Formatting-only adjustment. |
LICENSE |
Formatting-only adjustment. |
Comments suppressed due to low confidence (2)
git-mem:865
count_memoriesonly recognizes repos with a.gitdirectory. This disagrees withiter_sources(which accepts a.gitfile too), and will report 0 entries for valid worktree-style repos.
[[ ! -d "$path/.git" ]] && echo "0" && return
README.md:38
- The on-disk layout diagram currently claims
memory-store/contains only.git/and "(no other files)", butgit-mem initwrites and commits aREADME.mdinto the store. Update the diagram so it matches actual behavior.
memory-store/
└── .git/ ← the ENTIRE memory store lives here
(no other files)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…emories, and source add
Addressed the two reviewer findings and the code looks good to merge:
All 7 test suites pass. Commit: |
Enables multi source memories to be referenced on search.
This avoids lumping all memories into the same repo (work, personal, AI bot, learnings index)