Files
Shangjie Chen 99179223d0
Continuous Integration / Pre-commit Linter (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.10) (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.11) (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.12) (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.13) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.10) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.11) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.12) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.13) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.14) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.10) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.11) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.12) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.13) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.14) (push) Waiting to run
Copybara PR Handler / close-imported-pr (push) Waiting to run
fix: Guard invocation_context.branch assignment against mock SessionService instances
When running with a mocked `SessionService` whose `append_event` returns a `Mock`
object, `user_event.branch` dynamically evaluates to an `AsyncMock`/`MagicMock`
instead of `None` or a `str`. Guarding with `isinstance(..., str)` ensures
`invocation_context.branch` is only updated when a real string branch is
present, preventing downstream Pydantic validation and Proto conversion errors.

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 970212560
2026-08-24 18:30:15 -07:00
..