MCP: --root for relative paths; say when claims were not checked - #23
Merged
Merged
Conversation
From live testing (Claude Desktop via WSL): - The server's working directory was C:\Windows\System32, so every relative model or claims path failed. `writ-mcp --root DIR` (or WRIT_MCP_ROOT) moves there before reading anything; command-line paths stay relative to where it was started, and a bad root is refused at startup. A missing relative path now names the working directory and the flag. The server writes nothing in its working directory, only temporary files. - With errors in both model and claims, only the model's were reported, and the claims looked clean until the next round trip. Claims and rules are typed against the model, so they are still not read, but writ_validate now says so: `note E_NOT_CHECKED in claims`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Two more issues from live testing.
C:\Windows\System32.writ-mcp --root DIR(orWRIT_MCP_ROOT) now changes to DIR at startup. Paths on the command line stay relative to the launch directory, and a root that doesn't exist exits 2 with a message. A missing relative path now names the working directory and--root. The server never writes to its working directory, only to temporary files.writ_validatenow addsnote E_NOT_CHECKED in claims(andin rules), so a client knows to re-validate after fixing the model.Docs:
docs/mcp.md(a config example with--root) and the CHANGELOG.Testing:
make testpasses (257 checks intest_mcp_authoring), and so doesmake lint. I checked--rootby hand against the built binary, including a root that doesn't exist; it has no unit test, because the flag lives in the binary, not the library.🤖 Generated with Claude Code