feat: --auto-watch flag to embed watcher inside MCP server process#130
Open
Dhruv-Darji wants to merge 3 commits intotirth8205:mainfrom
Open
feat: --auto-watch flag to embed watcher inside MCP server process#130Dhruv-Darji wants to merge 3 commits intotirth8205:mainfrom
Dhruv-Darji wants to merge 3 commits intotirth8205:mainfrom
Conversation
tirth8205
reviewed
Apr 8, 2026
Owner
tirth8205
left a comment
There was a problem hiding this comment.
Interesting feature — embedding a file watcher inside the MCP server process. This is a significant addition (+657 lines) with PID/lock file management and daemon lifecycle.
A few concerns:
- Cross-platform PID handling needs careful testing (Windows, WSL).
- Lock file cleanup on crash — what happens if the process dies without cleaning up?
- This overlaps with the existing
watchcommand — how do they interact?
Please rebase on latest main and address these questions. We'll give it a thorough review once it's up to date.
00a8c74 to
efdf7f1
Compare
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.
This pull request adds robust offline daemon support and improves the CLI and server integration for the code review graph tool. The main enhancements include a new
daemoncommand for managing a background filesystem watcher, improvedserve/mcpcommand wiring with optional auto-watch, and extensive internal refactoring for process management and status reporting. Comprehensive tests for the new CLI commands and daemon helpers are also included.CLI and Daemon Command Enhancements:
daemoncommand to the CLI for starting, stopping, and checking the status of an offline watch daemon, including support for foreground/background operation and status metadata. (code_review_graph/cli.py,code_review_graph/incremental.py) [1] [2] [3] [4]serveandmcpcommands with an--auto-watchflag, allowing the MCP server to run alongside a background file watcher. (code_review_graph/cli.py,code_review_graph/main.py) [1] [2] [3] [4]Daemon Process Management and Watcher Refactoring:
code_review_graph/incremental.py) [1] [2]code_review_graph/incremental.py)code_review_graph/incremental.py,code_review_graph/main.py) (Fa10b2a3L933, code_review_graph/main.pyL690-R714)Testing Improvements:
serve,mcp, and alldaemonsubcommands, as well as tests for the new daemon helpers and lock acquisition logic. (tests/test_cli.py,tests/test_incremental.py) [1] [2] [3]These changes make the tool more robust for offline and background operation, and provide a more user-friendly and scriptable interface for managing the file watcher and MCP server.