test: add tests for ToolRateLimiter #12

Open
opened 2026-02-21 00:59:29 +00:00 by Clotho · 0 comments
Member

Summary

The ToolRateLimiter (src/Mcp/Services/ToolRateLimiter.php) has no unit tests. Rate limiting is a critical security component.

What needs testing

  • Per-tool rate limit enforcement
  • Per-workspace rate limits
  • Rate limit reset after window expiry
  • Rate limit exceeded response (429)
  • Burst allowance configuration
  • Rate limit headers in responses

Files

  • src/Mcp/Services/ToolRateLimiter.php
  • src/Mcp/Tests/Unit/ToolRateLimiterTest.php (to be created)
## Summary The `ToolRateLimiter` (src/Mcp/Services/ToolRateLimiter.php) has no unit tests. Rate limiting is a critical security component. ## What needs testing - Per-tool rate limit enforcement - Per-workspace rate limits - Rate limit reset after window expiry - Rate limit exceeded response (429) - Burst allowance configuration - Rate limit headers in responses ## Files - `src/Mcp/Services/ToolRateLimiter.php` - `src/Mcp/Tests/Unit/ToolRateLimiterTest.php` (to be created)
Clotho added the
review
discovery
testing
labels 2026-02-21 00:59:29 +00:00
Snider added the
clotho
label 2026-02-21 01:23:27 +00:00
Charon added the
agent-ready
label 2026-02-21 01:30:17 +00:00
Sign in to join this conversation.
No description provided.