Skip to content

fix: MessageFilterAgent preserves strict chronological order - #8204

Open
MOHAMMED WASIM KHAN (wasim-builds) wants to merge 1 commit into
microsoft:mainfrom
wasim-builds:fix/7971-messagefilter-order
Open

MOHAMMED WASIM KHAN (wasim-builds) wants to merge 1 commit into
microsoft:mainfrom
wasim-builds:fix/7971-messagefilter-order

Conversation

@wasim-builds

Copy link
Copy Markdown

Fixes #7971

This PR changes MessageFilterAgent._apply_filter to maintain the original sequence of the messages list rather than grouping them by the order in which sources are declared in per_source. This prevents the message timeline from becoming inverted and guarantees causal ordering for downstream agents.

Added a test test_message_filter_agent_chronological_order to ensure messages are output in chronological order according to their indexes in the initial sequence.

Copilot AI lite review requested due to automatic review settings September 7, 2026 08:04

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

MessageFilterAgent orders filtered messages by per_source config order, not chronological order

2 participants