Classify filesystem root and path validation failures#3607
Classify filesystem root and path validation failures#3607davidahmann wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
|
Operator impact: filesystem clients now get explicit path-validation classifications for out-of-roots, missing-parent, invalid-path, and permission-denied failures instead of relying on ambiguous free-form messages. Minimal change: Validation:
Risk/blocker: none in the changed path. |
|
Heads-up: the CI failures on Build fetch, Build git, and Build time are caused by Python lockfile drift ( I opened a dedicated fix in #3598 to refresh the lockfile. Local verification on the fix branch:
Once #3598 is merged, the Python-side CI should turn green for this PR as well. |
Problem
Filesystem clients need to distinguish path-outside-roots and missing-parent failures without parsing ambiguous free-form text.
Why now
The startup path already emits machine-readable validation receipts in the built server, but
validatePathstill surfaced several denial classes as generic text. Tightening that taxonomy makes the reference server easier to validate in clients.What changed
validatePathValidation
npm test -- __tests__/startup-validation.test.ts __tests__/lib.test.ts✅Refs #3606