fix: restart watch service when project configuration changes#176
Closed
phernandez wants to merge 1 commit intomainfrom
Closed
fix: restart watch service when project configuration changes#176phernandez wants to merge 1 commit intomainfrom
phernandez wants to merge 1 commit intomainfrom
Conversation
Resolves issue where new projects created via MCP tools weren't being watched by the file synchronization service. The watch service now automatically restarts when projects are added, removed, or when the project configuration changes. Implementation: - Add file-based signaling mechanism for watch service restarts - ProjectService signals restart when projects are added/removed - WatchService checks for restart signal on each file change batch - Watch loop recreates service instances to pick up new projects - Add comprehensive tests for the restart signal mechanism Note: New projects will only be picked up for watching after the next file change occurs in any existing project, as the restart signal is checked during file change processing. Fixes #156 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Member
Author
|
I'm going to close this PR and reimplement it. |
phernandez
added a commit
that referenced
this pull request
Oct 15, 2025
Refines the idempotent project creation behavior and adds validation for project deletion to prevent user errors. Changes: - Project creation now properly validates path matching for true idempotency - Same name + same path: Returns 200 OK (idempotent) - Same name + different path: Returns 400 with clear error message - Project deletion now prevents removing the default project - Returns 400 with helpful error listing alternative projects - Prevents accidental deletion of the only/default project This fixes issues encountered by tenant user_01K7GCGSPZ4A63H3QA5M9AMT23 who experienced 32 errors (15 delete failures, 12 create failures) due to inadequate validation. Tests: - Added 6 new comprehensive tests for validation logic - All 24 tests pass with 97% coverage on project_router - No regressions detected Fixes #173 (tenant errors) Related: #175 (delete validation), #176 (set default validation) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
phernandez
added a commit
that referenced
this pull request
Oct 15, 2025
Refines the idempotent project creation behavior and adds validation for project deletion to prevent user errors. Changes: - Project creation now properly validates path matching for true idempotency - Same name + same path: Returns 200 OK (idempotent) - Same name + different path: Returns 400 with clear error message - Project deletion now prevents removing the default project - Returns 400 with helpful error listing alternative projects - Prevents accidental deletion of the only/default project This fixes issues encountered by tenant user_01K7GCGSPZ4A63H3QA5M9AMT23 who experienced 32 errors (15 delete failures, 12 create failures) due to inadequate validation. Tests: - Added 6 new comprehensive tests for validation logic - All 24 tests pass with 97% coverage on project_router - No regressions detected Fixes #173 (tenant errors) Related: #175 (delete validation), #176 (set default validation) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
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.
Resolves issue where new projects created via MCP tools weren't being watched by the file synchronization service. The watch service now automatically restarts when projects are added, removed, or when the project configuration changes.
Implementation:
Note: New projects will only be picked up for watching after the next file change occurs in any existing project, as the restart signal is checked during file change processing.
Fixes #156
🤖 Generated with Claude Code