Skip to content

Commit 74394c5

Browse files
aringuyen3claude
andcommitted
fix(ci): pin the tutorial agents to the local server explicitly
The tutorial tests passed only because the generated client defaulted to http://localhost:5003. The tutorials' test clients pass base_url explicitly, but the AGENTS do not: the ADK builds Agentex() and AsyncAgentex() with no arguments, so they fall back to ENVIRONMENTS["production"] in _client.py. That default is wrong, and it shipped. agentex-client 0.28.1 on PyPI carries "production": "http://localhost:5003", so every user calling Agentex() is pointed at their own machine. This trunk already corrects it to https://agentex.sgp.scale.com, matching stainless.yml -- which is why 19 tutorial legs fail on the promote branch while the identical suite passes on the production trunk (33 passed, 0 failed, dispatched as a baseline to check exactly this). So the promote fixes a real bug and these tests were encoding it as expected behaviour. Pin the local server explicitly rather than reverting the fix. Agents are plain subprocesses of run_agent_test.sh and inherit the step environment. The variable name matters: the SDK reads AGENTEX_BASE_URL, while the AGENTEX_API_BASE_URL already on the command line is a separate variable that only the tutorials' own test files read. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent bc1a463 commit 74394c5

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎.github/workflows/agentex-tutorials-test.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,21 @@ jobs:
169169
CLAUDE_LIVE_TESTS: ${{ contains(matrix.tutorial, 'claude_code') && '1' || '' }}
170170
CODEX_LIVE_TESTS: ${{ contains(matrix.tutorial, 'codex') && '1' || '' }}
171171
HEALTH_CHECK_PORT: 8080 # Use non-privileged port for temporal worker health checks
172+
# The tutorials' TEST clients pass base_url explicitly, but the AGENTS do not: the
173+
# ADK builds Agentex()/AsyncAgentex() with no arguments, so they fall back to
174+
# ENVIRONMENTS["production"] in the generated _client.py. That default used to be
175+
# http://localhost:5003, which made these tests pass by accident -- and is a real
176+
# bug in the published package (agentex-client 0.28.1 ships
177+
# "production": "http://localhost:5003", pointing every caller of Agentex() at
178+
# their own machine). This trunk corrects it to the real production URL, so pin the
179+
# local server explicitly here rather than depending on a default that should never
180+
# have been a dev address. Agents are plain subprocesses of run_agent_test.sh and
181+
# inherit this.
182+
#
183+
# Name matters: the SDK reads AGENTEX_BASE_URL. The AGENTEX_API_BASE_URL set on the
184+
# command line below is a different variable, read only by the tutorials' own test
185+
# files, and never reaches the SDK.
186+
AGENTEX_BASE_URL: http://localhost:5003
172187
run: |
173188
echo "Testing tutorial: ${{ matrix.tutorial }}"
174189
AGENTEX_API_BASE_URL="http://localhost:5003" \

0 commit comments

Comments
 (0)