docs(adr-0019): D.6 amendment — -race carve-out for perf gates#422
Merged
Conversation
Discovered 2026-06-17 in PR #421: the integration job runs `go test -race`. Race-instrumented SQLite vtab reads are 10-20× slower than uninstrumented (TestFindSmells_DeadCode_PerfGate_MacheOnMache: ~3.5s without -race, 82.98s with -race on macOS-integration). No fixed-anchor baseline is meaningful in race mode — you're measuring synchronization overhead, not the algorithm. Add a paragraph to D.6 documenting the policy + the canonical implementation (cmd/race_norace.go + cmd/race_race.go expose raceEnabled bool via build tags). Inheritable rule for every future perf gate so we don't rediscover this. Closes bead mache-605bf0.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Discovered 2026-06-17 in PR #421: the integration job runs
go test -tags boltdb -race .... Race-instrumented SQLite vtab reads are 10-20× slower than uninstrumented. `TestFindSmells_DeadCode_PerfGate_MacheOnMache` measured ~3.5s without -race (well inside the 25% band) and 82.98s with -race on macOS-integration.The race detector measures the synchronization wrapper, not the algorithm — no fixed-anchor baseline is meaningful in race mode. We added the build-tagged `raceEnabled` skip in PR #421; this PR is the documentation follow-up so the policy is inheritable for every future perf gate.
What
Single-paragraph amendment to ADR-0019 D.6 documenting the carve-out and the canonical implementation (`cmd/race_norace.go` + `cmd/race_race.go`).
Test plan
Closes bead `mache-605bf0`.