Fix #686 - Clarify decision logic around agentic route selection#701
Merged
tracyboehrer merged 1 commit intomainfrom Oct 21, 2025
Merged
Fix #686 - Clarify decision logic around agentic route selection#701tracyboehrer merged 1 commit intomainfrom
tracyboehrer merged 1 commit intomainfrom
Conversation
…ress potential confuson
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR clarifies the boolean logic for agentic route selection by making the implicit condition explicit. The change transforms !isAgenticRoute || context.activity.isAgenticRequest() into !isAgenticRoute || (isAgenticRoute && context.activity.isAgenticRequest()) throughout the codebase to make the logic more readable and easier to understand.
Key Changes
- Expanded the boolean expression in route selection logic to explicitly show that
isAgenticRequest()is only evaluated whenisAgenticRouteis true - Applied this clarification consistently across all route selector functions in the AgentApplication class
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ceciliaavila
approved these changes
Oct 21, 2025
tracyboehrer
approved these changes
Oct 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I thought the syntax of the route selection logic was a bit confusing, so I expanded it.
Previously it was
!isAgenticRoute || Activity.isAgenticRequest
The right hand side implies isAgenticRoute is true AND the request isAgentic. The invisible isAgenticRoute was confusing to my simple mortal brain so I put it in.