fix: search all sources by default in session_search#1892
Merged
Conversation
The default source_filter was a hardcoded list that silently excluded any platform not explicitly listed. Instead of maintaining an ever-growing allowlist, remove it entirely so all sources are searched by default. Callers can still pass source_filter explicitly to narrow results. Follow-up to cherry-picked PR #1817.
1 task
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
Salvage of PR #1817 by @someoneexistsontheinternet (cherry-picked with authorship preserved), plus a follow-up fix.
Original PR #1817: Added
acpto the hardcoded defaultsource_filterinsearch_messages(), fixing ACP sessions being invisible tosession_search.Follow-up fix: Removed the hardcoded allowlist entirely. The old default list (
cli, telegram, discord, whatsapp, slack) silently excluded sessions from signal, mattermost, matrix, homeassistant, email, sms, dingtalk, api_server, and acp. Instead of maintaining an ever-growing allowlist,source_filter=Nonenow means "search all sources." Callers can still pass an explicitsource_filterto narrow results.Changes
hermes_state.py: Remove hardcoded defaultsource_filter; make source filtering conditional (only applied when explicitly provided)tests/test_hermes_state.py: Keep contributor's ACP regression test + add new test verifying all platforms are searched by defaultTest plan
python -m pytest tests/test_hermes_state.py -n0 -q— 115 passed