fix: prevent cross-space message contamination in group conversation grouping#5
Merged
ChristopherJHart merged 3 commits intomainfrom Aug 6, 2025
Merged
Conversation
…upingBugFix * Updated message content formatting for better readability. * Revised test docstrings for clarity on message grouping behavior. * Enhanced assertion messages for better debugging context.
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.
Problem
The application was incorrectly grouping messages from different WebEx spaces into the same conversation when they occurred within the same time window. This resulted in conversations that mixed participants and messages from completely unrelated WebEx spaces, making the conversation summaries confusing and inaccurate.
Root Cause
The
group_group_conversationsfunction insummarizer/grouping.pywas processing messages from all group spaces together without first separating them byspace_id. This caused the time-based context window logic to incorrectly group messages across space boundaries.The bug occurred because:
group_all_conversationscorrectly separated DM vs GROUP messagesgroup_group_conversationsas a single listgroup_group_conversationsapplied conversation logic to the mixed list without space separationSolution
Modified
group_group_conversationsto follow the same pattern asgroup_dm_conversations:group_messages_by_space()helper functionChanges Made
Core Fix (
summarizer/grouping.py)group_group_conversationsTest Coverage (
tests/test_grouping.py)test_cross_space_grouping_bug_is_fixedverifies:test_single_space_grouping_still_worksensures:Verification
Impact
This fix ensures that conversation summaries accurately reflect the actual participants and context of each WebEx space, eliminating confusion caused by cross-space message mixing. Users will now see properly isolated conversations that match their actual WebEx space interactions.