WARNING: DATA RACE
Write at 0x00c003c274b8 by goroutine 105:
github.com/coder/coder/v2/coderd/x/chatd.TestWaitAgentNonComputerUseNoRecording()
/home/runner/work/coder/coder/coderd/x/chatd/recording_internal_test.go:225 +0x5f8
github.com/coder/coder/v2/coderd/x/chatd.createParentChildChats()
/home/runner/work/coder/coder/coderd/x/chatd/subagent_internal_test.go:780 +0x2db
Previous read at 0x00c003c274b8 by goroutine 15002:
github.com/coder/coder/v2/coderd/x/chatd.(*Server).processOnce()
/home/runner/work/coder/coder/coderd/x/chatd/chatd.go:2517 +0x8ee
testing.go:1617: race detected during execution of test
go test ./coderd/x/chatd -run TestWaitAgentNonComputerUseNoRecording -race -count=1
CI Failure Information
Failure Details
coderd/x/chatdTestWaitAgentNonComputerUseNoRecordingTestSubscribeNoPubsubNoDuplicateMessageParts,TestWaitAgentComputerUseRecording,TestWaitAgentNonComputerUseNoRecording, plus multiple chatd unit tests that failed after the race detector fired.Race detector evidence:
Root Cause Analysis
coderd/x/chatdduring wait_agent recording tests.TestWaitAgentNonComputerUseNoRecording) and chatd server processing (Server.processOnce).test-go-race-pgjob to fail with multiple chatd test failures after the first race is detected.Assignment Analysis
git log --oneline --follow coderd/x/chatd/recording_internal_test.go17dec2a7(Hugo Dutka) — added/updated the wait_agent recording tests.TestWaitAgentNonComputerUseNoRecordingin this file, so assigning to the most recent substantive author: @hugodutka.Related Issues
coder/internalafter searching:TestWaitAgentNonComputerUseNoRecordingWARNING: DATA RACE+chatdrace detected during execution of test+chatdReproduction