Skip to content

Gate git watcher behind auto_watch config (contained indexing)#625

Open
Andy11-cpu wants to merge 2 commits into
DeusData:mainfrom
Andy11-cpu:fix/contained-indexing
Open

Gate git watcher behind auto_watch config (contained indexing)#625
Andy11-cpu wants to merge 2 commits into
DeusData:mainfrom
Andy11-cpu:fix/contained-indexing

Conversation

@Andy11-cpu

@Andy11-cpu Andy11-cpu commented Jun 25, 2026

Copy link
Copy Markdown

Summary

Split from the original bundled PR per review feedback. This PR covers auto_watch only; sibling PRs handle the other changes:

This PR

  • Add auto_watch config (default false)
  • Do not register the git watcher on MCP initialize unless auto_watch is enabled
  • Re-index only via index_repository, or when auto_watch is turned on after a manual index
  • index_repository registers the watcher only when auto_watch is enabled

Motivation

On multi-project setups, registering the git watcher on every MCP connect caused background re-index storms even when auto_index was false.

Test plan

  • cli_config_get_bool covers auto_watch default false
  • mcp_auto_watch_disabled_skips_watcher_on_connect in test_mcp.c
  • make -f Makefile.cbm test passes (CI)
  • MCP connect with existing index: watcher.skip (not watcher.watch) when auto_watch=false

Signed-off-by: Andy11-cpu canada11@duck.com

@Andy11-cpu Andy11-cpu force-pushed the fix/contained-indexing branch 3 times, most recently from f6fc7cd to 3450263 Compare June 25, 2026 17:52
@Andy11-cpu Andy11-cpu marked this pull request as draft June 26, 2026 07:27
@Andy11-cpu Andy11-cpu marked this pull request as ready for review June 26, 2026 07:37
@Andy11-cpu Andy11-cpu marked this pull request as draft June 26, 2026 07:41
@Andy11-cpu Andy11-cpu marked this pull request as ready for review June 26, 2026 07:43
@DeusData

Copy link
Copy Markdown
Owner

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.

@DeusData DeusData added enhancement New feature or request stability/performance Server crashes, OOM, hangs, high CPU/memory ux/behavior Display bugs, docs, adoption UX priority/normal Standard review queue; useful PR with ordinary maintainer urgency. labels Jun 29, 2026
@DeusData

DeusData commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Thanks. This bundles several independent behavior changes: auto_watch, project deduplication, RAM tiering, and hook opt-in defaults. Please split these or link focused tracking issues for each. Also please remove generated/co-author/session attribution trailers from non-merge commits. Because this changes MCP initialization/watchers and install defaults, each behavior needs focused tests and CI evidence.

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>
@Andy11-cpu Andy11-cpu changed the title Contained indexing: manual re-index only, dedup projects, lower RAM on 16GB Gate git watcher behind auto_watch config (contained indexing) Jul 2, 2026
@Andy11-cpu Andy11-cpu force-pushed the fix/contained-indexing branch from 444863f to fae93c3 Compare July 2, 2026 01:57
@Andy11-cpu Andy11-cpu requested a review from DeusData as a code owner July 2, 2026 01:57
@Andy11-cpu

Copy link
Copy Markdown
Author

Thanks for the review — addressed all three points:

1. Split into focused PRs

2. Removed co-author / session attribution trailers
Non-merge commits now have a single Signed-off-by line only (no Co-authored-by: Cursor).

3. Focused tests per behavior

CI should run on each PR independently. Happy to adjust merge order if you prefer a different stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority/normal Standard review queue; useful PR with ordinary maintainer urgency. stability/performance Server crashes, OOM, hangs, high CPU/memory ux/behavior Display bugs, docs, adoption UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants