Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/razorback/agents/proxy.py
Original file line number Diff line number Diff line change
@@ -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.
Comment on lines +1 to +2

# 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",
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/test_docker_environment_proxy_separation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down