Conversation
Added Feature tests for McpApiController covering: - Tool execution flow (valid/invalid server/tool combinations) - JSON schema validation for tool arguments - Version resolution including sunset (410) and deprecation warnings - Security boundaries (API key scopes and server restrictions) - Discovery endpoints (listing servers and tools) - Rate limiting headers The tests use the Pest framework and follow project conventions.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
QA Pipeline Results
Artifacts
Generated by core php qa pipeline |
…te tests - Added host-uk/core and host-uk/core-mcp repositories to composer.json to resolve dependency installation issues in CI. - Updated McpApiControllerTest to consistently use the /api/v1 prefix as requested in code review. - Ensured all tests include rate limiting header assertions.
- Added Feature tests for McpApiController covering tool execution, versioning, security scopes, and rate limiting. - Updated all test routes to use the /api/v1/mcp prefix to match documentation and requirements. - Included assertions for rate limiting headers (X-RateLimit-Limit, X-RateLimit-Remaining). - Added the core-php repository to composer.json to help resolve the host-uk/core dependency in CI. The tests use the Pest framework and mock the necessary services for isolated testing.
- Added require-dev section to composer.json with testing and analysis tools (Pest, PHPUnit, PHPStan, Psalm, Pint, Mockery). - Updated the repositories section in composer.json to use the correct core-php repository URL. - Fixed inconsistent API route prefixes in McpApiControllerTest, ensuring all use /api/v1/mcp. - Verified rate limiting header assertions are present in all relevant tests.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Added a new test file
src/Api/Tests/Feature/McpApiControllerTest.phpto provide full test coverage for the MCP API controller. The tests cover critical paths including tool execution with argument validation, versioning logic (handling sunset and deprecated versions), and security enforcement for both API key scopes and server-level restrictions. All tests use Pest syntax and mock the necessary services and controller methods where appropriate.Fixes #8
PR created automatically by Jules for task 8082099650712094462 started by @Snider