diff --git a/src/razorback/agents/proxy.py b/src/razorback/agents/proxy.py index 2a44ea83..9b9e4814 100644 --- a/src/razorback/agents/proxy.py +++ b/src/razorback/agents/proxy.py @@ -1,16 +1,14 @@ -# ABOUTME: HTTP egress block — verbatim from run_experiment.py:1497-1525. -# ABOUTME: NO_PROXY exempts the anthropic + statsig + openai + pypi hosts the claude CLI needs. +# ABOUTME: HTTP egress block derived from run_experiment.py:1497-1525. +# ABOUTME: NO_PROXY exempts the API, package, and dbt registry hosts agents need. -# Verbatim copy of run_experiment.py:1509-1513. DO NOT paraphrase the host list — the smoke -# test (Task 1) asserts the path works with EXACTLY these hosts. PROXY_EXEMPT_HOSTS = ( ".anthropic.com,api.anthropic.com,statsig.anthropic.com," "featuregates.org,.statsig.com," ".openai.com,api.openai.com,auth.openai.com,chatgpt.com," - "pypi.org,files.pythonhosted.org,pypi.python.org" + "pypi.org,files.pythonhosted.org,pypi.python.org," + "hub.getdbt.com,codeload.github.com" ) -# Verbatim copy of run_experiment.py:1515-1525. PROXY_BLOCK_ENV: dict[str, str] = { "HTTP_PROXY": "http://127.0.0.1:1", "HTTPS_PROXY": "http://127.0.0.1:1", diff --git a/tests/unit/test_docker_environment_proxy_separation.py b/tests/unit/test_docker_environment_proxy_separation.py index 835c4f99..b9da06b8 100644 --- a/tests/unit/test_docker_environment_proxy_separation.py +++ b/tests/unit/test_docker_environment_proxy_separation.py @@ -12,6 +12,12 @@ from razorback.environments.docker import ProxySeparatedDockerEnvironment +def test_proxy_exempt_hosts_include_external_package_registries() -> None: + exempt_hosts = PROXY_EXEMPT_HOSTS.split(",") + assert "hub.getdbt.com" in exempt_hosts + assert "codeload.github.com" in exempt_hosts + + class _Process: returncode = 0