Skip to content

Preventing Activity.text re-assignment for None value in AgentApplication._remove_mentions - #541

Merged
Rodrigo Brandão (rodrigobr-msft) merged 2 commits into
mainfrom
users/robrandao/remove-mentions
Aug 14, 2026
Merged

Preventing Activity.text re-assignment for None value in AgentApplication._remove_mentions#541
Rodrigo Brandão (rodrigobr-msft) merged 2 commits into
mainfrom
users/robrandao/remove-mentions

Conversation

@rodrigobr-msft

Copy link
Copy Markdown
Contributor

This is a temporary fix to the following issue: #537

Copilot AI lite review requested due to automatic review settings August 14, 2026 17:18
@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) marked this pull request as ready for review August 14, 2026 17:18

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.

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_mentions to only strip recipient mentions when context.activity.text is not None.
  • Prevent message activities that omit text (e.g., file uploads) from being “poisoned” by an explicit text=None assignment.

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

@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) merged commit a64201f into main Aug 14, 2026
10 of 11 checks passed
@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) deleted the users/robrandao/remove-mentions branch August 14, 2026 17:21
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.

3 participants