CI: enable -race detector in the test task - #397
Merged
Conversation
Adds -race to the test task so the worker-pool backtester's concurrency claims are actually validated on every commit, and wires the previously-dead INDICATOR_MCP taskfile variable into lint/test/fmt so mcp/ is no longer silently unchecked by CI. Also adds a replace directive in mcp/go.mod pointing at the local module tree so mcp/'s tests exercise current code instead of the last tagged release. Ran the full suite (root + mcp) with -race and go vet after these changes; both are clean, so no new issues to file from this pass. Refs #396
The mcp/ module wiring (go.mod replace directive, lint/test/fmt integration) is being split into its own follow-up so this branch stays focused on the race detector.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #397 +/- ##
==========================================
- Coverage 92.08% 92.05% -0.03%
==========================================
Files 229 229
Lines 7237 7237
==========================================
- Hits 6664 6662 -2
- Misses 486 488 +2
Partials 87 87 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #396
Summary
-raceto thetesttask intaskfile.ymlso the worker-pool backtester's concurrency claims are actually validated on every commit.mcp/CI wiring (deadINDICATOR_MCPvar,go.modreplace directive) has been split out of this PR into its own follow-up to keep this change focused on the race detector.Test plan
go test -race -cover ./asset/... ./backtest/... ./cmd/... ./helper/... ./momentum/... ./strategy/... ./trend/... ./volatility/... ./volume/...— all passNo new failures surfaced from
-raceitself. Note:task lint's revive step currently fails onmasterindependent of this change (pre-existingunused-parameter/receiver-naming/stutter violations instrategy/andmomentum/rvi.go, reproduced on a fresh clone ofmaster) — will file separately and it'll need fixing before any PR'sbuildcheck can go green, this one included.🤖 Generated with Claude Code