From dbc0cdbe1b75cbfa596ef7b11e14c9e39a04a804 Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza Date: Fri, 3 Jul 2026 16:13:38 -0300 Subject: [PATCH] test(embeddings): pin seeded connection to direct egress in route-edge-coverage (#5975 collateral) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #5975 made the embeddings service honor the connection-level proxy. The pre-existing route-edge-coverage embeddings edge-case tests seed an openai connection while the settings-proxy suite has left a provider-level proxy (provider.local:8080) in the shared DATA_DIR that resetStorage() does not clear — inert before #5975, but now the leaked proxy fast-fails the embedding upstream with PROXY_UNREACHABLE. These tests do not exercise proxying, so seedOpenAIConnection now pins the connection to proxyEnabled:false, making resolveProxyForConnection return a direct egress regardless of leaked global proxyConfig. No assertions weakened; 16/16 in the file pass. Regression surfaced by the concurrency=1 full-suite run; passes on #5975's parent, red after it. --- tests/unit/route-edge-coverage.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit/route-edge-coverage.test.ts b/tests/unit/route-edge-coverage.test.ts index c66335782c..7874aa7941 100644 --- a/tests/unit/route-edge-coverage.test.ts +++ b/tests/unit/route-edge-coverage.test.ts @@ -84,6 +84,13 @@ async function seedOpenAIConnection({ errorCode: "refresh_failed", rateLimitedUntil, backoffLevel: 2, + // These embeddings edge-case tests do not exercise proxying. Pin the + // connection to a direct egress (proxy off) so resolveProxyForConnection + // returns "direct" regardless of any global/provider proxyConfig the + // settings-proxy suite left behind in the shared DATA_DIR. Without this, + // #5975 (embeddings now honor the connection-level proxy) makes the leaked + // provider.local:8080 fast-fail the upstream with PROXY_UNREACHABLE. + proxyEnabled: false, }); }