[log] Add debug logging to isRateLimitToolResult control flow - #10949
Conversation
Log the non-map and non-error-result early-return branches, and the case where an error result doesn't match rate-limit text patterns. Reuses the existing logCircuitBreaker logger already used elsewhere in this file, providing full visibility into how rate-limit detection decisions are made. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds targeted debug logging for rate-limit detection control flow.
Changes:
- Logs all non-rate-limit early-return paths.
- Reuses the existing circuit-breaker logger.
Show a summary per file
| File | Description |
|---|---|
internal/server/rate_limit.go |
Adds debug messages without changing detection behavior. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
🔒 mcpg Read-Only Stress — default AWFSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Part B detail: Gateway exposes only 22 read-only tools. All 7 write tool attempts returned Part D/E detail: Overall: PASS ✅
|
🔒 mcpg Read-Only Stress — gVisorSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: PASS
References: §31342177178
|
🔒 mcpg Read-Only Stress — docker-sbxSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: PASS
|
Summary
Adds debug logging to
internal/server/rate_limit.go'sisRateLimitToolResultfunction to improve troubleshooting visibility into rate-limit detection.Changes
logCircuitBreakerlogger (server:circuit_breakernamespace) already used elsewhere in this file.All log arguments are simple values with no side effects.
Validation
go build ./...— succeedsgo vet ./internal/server/— cleango test ./internal/server/— all tests pass (6.488s)Exactly one file was modified (
internal/server/rate_limit.go); no test files were touched.