Test `pydantic-ai-harness` and `pydantic-clai2` in CI

Merged
KL
2mo ago
+837-6251

Sixth step of integrating the imported packages: run their suites in CI. This also fixes main's all-extras jobs, which now install the workspace harness without its extras and fail to import pydantic_monty.

CI (ci.yml)

  • Harness is no longer installed from PyPI outside the lock (PYDANTIC_AI_HARNESS_VERSION is gone).
  • quality, all-extras and lowest-versions install with --all-packages.
  • New pydantic-ai-harness and pydantic-clai2 test cells, each scoped to its own suite. Blockbuster is off for both until #8821.
  • The harness MongoDB, Redis and LocalStack integration jobs, with LocalStack disabled until its secret is set (#8824). Matching make integration-* targets.
  • PYRIGHT_TIME_BUDGET goes from 150 to 200: type-checking the extra packages took a passing run to 156 s.
  • Absolute COVERAGE_PROCESS_START and COVERAGE_FILE, so subprocesses that clai2 tests start in a temporary directory still report coverage.

Tests

  • Temporal and DBOS tests pinned to xdist groups.
  • Explicit anyio markers the root config does not add.
  • Waits instead of assumed event-loop ticks.
  • A closed SQLite connection.
  • Timing assertions with headroom.
  • The Code Mode relay fixture bounds its shutdown and kills the relay if it ignores SIGTERM.
  • Skips tracked in #8824, and the 3.10 skip for #8822.

Source

  • clai2's warm-import thread is no longer a daemon, so a quick /exit cannot finalize the interpreter mid-import.
  • Its .mcp.json model no longer relies on pydantic accepting an aliased field by its name.

Not here: the docs/harness snippet fixes for tests/test_examples.py, and coverage include for the harness and clai2 sources. Those are the next PRs.

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.

https://claude.ai/code/session_01HKXuFHr6tR2bitvi7iP4ZF