Skip to content

Improve MCP stdio transport error handling, add unit test, adjust tests and deps - #7

Merged
devopsariful merged 1 commit into
mainfrom
codex/fix-typo-in-codebase
Jul 22, 2026
Merged

Improve MCP stdio transport error handling, add unit test, adjust tests and deps#7
devopsariful merged 1 commit into
mainfrom
codex/fix-typo-in-codebase

Conversation

@devopsariful

Copy link
Copy Markdown
Owner

Motivation

  • Make MCP subprocess startup failures return a handled error instead of panicking and improve diagnostic context for spawn/stdin/stdout failures.
  • Ensure unit tests cover the failure mode for MCP stdio transport and make integration tests more deterministic about expected results.
  • Normalize a few doc/test spellings and align dependency versions for compatibility.

Description

  • Change StdioTransport::new to return Result<Self> and use anyhow::Context for richer error messages when spawning the subprocess or capturing stdin/stdout instead of unwrapping or panicking.
  • Update MCPClient::register_server to propagate the Result from StdioTransport::new (use ?) so callers handle transport construction failures.
  • Add a unit test stdio_transport_spawn_failure_returns_error to verify that attempting to spawn a non-existent MCP command returns an error.
  • Adjust integration tests (test_vector_store and test_config) to use US English spellings and make assertions more precise by comparing PathBuf values directly; update README.md test docs accordingly.
  • Bump/adjust package dependency versions in package.json (notably @milkdown/plugin-math, @milkdown/plugin-table, and @tauri-apps/api) and include a small Cargo.lock change for thiserror.
  • Minor comment wording change in voice.rs (British → American spelling) and small tidy-ups to error handling code paths.

Testing

  • Ran cargo test which includes unit tests and integration tests, and the test suite completed successfully including the new stdio_transport_spawn_failure_returns_error unit test.
  • Verified test_vector_store and test_config integration tests ran as part of cargo test and passed after the test assertion adjustments.
  • No runtime/manual UI tests are included in this change; CI should run the full test matrix to confirm cross-platform behaviour.

Codex Task

@devopsariful
devopsariful merged commit 195ac6f into main Jul 22, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant