Floor on released `pydantic-ai` 2.36.0 and drop the version straddle

Merged
DO
3mo ago
+111-67

pydantic-ai 2.36.0 is out, so the two tests written to hold across that release while it was unreleased (#698) can assert the real thing.

2.36.0 attributes each instruction to the source that contributed it. That gives this package two things it wants: the instruction parts its capabilities contribute are separated by a blank line rather than running together into one paragraph (pydantic-ai#7595), and each part carries an InstructionId an application can address to override it.

  • tests/test_coder.py reads SourcedInstruction attributes directly instead of through getattr, and drops the hasattr probe and both # pragma: no cover version branches.
  • tests/coder/test_coder_integration.py records the prompt as it is actually sent. collapsed_instructions flattened every run of newlines on both sides so one recording could hold across the bump, which also flattened the blank lines inside a part's own text -- so the snapshot read more tightly than what the model received.

Seeing the prompt as sent immediately turned up a defect the collapsing had been hiding, fixed in the second commit: render_context_file puts </context-file> on its own line, so a context file whose content ends with a newline -- which is every file that ends the way a text file should -- got a blank line before the closing tag. It appeared fourteen times in the regenerated snapshot. tests/repo_context/test_repo_context.py now covers it directly.

The cassette is unchanged: vcr_config matches on method and uri, and the compared value is built locally from result.all_messages().

Full suite passes with nothing else re-snapshotted.