Preventing Activity.text re-assignment for None value in AgentApplication._remove_mentions - #541
Merged
Rodrigo Brandão (rodrigobr-msft) merged 2 commits intoAug 14, 2026
Conversation
…tion._remove_mentions
Rodrigo Brandão (rodrigobr-msft)
marked this pull request as ready for review
August 14, 2026 17:18
Rodrigo Brandão (rodrigobr-msft)
requested a review
from a team
as a code owner
August 14, 2026 17:18
Copilot started reviewing on behalf of
Rodrigo Brandão (rodrigobr-msft)
August 14, 2026 17:18
View session
tracyboehrer (tracyboehrer)
approved these changes
Aug 14, 2026
Rodrigo Brandão (rodrigobr-msft)
enabled auto-merge (squash)
August 14, 2026 17:20
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a defensive guard in AgentApplication._remove_mentions to avoid re-assigning Activity.text when it is None, preventing text=None from being marked as “set” and subsequently persisted into _SignInState (the failure mode described in issue #537).
Changes:
- Update
_remove_mentionsto only strip recipient mentions whencontext.activity.textis notNone. - Prevent message activities that omit
text(e.g., file uploads) from being “poisoned” by an explicittext=Noneassignment.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Rodrigo Brandão (rodrigobr-msft)
merged commit Aug 14, 2026
a64201f
into
main
10 of 11 checks passed
Rodrigo Brandão (rodrigobr-msft)
deleted the
users/robrandao/remove-mentions
branch
August 14, 2026 17:21
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.
This is a temporary fix to the following issue: #537