fix: update group conversation logic to include authenticated user pa…#6
Merged
ChristopherJHart merged 2 commits intomainfrom Aug 6, 2025
Merged
Conversation
…rticipation * Modified `group_group_conversations` to accept `user_id` and check if the user participated in the conversation. * Updated tests to reflect changes in user identifiers and ensure correct grouping behavior based on user participation. * Added a test to prevent conversation leaks when the authenticated user is not a participant.
…upingBugFix * Revised comments and docstrings for clarity and conciseness. * Enhanced assertion messages to provide better context during test failures. * Adjusted message content in assertions for improved readability.
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.
Summary
Fixes a critical bug where conversations were displayed to users even when they were not participants in those conversations. This was caused by incorrect user ID handling in the group conversation filtering logic.
Problem
The application was showing conversations from Webex spaces where the authenticated user was not a participant, creating a leak.
Root Cause
The bug was in
group_group_conversations()function insummarizer/grouping.pyat line 275:This incorrectly used the first message sender's ID as the "authenticated user ID" instead of the actual authenticated user's ID, causing the participation filtering logic to fail.
Solution
Core Fix
user_idparameter togroup_group_conversations()group_all_conversations()to pass the authenticated user's IDAdditional Improvements
test_non_participant_conversation_leak_bug()that specifically reproduces and validates the fix for this privacy issueTesting
test_non_participant_conversation_leak_bugspecifically validates the fixFiles Changed
summarizer/grouping.py: Core bug fix and function signature updatetests/test_grouping.py: New test case, PII removal, and test updatesImpact
Validation
The fix ensures that:
This resolves the reported issue where conversations were being displayed to users who were not participants in those conversations.