[log] Add debug logging to config/config_stdin.go by github-actions[bot] · Pull Request #8156 · github/gh-aw-mcpg · GitHub
Skip to content

[log] Add debug logging to config/config_stdin.go#8156

Merged
lpcox merged 1 commit into
mainfrom
log/config-stdin-logging-3e61efa7f2ecfa32
Jun 27, 2026
Merged

[log] Add debug logging to config/config_stdin.go#8156
lpcox merged 1 commit into
mainfrom
log/config-stdin-logging-3e61efa7f2ecfa32

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Adds 5 targeted logStdin.Printf calls to internal/config/config_stdin.go to make the stdin config loading pipeline more observable under DEBUG=config:*.

Changes

The file already declared var logStdin = logger.New("config:config_stdin") but only used it in a handful of spots. This PR fills the key gaps:

Location What's logged
convertStdinConfig Effective gateway settings after conversion: port, toolTimeout, startupTimeout
convertStdinServerConfig HTTP auth details (type + effective audience) when auth is configured
buildStdioServerConfig Count of extra Docker runtime args when present
buildStdioServerConfig Count of entrypoint args when present
normalizeLocalType Number of servers being checked for "local" type normalization

Validation

  • go build ./internal/config/... — clean
  • go test ./internal/config/... — all tests pass
  • Exactly 1 file modified; no test files touched
  • No side effects in log arguments

Generated by Go Logger Enhancement · 112.5 AIC · ⊞ 8.3K ·

Add 5 logStdin.Printf calls to fill gaps in the existing debug logger:

- convertStdinConfig: log effective gateway settings (port, toolTimeout,
  startupTimeout) after conversion is complete
- convertStdinServerConfig: log HTTP auth configuration details (type
  and effective audience) when auth is configured
- buildStdioServerConfig: log when extra Docker runtime args are added
- buildStdioServerConfig: log when entrypoint args are added
- normalizeLocalType: log server count when checking for 'local' type

The file already declared logStdin = logger.New("config:config_stdin")
but only used it in a few spots. These additions cover the key code paths
that are useful to observe when troubleshooting configuration issues.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels Jun 26, 2026
@lpcox lpcox marked this pull request as ready for review June 27, 2026 15:28
Copilot AI review requested due to automatic review settings June 27, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves observability of the stdin (JSON) configuration loading/conversion pipeline by adding a few targeted logStdin.Printf debug statements in internal/config/config_stdin.go, gated by the existing config:config_stdin debug namespace (e.g., DEBUG=config:*).

Changes:

  • Log resolved gateway settings (port/toolTimeout/startupTimeout) after stdin→internal conversion.
  • Log HTTP server auth configuration (type + effective audience) when auth is present.
  • Log counts for optional stdio server fields (extra Docker runtime args and entrypoint args) and for "local""stdio" normalization processing.
Show a summary per file
File Description
internal/config/config_stdin.go Adds debug logs at key conversion/normalization points to make stdin config handling more observable under DEBUG=config:*.

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: Low

@lpcox lpcox merged commit 9c0813f into main Jun 27, 2026
24 checks passed
@lpcox lpcox deleted the log/config-stdin-logging-3e61efa7f2ecfa32 branch June 27, 2026 15:35
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