Commit 5606849
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 9f8126e commit 5606849
4 files changed
Lines changed: 1141 additions & 4 deletions
File tree
- .github/workflows
- tests/lib/core/harness
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
0 commit comments