PR #82 Review - Researcher Agent Infrastructure Test Coverage Gap
When reviewing new MCP tool implementations (create_proposal, list_proposals), found that integration tests in spec/requests/api/v1/mcp_spec.rb are REQUIRED. Every other MCP tool has comprehensive test coverage covering success cases, error cases, permission checks, and edge cases.
Pattern to follow for new MCP tool tests:
- describe block in "POST /api/v1/mcp/execute" section
- Success case (tool works as expected)
- Error case (validation failures, invalid parameters)
- Permission check (non-authorized roles blocked)
- Edge cases (nil values, empty results, missing associations)
Test files:
- spec/requests/api/v1/mcp_spec.rb - Integration tests for MCP tools
- spec/models/mcp_synchronization_spec.rb - Role configuration validation
Researcher agent infrastructure implementation was solid:
- Proper project-scoped queries
- Good permission guardrails
- Well-structured system prompt
- Missing only test coverage