Add agentic route ordering integration tests#767
Add agentic route ordering integration tests#767tracyboehrer merged 3 commits intomicrosoft:mainfrom
Conversation
Adds tests that verify agentic route priority through OnTurnAsync dispatch, closing a coverage gap exposed by microsoft/Agent365-dotnet#231 where notification routes registered without isAgenticOnly were deprioritized. - Agentic route beats non-agentic for agentic requests - Two agentic routes at same rank: first match wins - Non-agentic request skips agentic-only routes - AgentExtension.AddRoute propagates isAgenticOnly flag correctly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds integration tests in the Builder test suite to validate that AgentApplication.OnTurnAsync dispatch respects agentic route ordering semantics that downstream extensions (e.g., A365 notifications) depend on.
Changes:
- Adds
OnTurnAsync-level tests asserting agentic routes take priority over non-agentic routes for agentic requests. - Adds tests for same-rank agentic route “first match wins” behavior and for skipping agentic-only routes on non-agentic requests.
- Adds an integration test ensuring
AgentExtension.AddRoute(..., isAgenticOnly: true)propagates the flag and impacts ordering as expected.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Do these do something different than: https://github.com/microsoft/Agents-for-net/blob/main/src/tests/Microsoft.Agents.Builder.Tests/App/ApplicationRouteTests.cs |
|
Good question — there is some overlap, but most of these tests cover behaviors that Genuinely new coverage (3 of 4 tests):
Overlap (1 of 4 tests):
The existing |
Summary
AgentApplication.OnTurnAsyncdispatch, closing a coverage gap exposed by microsoft/Agent365-dotnet#231 where A365 notification routes registered withoutisAgenticOnly: truewere deprioritized by competing generic agentic message handlers.AgentExtension.AddRoutecorrectly propagates theisAgenticOnlyflag.Test plan
🤖 Generated with Claude Code