[log] Add debug logging to IsSingularReadTool in tool_policy.go - #10692
[log] Add debug logging to IsSingularReadTool in tool_policy.go#10692github-actions[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds debug visibility into singular-versus-collection tool classification.
Changes:
- Adds a file-derived
server:tool_policylogger. - Logs classification decisions when debug logging is enabled.
Show a summary per file
| File | Description |
|---|---|
internal/server/tool_policy.go |
Adds guarded debug logging without changing classification behavior. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- 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 Gateway tool inventory: 22 read-only tools exposed; all write tools absent at gateway level.
Overall: PASS
References: §30961042701
|
🔒 mcpg Read-Only Stress — docker-sbxSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: PASS
References: §30961042703
|
Summary
Adds debug logging to
internal/server/tool_policy.go, following the project's logging guidelines from AGENTS.md.Changes
logToolPolicylogger (server:tool_policynamespace vialogger.ForFile()).IsSingularReadToolreporting the tool name and the collection/singular classification decision, guarded bylogToolPolicy.Enabled()to avoid unnecessary computation when debug logging is disabled.This file previously had no logger and no debug visibility into how the DIFC filtering layer classifies GitHub MCP tool calls as singular-read vs. collection tools — a decision that directly affects response filtering behavior.
Validation
go build ./...— succeedsgo vet ./internal/server/...— cleango test ./internal/server/...— all tests passawmgbinary successfully with the change includedOnly this one file was modified; no test files or unrelated code were touched.