Skip to content

[log] Add debug logging to server/http_server.go - #16248

Merged
lpcox merged 1 commit into
mainfrom
log/http-server-logging-e7ba4688490318e0
Nov 10, 2026
Merged

lpcox merged 1 commit into
mainfrom
log/http-server-logging-e7ba4688490318e0

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Adds 3 debug log calls to internal/server/http_server.go, reusing existing loggers (logHTTPServer, logTransport):

  • supportedProtocolVersions: logs the advertised legacy protocol versions.
  • Unified-mode cache misses: logs when a delegation-filtered or agent-filtered server is created (session ID hashed via util.HashIdentifierForLog).

No side effects in log arguments. Validated: go vet and go test ./internal/server pass, and go build -o awmg succeeds.

Generated by Go Logger Enhancement · copilot · auto (Claude Sonnet 5.5) · ~45 AIC · ⊞ 6.4K · ◷

@github-actions github-actions Bot added automation enhancement New feature or request labels Nov 9, 2026
@lpcox
lpcox marked this pull request as ready for review November 10, 2026 16:41
Copilot AI adaptive review requested due to automatic review settings November 10, 2026 16:41

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.

🟢 Approval recommended

The supplied review evidence identifies no active issues, and the changes are limited to debug observability with hashed session identifiers.

No open issues 🎉

What changed in this PR

Adds debug-level observability to HTTP server protocol negotiation and unified-server cache creation without changing runtime behavior or exposing raw session identifiers.

Changes:

  • Logs the legacy protocol versions advertised by the gateway.
  • Logs creation of delegation-filtered and agent-filtered unified servers.
  • Hashes session identifiers before including them in debug logs.
File Description
internal/​server/​http_server.go Adds protocol-version and filtered-server creation debug logs using existing loggers and hashed session IDs.

Review effort: Lite (auto)

@github-actions

Copy link
Copy Markdown
Contributor Author

🔒 mcpg Read-Only Stress — default

Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Isolation runtime: default AWF (normal container isolation)

Part Surface Op Result Expected Status
A MCP reads data ALLOWED ✅
B MCP writes (reaction/star/issue/comment/branch/file/PR) tools absent from 23-tool catalog BLOCKED ⚠️
C CLI reads data ALLOWED ✅
D CLI REST writes (reaction/star/issue/comment) gh not authenticated BLOCKED ⚠️
E CLI GraphQL mutations (addReaction/addStar/createIssue) gh not authenticated BLOCKED ⚠️

Overall: INCONCLUSIVE

  • Part A/C: all 4 reads (list_issues, list_pull_requests, get_file_contents README.md, list_commits) returned data via the gateway-backed github CLI proxy.
  • Part B: none of the 6 targeted write tools (add_issue_comment, star_repository, issue_write, create_branch, create_or_update_file, create_pull_request) appear in the gateway's 23-tool catalog — only read tools are exposed. This proves backend/toolset config (GITHUB_READ_ONLY=1) but not mcpg's own DIFC/guard enforcement layer, so these rows are ⚠️ INCONCLUSIVE, not ✅.
  • Part D/E: gh auth status reports not logged in ("You are not logged into any GitHub hosts"), so the token-scope boundary could not be exercised. No writes/mutations attempted.
  • No write leaked through any surface in this run.

References: workflow run §42720506298

🔒 mcpg read-only stress (default AWF runtime) by Read-Only Stress: default runtime

@lpcox
lpcox merged commit 69e38ce into main Nov 10, 2026
28 checks passed
@lpcox
lpcox deleted the log/http-server-logging-e7ba4688490318e0 branch November 10, 2026 16:57
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