Gate git watcher behind auto_watch config (contained indexing)#625
Gate git watcher behind auto_watch config (contained indexing)#625Andy11-cpu wants to merge 2 commits into
Conversation
f6fc7cd to
3450263
Compare
|
Huge thanks for opening this PR and for the work you put into it. The maintainer shop is currently full, so this may sit for a bit before it gets a proper review. We will come back to this as soon as possible with real feedback; I wanted to make sure it did not sit unacknowledged in the meantime. |
|
Thanks. This bundles several independent behavior changes: |
Reuse an existing cached project when the same repository is opened from a different path. Match by git canonical root or canonical filesystem path so duplicate .db files are not created. Signed-off-by: Andy11-cpu <canada11@duck.com>
Do not register the git watcher on MCP initialize unless auto_watch is explicitly enabled (default false). Re-index on connect only when auto_index is set; ongoing git polling requires auto_watch after a manual index. Signed-off-by: Andy11-cpu <canada11@duck.com>
444863f to
fae93c3
Compare
|
Thanks for the review — addressed all three points: 1. Split into focused PRs
2. Removed co-author / session attribution trailers 3. Focused tests per behavior
CI should run on each PR independently. Happy to adjust merge order if you prefer a different stack. |
Summary
Split from the original bundled PR per review feedback. This PR covers auto_watch only; sibling PRs handle the other changes:
--hooks)This PR
auto_watchconfig (default false)initializeunlessauto_watchis enabledindex_repository, or whenauto_watchis turned on after a manual indexindex_repositoryregisters the watcher only whenauto_watchis enabledMotivation
On multi-project setups, registering the git watcher on every MCP connect caused background re-index storms even when
auto_indexwas false.Test plan
cli_config_get_boolcoversauto_watchdefault falsemcp_auto_watch_disabled_skips_watcher_on_connectintest_mcp.cmake -f Makefile.cbm testpasses (CI)watcher.skip(notwatcher.watch) whenauto_watch=falseSigned-off-by: Andy11-cpu canada11@duck.com