Archon/python/tests/mcp_server
Rasmus Widing d7e102582d fix(mcp): Address all priority actions from PR review
Based on latest PR #306 review feedback:

Fixed Issues:
- Replaced last remaining basic error handling with MCPErrorFormatter
  in version_tools.py get_version function
- Added proper error handling for invalid env vars in get_max_polling_attempts
- Improved type hints with TaskUpdateFields TypedDict for better validation
- All tools now consistently use get_default_timeout() (verified with grep)

Test Improvements:
- Added comprehensive tests for MCPErrorFormatter utility (10 tests)
- Added tests for timeout_config utility (13 tests)
- All 43 MCP tests passing with new utilities
- Tests verify structured error format and timeout configuration

Type Safety:
- Created TaskUpdateFields TypedDict to specify exact allowed fields
- Documents valid statuses and assignees in type comments
- Improves IDE support and catches type errors at development time

This completes all priority actions from the review:
 Fixed inconsistent timeout usage (was already done)
 Fixed error handling inconsistency
 Improved type hints for update_fields
 Added tests for utility modules
2025-08-19 16:54:49 +03:00
..
features refactor(mcp): Apply consistent error handling to all MCP tools 2025-08-19 16:07:07 +03:00
utils fix(mcp): Address all priority actions from PR review 2025-08-19 16:54:49 +03:00
__init__.py Add comprehensive unit tests for MCP server features 2025-08-18 21:04:35 +03:00