Skip to content

feat: Raise exceptions on invalid behavior of AgentExectuor.#969

Closed
bartek-w wants to merge 1 commit into1.0-devfrom
bartekw-task-restore
Closed

feat: Raise exceptions on invalid behavior of AgentExectuor.#969
bartek-w wants to merge 1 commit into1.0-devfrom
bartekw-task-restore

Conversation

@bartek-w
Copy link
Copy Markdown
Collaborator

@bartek-w bartek-w commented Apr 14, 2026

Printing error when AgentExecutor returns TaskStatusUpdateEvent instead of Task as a first message. Additionally TaskStatusUpdateEvent is replaced with Task objected as event.

Fixes #965

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 14, 2026

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

Base PR Delta
src/a2a/server/agent_execution/active_task.py 95.57% 95.39% 🔴 -0.17%
Total 92.59% 92.58% ⚪️ -0.00%

Generated by coverage-comment.yml

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refines task event processing and restoration logic to ensure protocol compliance, specifically by guaranteeing the first event in a stream is a Task object. It also updates documentation and adds integration tests for terminal and input-required task states. Feedback focuses on simplifying the task replacement logic in active_task.py and expanding test helper functions to handle more event types, which improves the consistency and robustness of the test suite.

Comment thread src/a2a/server/agent_execution/active_task.py Outdated
Comment thread tests/integration/test_scenarios.py
Comment thread tests/integration/test_scenarios.py
Comment thread tests/integration/test_scenarios.py Outdated
@bartek-w bartek-w changed the title Additonal tests for request handlers. feat: Additonal tests for request handlers. Apr 14, 2026
@bartek-w bartek-w force-pushed the bartekw-task-restore branch 3 times, most recently from 916c406 to e4debd7 Compare April 14, 2026 12:40
@bartek-w bartek-w force-pushed the bartekw-task-restore branch from e4debd7 to f2b41d0 Compare April 17, 2026 08:26
@bartek-w bartek-w changed the title feat: Additonal tests for request handlers. feat: Raise exceptions on invalid behavior of AgentExectuor. Apr 17, 2026
@bartek-w bartek-w closed this Apr 17, 2026
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.

1 participant