Conversation
…iles `location` was `files[0]`. git lists changed paths sorted and `.projectmem/` sorts ahead of most paths, while summary.md is regenerated on every event, so most auto-captured commits were located at `.projectmem/summary.md`. The staleness check then counted every later commit to summary.md against them and flagged nearly all as possibly stale. The location now skips paths under `.projectmem/`; a commit that touches only memory files gets no location. `files` is unchanged. Fixes riponcm#20
This was referenced Sep 30, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
|
Thanks Rohan, good catch, and confirmed: the new tests fail on main and pass with your change. I'll merge this in the next update, planned for this Sunday. And yes, a follow-up for the first-commit |
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.
Fixes #20.
Auto-captured commits used
files[0]as theirlocation. git lists changed paths sorted,.projectmem/sorts ahead of most paths, andsummary.mdis regenerated on every event, so most commits were located at.projectmem/summary.md. The staleness check then counted every later commit tosummary.mdagainst those events and flagged nearly all of them as possibly stale.Change:
commands/auto_capture.pynow picks the first changed path outside.projectmem/as the location. A commit that touches only memory files gets no location, so it is never flagged againstsummary.mdeither.filesis unchanged: the event still lists every path the commit touched.Tests: new
tests/test_auto_capture.pymakes a real git repo and runs_capture_commitagainst it:.projectmem/summary.mdandsrc/login.pyis located atsrc/login.py, and itsfilesstill includesummary.md;.projectmem/summary.mdhas no location.Both tests fail on
mainand pass with this change.Verification (Windows 11, Python 3.12):
mainwithout this change (test_global_mcp.py×3,test_init_ux.py::test_print_mcp_config_single_project_still_pins_the_root), so they're pre-existing on Windows and unrelated. The two MCP stdio tests intest_mcp_server.pytime out intermittently on this machine on bothmainand this branch.ruff check: no new findings.auto_capture.pyreports the same 9 as onmain;tests/test_auto_capture.pyis clean.main.Notes:
.projectmem/files will persist.git diff-treewithout--rootlists no files for a repo's first commit, so that commit is captured with no files. Happy to send a follow-up if that's wanted.