From c8b17ea1ad582929fc525bb7cc19e4ca629a60d0 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Thu, 30 Apr 2026 13:32:00 -0700 Subject: [PATCH] fix(harness): install httpx for replay Python evals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit peer-discovery-404 imports workspace/a2a_client.py which depends on httpx; the runner's stock Python doesn't have it, so the replay's PARSE assertion (b) fails with ModuleNotFoundError on every run. The WIRE assertion (a) — pure curl — passes, so the failure was masking just enough to make the replay LOOK partially-broken when the tenant side is fine. Adding tests/harness/requirements.txt with only httpx instead of sourcing workspace/requirements.txt: that file pulls a2a-sdk, langchain-core, opentelemetry, sqlalchemy, temporalio, etc. — ~30s of install for one replay's PARSE step. The harness's deps surface should grow when a new replay introduces a new import, not by default. Workflow gains one step (`pip install -r tests/harness/requirements.txt`) between the /etc/hosts setup and run-all-replays. No other changes. --- .github/workflows/harness-replays.yml | 9 +++++++++ tests/harness/requirements.txt | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tests/harness/requirements.txt diff --git a/.github/workflows/harness-replays.yml b/.github/workflows/harness-replays.yml index 384b8567..6330e885 100644 --- a/.github/workflows/harness-replays.yml +++ b/.github/workflows/harness-replays.yml @@ -116,6 +116,15 @@ jobs: echo "127.0.0.1 harness-tenant.localhost" | sudo tee -a /etc/hosts >/dev/null getent hosts harness-tenant.localhost + - name: Install Python deps for replays + # peer-discovery-404 (and future replays) eval Python against the + # running tenant — importing workspace/a2a_client.py pulls in + # httpx. tests/harness/requirements.txt holds just the HTTP-client + # surface to keep CI install fast (~3s) vs the full + # workspace/requirements.txt (~30s). + if: needs.detect-changes.outputs.run == 'true' + run: pip install -r tests/harness/requirements.txt + - name: Run all replays against the harness # run-all-replays.sh: boot via up.sh → seed via seed.sh → run # every replays/*.sh → tear down via down.sh on EXIT (trap). diff --git a/tests/harness/requirements.txt b/tests/harness/requirements.txt new file mode 100644 index 00000000..75a30722 --- /dev/null +++ b/tests/harness/requirements.txt @@ -0,0 +1,14 @@ +# Harness-replay Python deps — minimal set for replays/*.sh scripts that +# eval Python against the running tenant (e.g. importing +# workspace/a2a_client.py to assert parser behavior). +# +# This is intentionally smaller than workspace/requirements.txt: the +# replays don't need a2a-sdk, langchain, opentelemetry, etc. — only the +# HTTP client surface that the imported helpers depend on. Adding the +# full workspace deps would slow every harness CI run by ~30s for no +# gain. +# +# Add a line here (with a version constraint matching workspace/requirements.txt) +# when a new replay introduces a new Python import. + +httpx>=0.28.1