Skip to content

fix: search all sources by default in session_search#1892

Merged
teknium1 merged 2 commits intomainfrom
hermes/hermes-562a3784
Mar 18, 2026
Merged

fix: search all sources by default in session_search#1892
teknium1 merged 2 commits intomainfrom
hermes/hermes-562a3784

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Summary

Salvage of PR #1817 by @someoneexistsontheinternet (cherry-picked with authorship preserved), plus a follow-up fix.

Original PR #1817: Added acp to the hardcoded default source_filter in search_messages(), fixing ACP sessions being invisible to session_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=None now means "search all sources." Callers can still pass an explicit source_filter to narrow results.

Changes

  • hermes_state.py: Remove hardcoded default source_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 default

Test plan

  • python -m pytest tests/test_hermes_state.py -n0 -q — 115 passed
  • Full suite — 5316 passed (24 pre-existing failures in test_delegate.py)
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants