Skip to content

[log] Add debug logging to unified server functions#6769

Merged
lpcox merged 1 commit into
mainfrom
log/unified-server-logging-48b0c50244138b85
May 31, 2026
Merged

[log] Add debug logging to unified server functions#6769
lpcox merged 1 commit into
mainfrom
log/unified-server-logging-48b0c50244138b85

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Adds meaningful debug log calls to three functions in internal/server/unified.go that previously had no logging:

Changes

isToolAllowed — Logs when a tool is blocked by the server's allowlist. This helps debug cases where clients see unexpected "tool not found" errors.

enforceToolCallLimit — Logs when call counters are incremented and when limits are exceeded. This provides visibility into per-session tool call budget enforcement, making it easier to troubleshoot agents hitting rate limits set by guards.

GetServerStatus — Logs the number of servers being queried and each server's current status/uptime. Useful when debugging health check responses.

Validation

  • go build passes
  • go vet passes
  • All Go unit and integration tests pass (make test-all)

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • index.crates.io

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "index.crates.io"

See Network Configuration for more information.

Generated by Go Logger Enhancement · sonnet46 11M ·

Add meaningful debug log calls to three functions in internal/server/unified.go
that previously had no logging:

- isToolAllowed: log when a tool is blocked by the allowlist
- enforceToolCallLimit: log when counters are incremented and when limits are exceeded
- GetServerStatus: log the number of servers being queried and each server's status

These additions improve observability for debugging tool call limits, tool filtering,
and server health checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels May 30, 2026
@lpcox lpcox marked this pull request as ready for review May 31, 2026 13:17
Copilot AI review requested due to automatic review settings May 31, 2026 13:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds debug logUnified.Printf calls to three previously silent functions in the unified server to aid troubleshooting allowlist denials, per-tool call limit enforcement, and server status queries.

Changes:

  • Log when isToolAllowed denies a tool via the per-server allowlist.
  • Log per-tool call counter increments and limit-reached events in enforceToolCallLimit.
  • Log server count and per-server status/uptime in GetServerStatus.
Show a summary per file
File Description
internal/server/unified.go Adds debug log lines in isToolAllowed, enforceToolCallLimit, and GetServerStatus, with no behavioral changes.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@lpcox lpcox merged commit 2537a5a into main May 31, 2026
23 checks passed
@lpcox lpcox deleted the log/unified-server-logging-48b0c50244138b85 branch May 31, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants