test: add comprehensive test coverage for MCP allowHeadless feature#9329
Closed
continue-development-app[bot] wants to merge 1 commit intodocs/mcp-allow-headless-9327from
Closed
test: add comprehensive test coverage for MCP allowHeadless feature#9329continue-development-app[bot] wants to merge 1 commit intodocs/mcp-allow-headless-9327from
continue-development-app[bot] wants to merge 1 commit intodocs/mcp-allow-headless-9327from
Conversation
- Add edge case tests for disconnected servers, empty connections, and empty tools - Add permission policy interaction tests with wildcards and argumentMatches - Add integration tests for mixed built-in and MCP tools - Add test for built-in tools behavior in headless mode - Add tool ordering and mode transition tests Improves test coverage for PR #9328 with 12 new test cases covering: - Error handling and graceful degradation - Complex permission policy scenarios - Real-world integration scenarios - Security boundary validation Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev> Co-authored-by: peter-parker <e2e@continue.dev>
Contributor
|
Likely will not have allowHeadless option |
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.
Overview
This PR adds comprehensive test coverage for the
allowHeadlessfeature introduced in PR #9328. The new tests ensure robust behavior of MCP tools in headless mode across various scenarios.Test Coverage Added
1. Edge Cases and Error Handling
allowHeadless: falsebehavior2. Permission Policy Interactions
3. Integration Tests
4. Built-in Tool Behavior
Key Improvements
Security-Critical Tests
✅ Explicit exclusions always respected (cannot be bypassed by
allowHeadless)✅ Wildcard excludes take precedence over
allowHeadless✅ Default behavior is secure (tools excluded without explicit
allowHeadless: true)Test Organization
Tests are organized into 4 logical groups:
MCP tools in headless mode(original tests from PR docs: add allowHeadless documentation for MCP servers in CLI headless mode #9328)MCP tool execution permission in headless mode(original + new built-in test)MCP tool edge cases and error handling(new)MCP tool permission policy interactions(new)MCP tool integration tests(new)Files Modified
extensions/cli/src/stream/mcp-headless.test.ts: Added 12 new test casesTEST_IMPROVEMENTS.md: Documentation of test improvementsTest Statistics
This task was co-authored by peter-parker and Continue.
Summary by cubic
Added 12 tests that verify MCP allowHeadless behavior in headless mode. Improves security guarantees and covers real-world scenarios.
Written for commit 981c13f. Summary will update automatically on new commits.
Continue Tasks
Powered by Continue