Log only the error type when `TieredCompaction` skips a tier, and test every default `skip_on` type

Closed
MP
19d ago
+32-20

Stacked on #13624. This addresses the review findings on that PR so they can be reviewed separately. Part of #13106.

  • The warning for a skipped tier now names only the exception type. The full exception text can carry a provider's error body, and the span already records error.type.
  • The skip test is parametrized over all three default skip_on types (ModelAPIError, FallbackExceptionGroup, UnexpectedModelBehavior), so dropping one from the default now fails a test.
  • The new test doubles type ctx as RunContext[None] instead of Any, and the receipt assertion no longer needs an Any annotation.

Harness only (pydantic_ai_harness plus tests).

Checklist

  • No breaking changes in accordance with the version policy.
  • Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
  • PR title is fit for the release changelog.

Summary by cubic

Logs only the exception type name when TieredCompaction skips a failing tier, instead of the full exception text, which can carry a provider's error body. The span already records error.type.

  • Parameterizes the skip test over the three default skip_on types (ModelAPIError, FallbackExceptionGroup, UnexpectedModelBehavior) so dropping one from the defaults now fails a test.
  • Types the tiers' ctx as RunContext[None] and removes the Any annotation from the receipt assertion.