Skip to content

Disable MCP configuration file watchers before startup - #33

Merged
mrinc merged 1 commit into
masterfrom
fix/mcp-no-filesystem-watchers
Oct 3, 2026
Merged

mrinc merged 1 commit into
masterfrom
fix/mcp-no-filesystem-watchers

Conversation

@bcbetterninja

Copy link
Copy Markdown
Collaborator

Starting the MCP endpoint could freeze BetterMail when its working directory was the user’s home. CreateSlimBuilder installed default JSON reload watchers before configuration sources were cleared, recursively traversing unrelated project directories and potentially stalled mounts.

Create an empty web host with an explicit application content root, register only Kestrel and routing, and use null content/web-root file providers. The endpoint never installs default configuration-file readers or watchers, regardless of the caller’s reload environment setting. MCP settings continue to come from the saved database configuration.

Validation:

  • Solution build passed with zero warnings/errors; all 567 tests passed.
  • Regression startup succeeds with malformed appsettings.json in the working directory and configuration reload explicitly enabled; no file configuration providers exist and both file providers return inactive watch tokens.
  • Endpoint startup and bearer authentication remain functional; existing MCP/evidence transport tests pass.
  • Linux strace recorded zero inotify_init, inotify_init1, inotify_add_watch, or inotify_rm_watch calls during the new startup regression tests.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7ba94293-4ac5-406c-9ee5-3ff0631b2541
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mrinc
mrinc merged commit 86069dd into master Oct 3, 2026
9 checks passed
@mrinc
mrinc deleted the fix/mcp-no-filesystem-watchers branch October 3, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants