Skip to content

Commit aaf659e

Browse files
declan-scaleclaude
andcommitted
test(pydantic-ai): sync/async/temporal integration agents + enable CI live-matrix rows
Add 3 offline integration tests (TestModel + fake streaming/tracing, no API keys or live infra needed) that prove the unified harness surface is correctly wired for each delivery channel: - test_harness_pydantic_ai_sync.py — yield_turn path (12 tests): event ordering (tool_request before tool_response before text), accumulated text, Start/Done pairing, SpanDeriver wiring (OpenSpan/CloseSpan for tool calls on sync path). - test_harness_pydantic_ai_async.py — auto_send_turn path (13 tests): message ordering, ToolRequestContent/ToolResponseContent content verification, matching tool_call_ids, final_text, context open/close lifecycle; documents that span derivation is suppressed when coalesce_tool_requests=True (AGX1-377 note). - test_harness_pydantic_ai_temporal.py — TemporalAgent event_stream_handler path (12 tests + 1 intentional skip): drives TemporalAgent.run_stream_events offline, feeds into _fake_stream_pydantic_ai_events (PydanticAITurn + UnifiedEmitter with injected FakeStreaming), asserts same canonical message order; skip placeholder documents what requires live Temporal+Redis infra. Enable harness-integration.yml live-matrix job (was `if: false`) with a 3-way matrix over [sync, async, temporal], each running its test file via ./scripts/test. Add test file glob to PR path trigger so the workflow re-runs when tests change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 705ad34 commit aaf659e

4 files changed

Lines changed: 1141 additions & 4 deletions

File tree

.github/workflows/harness-integration.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
paths:
88
- "src/agentex/lib/core/harness/**"
99
- "src/agentex/lib/adk/_modules/**"
10+
- "tests/lib/core/harness/test_harness_pydantic_ai_*.py"
1011
- ".github/workflows/harness-integration.yml"
1112

1213
jobs:
@@ -31,10 +32,28 @@ jobs:
3132
- name: Conformance suite
3233
run: ./scripts/test tests/lib/core/harness/ -v
3334

34-
# Live integration matrix (harness x {sync, async, temporal}) is added per-harness
35-
# in the migration plans. Placeholder job keeps the workflow valid until then.
35+
# Offline pydantic-ai integration tests (sync / async / temporal channels).
36+
# These use pydantic-ai TestModel + fake streaming/tracing and require no live
37+
# infrastructure. Enabled here for PR 4 (pydantic-ai migration). Future harness
38+
# migration PRs (5-8) should add their integration-test paths to this matrix.
3639
live-matrix:
3740
runs-on: ubuntu-latest
38-
if: false # enabled once the first harness's test agents land
41+
strategy:
42+
matrix:
43+
channel: [sync, async, temporal]
44+
fail-fast: false
45+
name: pydantic-ai-${{ matrix.channel }}
3946
steps:
40-
- run: echo "populated by migration PRs" # TODO(harness-migration): enable per-harness; see docs/superpowers/plans migration PRs 4-8
47+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
48+
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
51+
with:
52+
version: '0.10.2'
53+
54+
- name: Bootstrap
55+
run: ./scripts/bootstrap
56+
57+
- name: pydantic-ai ${{ matrix.channel }} integration tests (offline, TestModel)
58+
run: |
59+
./scripts/test tests/lib/core/harness/test_harness_pydantic_ai_${{ matrix.channel }}.py -v

0 commit comments

Comments
 (0)