Skip to content

docs(adr-0019): D.6 amendment — -race carve-out for perf gates#422

Merged
jamestexas merged 1 commit into
mainfrom
docs/adr-0019-race-amendment
Jun 20, 2026
Merged

docs(adr-0019): D.6 amendment — -race carve-out for perf gates#422
jamestexas merged 1 commit into
mainfrom
docs/adr-0019-race-amendment

Conversation

@jamestexas

Copy link
Copy Markdown
Contributor

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

  • mdformat clean
  • No code change — doc-only

Closes bead `mache-605bf0`.

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.
@jamestexas jamestexas merged commit 3eebfa4 into main Jun 20, 2026
8 checks passed
@jamestexas jamestexas deleted the docs/adr-0019-race-amendment branch June 20, 2026 21:43
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.

1 participant