test(translator): skip replay target model allocation budget test under race detector

- Add race and non-race build-tagged test files in the Codex Claude translator package to expose race detector status.
- Skip TestConvertClaudeRequestToCodex_ResolvesReplayTargetModelOncePerRequest when the race detector is enabled to avoid flaky failures from random sync.Pool drops.

Closes: #6872
This commit is contained in:
Luis Pater
2026-10-22 20:02:56 +08:00
parent 43f27e3ae3
commit ad09c77998
3 changed files with 14 additions and 0 deletions

View File

@@ -792,6 +792,10 @@ func TestConvertClaudeRequestToCodex_AssistantRoutedMetaSignatureToReasoningItem
}
func TestConvertClaudeRequestToCodex_ResolvesReplayTargetModelOncePerRequest(t *testing.T) {
if raceDetectorEnabled {
t.Skip("allocation budgets are not meaningful with race detector instrumentation")
}
const thinkingBlocks = 64
var body strings.Builder
body.WriteString(`{"messages":[{"role":"assistant","content":[`)

View File

@@ -0,0 +1,5 @@
//go:build !race
package claude
const raceDetectorEnabled = false

View File

@@ -0,0 +1,5 @@
//go:build race
package claude
const raceDetectorEnabled = true