Repository navigation
test(extensions): expand MCP plugin and ACP coverage - #1042
Merged
Merged
Conversation
Add table-driven config validation tests, bridge error-path and partial-init cleanup tests, stdio/HTTP MCP transport resilience tests, and ACP in-flight prompt error and EOF tests. Remove the unreachable empty-parts guard in McpConfig::add_stdio_cli.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
plugins/ox-plugin-mcp/src/config.rs: Added table-driven tests forMcpConfig::validate,McpConfig::from_filemissing-file error (ConfigError::ReadFile), andsplit_cli_specempty name / value rejection; removed the unreachableparts.is_empty()guard inMcpConfig::add_stdio_cli(87.88% -> 100.00% line coverage).plugins/ox-plugin-mcp/src/bridge.rs: Added tests forhandle_requestnotifications withoutid, invalidtool/callandcommand/invokeparams, unknown server oncommand/invoke, and partial-init cleanup shutting down already-connected clients when a later server fails (88.29% -> 94.33% line coverage).plugins/ox-plugin-mcp/src/mcp.rs: Added stdio transport resilience tests (EOFMcpError::Closed, blank-line and server-notification skipping, request timeoutMcpError::Timeout) and HTTPMcpError::InvalidHeadertests (91.99% -> 96.33% line coverage).crates/ox-acp/src/lib.rs: Added tests forEventOutcome::ErroremittingERR_INTERNAL,session/cancelmalformed params returningERR_INVALID_PARAMS, in-flight blank-line skipping, and stdin EOF mid-prompt settingstopReason = "cancelled"(92.48% -> 92.65% line coverage).Test plan
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo test -p ox-plugin-mcp -p ox-acp(34 passed, 0 failed)cargo llvm-cov -p ox-plugin-mcp -p ox-acp --summary-only(94.70% total line coverage)nix develop -c run-hooks(all hooks passed)