Agent Sandbox Registry

python-sdk

Local server HTTP end-to-end tests

无中文版

e2e/server-http.md

Local server HTTP end-to-end tests

test_server_http_e2e.py starts a real python -m agent_sandbox.server serve subprocess on 127.0.0.1 and an ephemeral port, then sends HTTP from a separate client. A raw socket is used only for GET /v1/responses with Upgrade: websocket. Handlers are not called in-process.

No cloud credentials, API keys, or the published codex / qwen binaries. The process puts local programs named codex and qwen on PATH (each prints one JSON line) and sets ABX_SERVER_ENABLED_GROUPS=agents. PYTHONPATH is server-sdk/src. Traffic stays on localhost.

Run

From python-sdk/e2e (the cloud conftest.py skips every test in this directory when ABX_SANDBOX_API_KEY is unset, so this file is run with --noconftest):

cd e2e
PYTHONPATH=../server-sdk/src python3 -m pytest test_server_http_e2e.py --noconftest -ra

The subprocess is sys.executable -m agent_sandbox.server serve (the same interpreter that runs pytest).

Skipped cases

A product failure on any other case stays a failed assertion. The server sources are not edited to make a case pass.