ci: add race-test job to catch concurrency bugs by Copilot · Pull Request #7228 · github/gh-aw-mcpg · GitHub
Skip to content

ci: add race-test job to catch concurrency bugs#7228

Merged
lpcox merged 4 commits into
mainfrom
copilot/add-race-detection-job
Jun 8, 2026
Merged

ci: add race-test job to catch concurrency bugs#7228
lpcox merged 4 commits into
mainfrom
copilot/add-race-detection-job

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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 standalone race-test job that runs make test-race on every push and pull_request, using the same pinned action SHAs as existing jobs
  • Intentionally excluded from the needs: 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

Copilot AI linked an issue Jun 8, 2026 that may be closed by this pull request
GitHub Advanced Security started work on behalf of lpcox June 8, 2026 16:52 View session
GitHub Advanced Security finished work on behalf of lpcox June 8, 2026 16:52
Copilot AI changed the title [WIP] Add race-detection job to CI to catch concurrency bugs ci: add race-test job to catch concurrency bugs Jun 8, 2026
Copilot finished work on behalf of lpcox June 8, 2026 16:54
Copilot AI requested a review from lpcox June 8, 2026 16:54
GitHub Advanced Security started work on behalf of lpcox June 8, 2026 16:55 View session
GitHub Advanced Security finished work on behalf of lpcox June 8, 2026 16:56
@lpcox lpcox marked this pull request as ready for review June 8, 2026 17:08
Copilot AI review requested due to automatic review settings June 8, 2026 17:08

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

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-test GitHub Actions job running make 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
File Description
.github/workflows/ci.yml Adds a standalone race-test job to run Go unit tests under -race in CI.

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

Comment thread .github/workflows/ci.yml
Comment on lines +159 to +165
race-test:
runs-on: ubuntu-latest
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-race-test
cancel-in-progress: true
@lpcox

lpcox commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback and fix failing ci check https://github.com/github/gh-aw-mcpg/actions/runs/27153316085/job/80152331910?pr=7228

GitHub Advanced Security started work on behalf of lpcox June 8, 2026 17:18 View session
GitHub Advanced Security finished work on behalf of lpcox June 8, 2026 17:19

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@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 7aa4898.

  • Updated .github/workflows/ci.yml triggers so this CI workflow now runs on every push and pull_request, matching the PR intent.
  • Fixed the failing race check by stabilizing TestFetchAndFixSchema_TooLargeSchema in internal/config/validation_schema_fetch_test.go (test-local timeout override + single large payload write), and verified with make test-race.
  • Ran final validation (Code Review + CodeQL), both clean.

Copilot finished work on behalf of lpcox June 8, 2026 17:21
@lpcox

lpcox commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

GitHub Advanced Security started work on behalf of lpcox June 8, 2026 17:25 View session

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Copilot finished work on behalf of lpcox June 8, 2026 17:26
GitHub Advanced Security finished work on behalf of lpcox June 8, 2026 17:26
@lpcox lpcox merged commit 5022a4e into main Jun 8, 2026
27 checks passed
@lpcox lpcox deleted the copilot/add-race-detection-job branch June 8, 2026 17:30
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.

[Repo Assist] ci: add race-detection job to catch concurrency bugs in CI

3 participants