From 388f79d25123eb4ce54fe5ba8bc932357bf3bd0f Mon Sep 17 00:00:00 2001 From: mintaka Date: Sun, 13 Sep 2026 18:18:27 -0400 Subject: [PATCH] test(compass-app): size the connect hang guard for the serialized queue (RIG-3783) TestConnectConcurrentIsSerialized fires 16 overlapping Connect calls, but connectMu serializes the whole arm -> probe -> persist transaction, so a queued caller spends its budget waiting for every call ahead of it. The 5s deadline was sized for one call rather than the queue, and classifyConnectErr folds context.DeadlineExceeded into bad-url, so whole-repo parallel load surfaced as callers reporting an unreachable host. The deadline only guards against a hang; the assertions prove serialization, not latency. Size it well past the queue depth. Co-authored-by: Matt Wilkinson --- go/cmd/compass-app/bridge_service_connect_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/go/cmd/compass-app/bridge_service_connect_test.go b/go/cmd/compass-app/bridge_service_connect_test.go index 9a451a779..7fd0007a7 100644 --- a/go/cmd/compass-app/bridge_service_connect_test.go +++ b/go/cmd/compass-app/bridge_service_connect_test.go @@ -33,7 +33,11 @@ import ( "github.com/RigelBuild/compass/go/internal/tokenstore" ) -const connectTestTimeout = 5 * time.Second +// A hang guard, not a latency assertion: connectMu serializes arm→probe→persist, +// so a queued caller's budget must cover every call ahead of it. A deadline near +// one call's cost makes queueing look unreachable, since classifyConnectErr +// folds DeadlineExceeded into bad-url. +const connectTestTimeout = 2 * time.Minute const probeToken = "s3cr3t-connect-token"