You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
doc sources: local: and okf: list the files of a tree without a directory they cannot list; what should they do? #1207
LocalMarkdownClient._collect_files (mcp/local_markdown.py) and OKFClient._iter_candidate_files (mcp/okf_client.py) list with Path.rglob("*"), which skips a directory that cannot be listed (mode 0o111, as a non-root user) without an error. A source whose docs hold a.md and sub/b.md, with sub unlistable, returns ['a.md']: the measured docs are a smaller set and nothing says so.
The contract does not settle what a user should see. Today: a path that does not exist raises MCPConnectionError; a directory with no doc files logs a warning and returns []; a file that cannot be read is skipped with a debug log (# noqa: BLE001 - ... one unreadable file is skipped). docs/adding-doc-source.md says nothing about an unreadable directory.
Options: (a) raise MCPConnectionError for the directory, as for a missing path, so a preflight and the run refuse it; (b) skip it with a warning that names it, as for an empty source; (c) keep the silent skip and document it. digest_entries.listed_entries lists what rglob("*") lists and raises the OSError, so (a) is a few lines per client; check_connection would need to decide too. Which one?
Activity