fix(filesystem): improve roots diagnostics and add tilde path coverage - #3414
fix(filesystem): improve roots diagnostics and add tilde path coverage#3414ahmetguness wants to merge 1 commit into
Conversation
|
@claude review |
|
Claude finished @cliffhall's task in 2m 24s —— View job PR Review: fix(filesystem): improve roots diagnostics and add tilde path coverage
Overall this is a clean, well-intentioned PR. The test additions are solid and the consolidation of tilde expansion logic is correct. I found one real correctness issue (double-logging) and a couple of minor concerns. Root URI Diagnostics (
|
| Area | Verdict |
|---|---|
Tilde deduplication via expandHome |
✅ Correct, clean |
parseRootUri error logging |
✅ Good improvement |
Double-logging in getValidRootDirectories |
|
index.ts template literal reformat |
|
| Windows CWD-dependent test fix | ✅ Correct |
| New test coverage | ✅ Well-structured |
| EOF newline | ℹ️ Trivial |
The double-logging issue is the only real change needed before merging.
LuuOW
left a comment
There was a problem hiding this comment.
Technical audit: Verified MCP server implementation for consistency with current SDK patterns.
Summary
Improves root URI diagnostics and adds explicit test coverage for tilde-prefixed path edge cases in the filesystem server.
This change does not modify the intended tilde expansion semantics. Instead, it:
expandHomeRelated to #3412
Details
1. Diagnostics Improvements
parseRootUripreviously swallowed resolution errors silently.This change adds descriptive logging when a root URI cannot be resolved, helping diagnose client-side configuration issues (e.g. invalid paths, inaccessible directories).
If no valid roots remain after validation, the error output now includes the received root URIs for easier debugging.
2. Tilde Handling Clarification
The existing
expandHomebehavior remains unchanged:~and~/...expand to the user's home directory~MyFolderor/path/~backupremain unchangedThe change removes duplicated tilde handling logic and centralizes it through
expandHome.3. Test Coverage
Adds explicit tests for:
~MyFolder(literal name, not expanded)~user(not expanded)file://root URIs containing tilde-prefixed directoriesAll tests pass locally on Windows (
151/151).Type of Change
Breaking Changes
None.