Skip to content

Fix golangci-lint CI failures in internal/proxy/handler.go#2189

Merged
lpcox merged 2 commits intofeat/proxy-modefrom
copilot/fix-github-actions-workflow-lint-yet-again
Mar 19, 2026
Merged

Fix golangci-lint CI failures in internal/proxy/handler.go#2189
lpcox merged 2 commits intofeat/proxy-modefrom
copilot/fix-github-actions-workflow-lint-yet-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

Two staticcheck violations introduced in internal/proxy/handler.go were causing the lint CI job to fail.

Changes

  • Remove forwardGraphQL: Dead code — defined but never called. GraphQL forwarding is handled inline in handleWithDIFC.
  • Fix S1034 type switch: Eliminate redundant type assertion inside the map[string]interface{} case by using the idiomatic assigned type switch form:
// Before
switch originalData.(type) {
case map[string]interface{}:
    obj := originalData.(map[string]interface{}) // redundant assertion
    ...
}

// After
switch obj := originalData.(type) {
case map[string]interface{}:
    // obj is already the asserted type
    ...
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /tmp/go-build1696049945/b333/launcher.test /tmp/go-build1696049945/b333/launcher.test -test.testlogfile=/tmp/go-build1696049945/b333/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build1696049945/b238/vet.cfg go o x_amd64/compile (dns block)
  • invalid-host-that-does-not-exist-12345.com
    • Triggering command: /tmp/go-build1696049945/b318/config.test /tmp/go-build1696049945/b318/config.test -test.testlogfile=/tmp/go-build1696049945/b318/testlog.txt -test.paniconexit0 -test.timeout=10m0s ncod�� 64/src/runtime/cgo 64/src/encoding/asn1/asn1.go x_amd64/asm (dns block)
  • nonexistent.local
    • Triggering command: /tmp/go-build1696049945/b333/launcher.test /tmp/go-build1696049945/b333/launcher.test -test.testlogfile=/tmp/go-build1696049945/b333/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build1696049945/b238/vet.cfg go o x_amd64/compile (dns block)
  • slow.example.com
    • Triggering command: /tmp/go-build1696049945/b333/launcher.test /tmp/go-build1696049945/b333/launcher.test -test.testlogfile=/tmp/go-build1696049945/b333/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build1696049945/b238/vet.cfg go o x_amd64/compile (dns block)
  • this-host-does-not-exist-12345.com
    • Triggering command: /tmp/go-build1696049945/b342/mcp.test /tmp/go-build1696049945/b342/mcp.test -test.testlogfile=/tmp/go-build1696049945/b342/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build1696049945/b215/vet.cfg p/go-build linux.go x_amd64/compile --exclude-hidden/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet terpreter --quiet x_amd64/compile 2599�� ache/go/1.25.8/x-errorsas AcPk/Gl1SDLLxjjl-ifaceassert x_amd64/vet (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Fix the failing GitHub Actions workflow lint
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 67821217215
Job URL: https://github.com/github/gh-aw-mcpg/actions/runs/23317651473/job/67821217215


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow lint Fix golangci-lint CI failures in internal/proxy/handler.go Mar 19, 2026
@lpcox lpcox marked this pull request as ready for review March 19, 2026 21:32
Copilot AI review requested due to automatic review settings March 19, 2026 21:32
Copilot AI requested a review from lpcox March 19, 2026 21:32
@lpcox lpcox merged commit abf04a8 into feat/proxy-mode Mar 19, 2026
@lpcox lpcox deleted the copilot/fix-github-actions-workflow-lint-yet-again branch March 19, 2026 21:32
Copy link
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

This PR fixes golangci-lint/staticcheck failures in the proxy handler by removing unused code and making a type switch idiomatic, unblocking the lint CI job for the proxy package.

Changes:

  • Removed the unused forwardGraphQL method (confirmed no remaining references in the repo).
  • Refactored writeEmptyResponse to use an assigned type switch form, removing the redundant type assertion in the map[string]interface{} case.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants