From d702bcfae26e58fb6b087d6effebcc9c34c091b0 Mon Sep 17 00:00:00 2001 From: majdyz Date: Sat, 11 Apr 2026 08:34:38 +0000 Subject: [PATCH] test(copilot/sdk-compat): skip bare-CLI reproduction when proxy enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When `claude_agent_use_compat_proxy=True` the operator has explicitly opted into the workaround. The bare-CLI reproduction stops being a useful signal in that mode — what matters is the *upstream* (post- proxy) staying clean, which is covered by `test_cli_via_compat_proxy_emits_clean_requests_to_upstream`. Skip the bare test in that case so the dev-preview branch (0.1.58 + proxy on) goes fully green instead of having an intentional-but-loud failure on every CI run. When the proxy is disabled (the default on the standalone proxy and plumbing PRs), the bare test continues to run unchanged and serves as the regression detector for the bundled CLI version. --- .../copilot/sdk/cli_openrouter_compat_test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/autogpt_platform/backend/backend/copilot/sdk/cli_openrouter_compat_test.py b/autogpt_platform/backend/backend/copilot/sdk/cli_openrouter_compat_test.py index f66dad0800..8ae25b7131 100644 --- a/autogpt_platform/backend/backend/copilot/sdk/cli_openrouter_compat_test.py +++ b/autogpt_platform/backend/backend/copilot/sdk/cli_openrouter_compat_test.py @@ -484,7 +484,23 @@ async def test_cli_does_not_send_openrouter_incompatible_features(): this passes naturally. On a broken pin (0.1.55+, bundled CLI 2.1.91+) it fails — that failure IS the bisect signal we use to verify which SDK versions need the workaround. + + Skipped when ``claude_agent_use_compat_proxy=True`` because in that + configuration the operator has explicitly opted into the workaround + and the bare-CLI behaviour is moot — what matters is that the + *upstream* (post-proxy) sees clean requests, which is covered by + ``test_cli_via_compat_proxy_emits_clean_requests_to_upstream``. """ + from backend.copilot.config import ChatConfig + + if ChatConfig().claude_agent_use_compat_proxy: + pytest.skip( + "Compat proxy is enabled in the active config — the bare-CLI " + "reproduction is not a meaningful signal here. The proxy-routed " + "variant `test_cli_via_compat_proxy_emits_clean_requests_to_upstream` " + "is the regression guard for this configuration." + ) + returncode, _stdout, stderr, captured = await _run_reproduction( route_through_proxy=False )