Separate instruction parts from different capabilities with a blank line

Merged
DO
3mo ago
+38-44

Summary

Pydantic AI joined every literal instruction block with a single \n while joining rendered
instruction parts with a blank line. The mismatch was invisible until more than one source
contributed a literal block — then independently authored blocks collapsed into one paragraph.
The coder harness hits this: RepoContext, Planning and SubAgents each contribute a block,
and they rendered as one run-on paragraph.

pydantic/pydantic-ai#6887 fixes that (pydantic/pydantic-ai#7595) by giving each source its own
addressable InstructionPart, so InstructionPart.join's blank line now applies uniformly. This
updates the coder integration snapshot to match — a blank line between the three capability blocks,
and nothing else.

Also drops the coder_agent instructions assertion. It read a literal back out of the Agent it
was passed to four lines away in the same module, through a private Pydantic AI attribute — so it
tested the framework's constructor rather than anything about the harness, and it isn't part of the
"model-less and composed" contract the test's name describes. The neighbouring model is None,
name, and capability assertions all use public API and still cover that contract.

No cassette re-recording: tests/coder/conftest.py matches on ['method', 'uri'], so the recorded
responses replay unchanged. Only the snapshot moves.

Blocked on pydantic-ai

Draft until pydantic/pydantic-ai#6887 merges. The snapshot cannot be green against both versions at
once — harness CI resolves pydantic-ai-slim from PyPI (currently 2.33.0, which still renders the
single newline), while pydantic-ai's compat-test overrides it to the PR's checkout. Once #6887 is
on main I'll add the uv.lock pin to that commit in this PR, which makes both green together.

Linked Issue

No harness issue: the defect is in Pydantic AI, tracked at pydantic/pydantic-ai#7595 and fixed by
pydantic/pydantic-ai#6887. Deliberately not using Fixes, since #6887 is what closes that issue.

Checklist

  • Linked issue exists and is referenced above — see note above; the issue lives in pydantic-ai
  • Tests added/updated for new behavior
  • make lint && make typecheck && make test passes locally — tests/test_coder.py passes
    against both 2.33.0 and #6887; the integration snapshot passes only against #6887, by design
  • pyproject.toml and uv.lock are unchanged, or a maintainer added dependencies:approved to the current head
  • Docstrings use single backticks (not RST double backticks)