feat(server): add dcover 'refactor' and 'issues' commands #3
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
This PR expands the
cover-mcpserver's capabilities beyond test creation by adding two newdcovercommands:refactor(aliased asfix-build) andissues. This enables an AI assistant to have a complete workflow: diagnosing project health, fixing build issues, and then generating tests.The Feature
refactortool that exposesdcover refactor(orfix-build).issuestool that exposesdcover issues, with parameters for limiting, skipping, and requesting prompts._run_dcover_commandhelper function for consistency in logging, execution, and error handling._run_dcover_commandhelper now accepts**kwargsto centralize all tool-specific argument processing._build_tool_argshelper is extracted to resolve RuffPLR0912 (Too many branches)warnings.PLR0913 (Too many arguments)is now suppressed with anoqacomment on the main helper.PLR0917 (Too many positional arguments)is suppressed on the wrapper tools.How to Test
refactortool and verify it executesdcover refactorwith the correct arguments (e.g.,--dry-run).issuestool and verify it executesdcover issueswith the correct arguments (e.g.,--limit 5,--prompt).createtool and verify it still functions correctly after the refactor.uv run coverage run -m pytest -v).uv run ruff check).Related Ticket
[Link to Jira/GitHub Issue]