Skip to content

Adding end_of_conversation route hook to AgentApplication - #599

Open
Rodrigo Brandão (rodrigobr-msft) wants to merge 2 commits into
mainfrom
users/robrandao/end-of-conv-route
Open

Rodrigo Brandão (rodrigobr-msft) wants to merge 2 commits into
mainfrom
users/robrandao/end-of-conv-route

Conversation

@rodrigobr-msft

@rodrigobr-msft Rodrigo Brandão (rodrigobr-msft) commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

This pull request introduces support for handling "end of conversation" activities in the agent application, along with comprehensive tests to verify the new functionality. The most important changes are grouped below:

New Feature: End-of-Conversation Activity Handling

  • Added an end_of_conversation method to the AgentApplication class, allowing developers to register handlers for end-of-conversation activities as decorators or methods. This method supports optional authorization handlers and additional route configuration.

Testing Enhancements

  • Added the TestEndOfConversationRoute test class to verify the behavior of the new end_of_conversation route. Tests ensure that:
    • The handler is called for end-of-conversation activities and receives the correct activity code.
    • The handler is not called for other activity types.
    • The decorator returns the original handler function.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The new blob integration test imports A2A modules and a test helper that do not exist, causing pytest collection to fail.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Adds an end_of_conversation route helper and related route and A2A persistence tests.

Changes:

  • Adds the end-of-conversation route decorator.
  • Tests route matching and handler invocation.
  • Adds blob-backed A2A persistence and pagination integration tests.
File Description
agent_application.py Adds the route helper.
test_agent_application_routes.py Tests end-of-conversation routing.
test_blob_protocol.py Tests blob-backed A2A task persistence and pagination.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/hosting_a2a/integration/test_blob_protocol.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The implementation is sound, but the PR’s promised blob integration tests are missing.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Resolved since last review (1)

Comment thread tests/hosting_core/app/test_agent_application_routes.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused implementation correctly reuses existing routing behavior and includes adequate tests.

Review effort: Balanced
Findings: None

Resolved since last review (1)

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