Skip to content

test(a2a): cover input_required and auth_required as non-terminal states - #7215

Open
vishal-bulbule wants to merge 1 commit into
google:mainfrom
vishal-bulbule:test/a2a-non-terminal-states
Open

vishal-bulbule wants to merge 1 commit into
google:mainfrom
vishal-bulbule:test/a2a-non-terminal-states

Conversation

@vishal-bulbule

Copy link
Copy Markdown

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

  • N/A

2. Or, if no issue exists, describe the change:

This is the follow-up test a maintainer asked for in
#6872:
"input_required and auth_required still aren't covered by tests, so a small pull request for
those is welcome."

Problem:

aef3a9c set skip_summarization for terminal A2A task states (completed, failed, canceled).
The tests for non-terminal states covered only submitted and working, so nothing checked
that input_required and auth_required, which pause a task for the user, do not mark the
converted event as a final response.

Solution:

Add TS_INPUT_REQUIRED and TS_AUTH_REQUIRED to the existing
test_convert_a2a_task_to_event_non_terminal_state_does_not_set_skip_summarization
parametrization in both tests/unittests/a2a/converters/test_to_adk.py and
tests/unittests/a2a/converters/test_event_converter.py. Test-only change.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

The new cases pass on main, and fail if either state is treated as terminal in
to_adk_event.py / event_converter.py (checked by temporarily adding them to the terminal
set):

$ pytest tests/unittests/a2a/converters -k non_terminal_state
8 passed
(with input_required/auth_required added to the terminal set: 4 failed, 4 passed)
$ pytest tests/unittests/a2a tests/unittests/integrations/agent_registry/test_agent_registry.py  (a2a-sdk 0.3.26)
807 passed

$ pytest tests/unittests -n auto
15291 passed, 1 failed

$ tox   (Python 3.10, 3.11, 3.12, 3.13, 3.14)
py310: 15225 passed, 1 failed
py311: 15234 passed, 1 failed
py312: 15225 passed, 1 failed
py313: 15225 passed, 1 failed
py314: 15225 passed, 1 failed

The one failing test below, test_import_loading.py::test_entry_point_loads_only_allowlisted_packages[agent],
also fails on main (d57c84f) and is unrelated to this change; #7214 fixes it.

Manual End-to-End (E2E) Tests:

N/A, test-only change.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas. (N/A, test-only)
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end. (N/A, test-only)
  • Any dependent changes have been merged and published in downstream modules. (N/A)

The skip_summarization tests for converted A2A tasks checked only submitted
and working as non-terminal states. Add input_required and auth_required,
which pause a task for the user and must not mark the converted event as a
final response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants