Observed on CI run https://github.com/majorcontext/harness/actions/runs/32424396070/job/96603193119 (PR #135, commit 44a20a7 — which touches only modelmeta lookup tables; the test is byte-identical to main, landed in #116, and uses provider test which modelmeta ignores).
The timeout dump shows TestLiveEventTurnRestartForwarded running 9m59s. The test publishes exactly one live event immediately after openSSE and then blocks in waitFor → nextEvent, which ranges the item channel with no deadline (server/server_test.go:367-388) — so if that single event is lost to a subscribe/publish race, the test consumes the package's entire 10m alarm instead of failing fast. 20 consecutive local -race runs pass in ~2s; the CI runner also had leaked goal-retry goroutines from earlier tests (waitGoalRetryableBackoff attempt 8, goalBlockingStream.Next 5m) adding scheduler pressure.
Two independent fixes worth making:
- Bound
nextEvent with a deadline (e.g. 30s) so any lost-event bug fails one test in seconds instead of hanging the package.
- Make the publish/subscribe ordering in this test deterministic — either have
openSSE synchronize on server-side subscriber registration, or re-publish until received.
Also worth a look: the leaked goal goroutines in the dump suggest some goal tests don't cancel their retry loops on cleanup.
Observed on CI run https://github.com/majorcontext/harness/actions/runs/32424396070/job/96603193119 (PR #135, commit 44a20a7 — which touches only
modelmetalookup tables; the test is byte-identical to main, landed in #116, and uses providertestwhich modelmeta ignores).The timeout dump shows
TestLiveEventTurnRestartForwardedrunning 9m59s. The test publishes exactly one live event immediately afteropenSSEand then blocks inwaitFor→nextEvent, which ranges the item channel with no deadline (server/server_test.go:367-388) — so if that single event is lost to a subscribe/publish race, the test consumes the package's entire 10m alarm instead of failing fast. 20 consecutive local-raceruns pass in ~2s; the CI runner also had leaked goal-retry goroutines from earlier tests (waitGoalRetryableBackoffattempt 8,goalBlockingStream.Next5m) adding scheduler pressure.Two independent fixes worth making:
nextEventwith a deadline (e.g. 30s) so any lost-event bug fails one test in seconds instead of hanging the package.openSSEsynchronize on server-side subscriber registration, or re-publish until received.Also worth a look: the leaked goal goroutines in the dump suggest some goal tests don't cancel their retry loops on cleanup.