Skip to content

test(mcp): fail closed for unsafe and disappearing repository roots - #295

Merged
drevendev merged 5 commits into
masterfrom
beautifulrepo/mcp-negative-stdio-boundaries-20261107
Nov 7, 2026
Merged

drevendev merged 5 commits into
masterfrom
beautifulrepo/mcp-negative-stdio-boundaries-20261107

Conversation

@drevendev

Copy link
Copy Markdown
Owner

Outcome

Extend the existing pinned-SDK stdio smoke rather than introducing a second framework. The real adapter process now refuses relative, missing, filesystem-root and home-directory roots (and symlink roots when the runner supports creating one), with exit 2, clean stdout and a bounded error. While one real MCP session stays connected, temporarily move its synthetic target away and require all three tools to return structured incomplete evidence; restore the fixture and verify byte-identical contents.

Keep README/ROADMAP claims honest: this remains an experimental optional SDK adapter, not a Claude Code/Codex host acceptance, independent clean installation, legacy protocol proof, or a concurrency-safe sandbox.

Verification

  • Existing .github/workflows/mcp-protocol.yml invokes the expanded smoke on this change.
  • Existing quality.yml performs the standard Python/Windows checks.
  • At creation: local sandbox cannot install mcp==2.3.0 (offline), so no local protocol PASS is claimed; inspect exact-head GitHub Actions results before separate acceptance.
  • No external services, model usage, release, tag, settings or repository license changes.

Related to #255. Intended as a small negative-path acceptance increment, not closure of #255.

@drevendev drevendev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later-run acceptance review on exact head 59e16f0: inspected the complete four-file patch and real adapter startup/revalidation code. The negative-path stdio tests verify exit=2, protocol-clean stdout, optional symlink rejection and fail-closed results when the configured fixture disappears mid-session. Quality CI (6 jobs) and pinned MCP SDK 2.3.0 stdio CI (1 job) passed at this head; no unresolved review threads. Scope is acceptable for integration as an experimental adapter test; this does NOT establish host compatibility (Claude Code/Codex), legacy protocol acceptance, clean pinned installation, hostile-mount/concurrent filesystem security, or production release readiness. Same-account COMMENT is evidence, not an independent approval.

@drevendev
drevendev merged commit 6c01779 into master Nov 7, 2026
7 checks passed
@drevendev
drevendev deleted the beautifulrepo/mcp-negative-stdio-boundaries-20261107 branch November 7, 2026 00:21
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.

1 participant