ci: add race-test job to catch concurrency bugs#7228
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Go race detection to the CI workflow to help catch concurrency issues in the gateway’s heavily goroutine/mutex-driven codepaths during normal CI runs.
Changes:
- Adds a new
race-testGitHub Actions job runningmake test-race(go test -race ...) with the same pinned action SHAs and Go cache reporting as existing Go jobs. - Keeps smoke workflows ungated by the race job to avoid slowing functional-feedback cycles.
Show a summary per file
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: 1
| race-test: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| concurrency: | ||
| group: ci-${{ github.ref }}-race-test | ||
| cancel-in-progress: true |
|
@copilot address review feedback and fix failing ci check https://github.com/github/gh-aw-mcpg/actions/runs/27153316085/job/80152331910?pr=7228 |
Addressed in commit
|
|
@copilot fix this failing ci check https://github.com/github/gh-aw-mcpg/actions/runs/27154684445/job/80154499627?pr=7228 |

make test-race(go test -race -timeout=5m ./internal/...) has existed since early development but was never wired into CI, leaving the heavily concurrent MCP Gateway (per-session goroutines, connection pool mutexes, DIFC label propagation) without race detection on every push/PR.Changes
.github/workflows/ci.yml: adds a standalonerace-testjob that runsmake test-raceon everypushandpull_request, using the same pinned action SHAs as existing jobsneeds:list of smoke jobs — race detection runs ~5–10× slower than normal tests and is a separate quality dimension from functional correctness; gating smokes on it would unnecessarily slow contributor feedback