diff --git a/internal/home/cluster_balance_regression_test.go b/internal/home/cluster_balance_regression_test.go index 2bec31bfa..8640da477 100644 --- a/internal/home/cluster_balance_regression_test.go +++ b/internal/home/cluster_balance_regression_test.go @@ -291,6 +291,7 @@ func TestCancelableConnClosesUnderlyingTransportWhenCloseRacesCancel(t *testing. } ctx, cancel := context.WithCancel(context.Background()) + defer cancel() if mode == "pre-canceled" { cancel() } diff --git a/internal/pluginhost/stream_bridge.go b/internal/pluginhost/stream_bridge.go index 8466823f6..6cd5b1639 100644 --- a/internal/pluginhost/stream_bridge.go +++ b/internal/pluginhost/stream_bridge.go @@ -194,10 +194,6 @@ func (s *streamBridgeStream) emit(ctx context.Context, chunk pluginapi.ExecutorS return <-request.done } -func (s *streamBridgeStream) close(errorMessage string) { - s.closeWithError(rpcStreamError(errorMessage, nil)) -} - func (s *streamBridgeStream) closeWithError(err error) { if s == nil { return diff --git a/internal/runtime/executor/antigravity_issue6825_test.go b/internal/runtime/executor/antigravity_issue6825_test.go index f6cb186e3..d86474d74 100644 --- a/internal/runtime/executor/antigravity_issue6825_test.go +++ b/internal/runtime/executor/antigravity_issue6825_test.go @@ -396,10 +396,10 @@ func TestIssue6825SDKCallerReplayIsolation(t *testing.T) { gin.SetMode(gin.TestMode) ginCtxA, _ := gin.CreateTestContext(httptest.NewRecorder()) ginCtxA.Set("userApiKey", "downstream-api-key-A") - ctxA = context.WithValue(context.Background(), "gin", ginCtxA) + ctxA = context.WithValue(context.Background(), "gin", ginCtxA) //nolint:staticcheck -- "gin" is the shared Gin context key contract. ginCtxB, _ := gin.CreateTestContext(httptest.NewRecorder()) ginCtxB.Set("userApiKey", "downstream-api-key-B") - ctxB = context.WithValue(context.Background(), "gin", ginCtxB) + ctxB = context.WithValue(context.Background(), "gin", ginCtxB) //nolint:staticcheck -- "gin" is the shared Gin context key contract. } assistantA, _ := conversation.callWithContext(ctxA, []byte(issue6825FirstRequest), optsA, scenario.enrich, metadataA) assistantB, _ := conversation.callWithContext(ctxB, []byte(issue6825FirstRequest), optsB, scenario.enrich, metadataB)