Skip to content

fix(mcp): validate check_ignore requires dart runner - #1791

Open
unicoderbot[bot] wants to merge 1 commit into
mainfrom
vgv-ai-bot/issue-1779
Open

unicoderbot[bot] wants to merge 1 commit into
mainfrom
vgv-ai-bot/issue-1779

Conversation

@unicoderbot

@unicoderbot unicoderbot Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Add validation to the MCP test tool handler to reject check_ignore: true when not using the Dart runner. The --check-ignore flag is only supported by very_good dart test, not very_good test (Flutter).

Problem

The MCP test tool was building command lines without validating runner-specific arguments:

  • check_ignore is only registered on very_good dart test
  • Passing it to very_good test (Flutter) caused exit 64 before any test runs
  • Agents instructed to always set check_ignore could not test Flutter packages

Solution

Validate the check_ignore and dart argument combination in _handleTest before parsing arguments. Return a clear validation error if check_ignore: true is set without dart: true.

Changes

  • Add pre-parsing validation in _handleTest to check check_ignore requirements
  • Return descriptive StructuredToolError with validation failure type
  • Add comprehensive test coverage for all check_ignore combinations

Closes #1779

Closes #1779

Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

📊 Cognitive Complexity Analysis

Net Delta: +2 | Added: 0 | Increased: 1 | Improved: 0 | Removed: 0 | Violations: 0

Status Declaration Location Delta Score
🟡 VeryGoodMCPServer._handleTest lib/src/mcp/mcp_server.dart:L486-513 +2 1 -> 3

This branch has not been deployed

No deployments
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.

fix(mcp): test passes timeout_seconds and check_ignore to runners that reject them

1 participant