Two intermittent failures, both surfacing only under concurrent load. One investigation, not two mysteries found separately six weeks apart.
Neither is caused by the code under test. Both surfaced while a dozen agents ran proxies on one box at load average 10–14 — a condition normal CI does not reproduce, which is why they have gone unnoticed.
1. dash/TestEventsDerivesItsScopeFromTheResolver
Fails on a full go test ./... competing with another concurrent run.
- 5/5 clean isolated, 30/30 clean under
-count=30 -cpu=1, green on a solo package run.
- Reproduced on a commit whose only
dash change was a comment, so it cannot reach /api/events.
- Cause: timing-sensitive SSE test — it asserts on whatever the recorder has flushed at the moment it looks. The
dash package takes ~356s, so under contention the flush it needs has not landed.
2. TestDashboardAddsNoRequestLatencyWithContentCapture
Established by interleaved runs against origin/main, so it predates and is independent of any current branch.
- Cause: a latency assertion measured on a machine already saturated. It compares request latency with content capture on against a budget that assumes the box is not competing with a dozen proxies.
Suggested fix
Both want an explicit synchronisation point rather than an implicit one:
- For (1): poll for the expected event with a deadline, the way
wait_for_rows already does for the request table, instead of asserting on the first read.
- For (2): the budget needs to be either load-relative or the measurement taken under a quiescence check. Raising the constant just moves the flake.
Sleeping longer fixes neither.
Two intermittent failures, both surfacing only under concurrent load. One investigation, not two mysteries found separately six weeks apart.
Neither is caused by the code under test. Both surfaced while a dozen agents ran proxies on one box at load average 10–14 — a condition normal CI does not reproduce, which is why they have gone unnoticed.
1.
dash/TestEventsDerivesItsScopeFromTheResolverFails on a full
go test ./...competing with another concurrent run.-count=30 -cpu=1, green on a solo package run.dashchange was a comment, so it cannot reach/api/events.dashpackage takes ~356s, so under contention the flush it needs has not landed.2.
TestDashboardAddsNoRequestLatencyWithContentCaptureEstablished by interleaved runs against
origin/main, so it predates and is independent of any current branch.Suggested fix
Both want an explicit synchronisation point rather than an implicit one:
wait_for_rowsalready does for the request table, instead of asserting on the first read.Sleeping longer fixes neither.