Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(macrod): install the TLS provider before dialing the gateway (#5816)

Wolf Mermelsteina42cee81016a
diff --git a/Cargo.lock b/Cargo.lock
index f2f78324e9..a258c0825c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3421,6 +3421,7 @@ dependencies = [
"macro_uuid",
"reqwest 0.13.4",
"rootcause",
+ "rustls 0.23.40",
"serde",
"serde_json",
"strum 0.27.2",
diff --git a/crates/coding_agent_worker/Cargo.toml b/crates/coding_agent_worker/Cargo.toml
index 7d2b4c869e..be6f5eed4d 100644
--- a/crates/coding_agent_worker/Cargo.toml
+++ b/crates/coding_agent_worker/Cargo.toml
@@ -28,6 +28,9 @@ macro_user_id = { path = "../macro_user_id" }
macro_uuid = { path = "../macro_uuid" }
reqwest = { workspace = true }
rootcause = { workspace = true }
+# The gateway dial is `wss` on every deployment but a local stack, and
+# tokio-tungstenite's rustls feature selects no crypto provider.
+rustls = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
strum = { workspace = true }
diff --git a/crates/coding_agent_worker/src/main.rs b/crates/coding_agent_worker/src/main.rs
index 748a119e66..929b38abab 100644
--- a/crates/coding_agent_worker/src/main.rs
+++ b/crates/coding_agent_worker/src/main.rs
@@ -45,6 +45,11 @@ async fn main() -> ExitCode {
)
.init();
+ // Dialing a `wss` gateway needs a process-wide provider, and rustls
+ // installs none by itself. Before any dial, and idempotent: an error only
+ // means somebody already did this.
+ let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
+
let args = Args::parse();
match run(&args.config).await {
Ok(()) => ExitCode::SUCCESS,