fix(gateway): derive channel directory platforms from enum instead of hardcoded list - #7450
Merged
Conversation
… hardcoded list Six platforms (matrix, mattermost, dingtalk, feishu, wecom, homeassistant) were missing from the session-based discovery loop, causing /channels and send_message to return empty results on those platforms. Instead of adding them to the hardcoded tuple (which would break again when new platforms are added), derive the list dynamically from the Platform enum. Only infrastructure entries (local, api_server, webhook) are excluded; Discord and Slack are skipped automatically because their direct builders already populate the platforms dict. Reported by sprmn24 in PR #7416.
4 tasks
Tommyeds
pushed a commit
to Tommyeds/hermes-agent
that referenced
this pull request
Apr 12, 2026
… hardcoded list (NousResearch#7450) Six platforms (matrix, mattermost, dingtalk, feishu, wecom, homeassistant) were missing from the session-based discovery loop, causing /channels and send_message to return empty results on those platforms. Instead of adding them to the hardcoded tuple (which would break again when new platforms are added), derive the list dynamically from the Platform enum. Only infrastructure entries (local, api_server, webhook) are excluded; Discord and Slack are skipped automatically because their direct builders already populate the platforms dict. Reported by sprmn24 in PR NousResearch#7416.
luigileap
added a commit
to luigileap/hermes-agent
that referenced
this pull request
Apr 16, 2026
PR NousResearch#7450 replaced the hardcoded session-discovery list in `gateway.channel_directory.build_channel_directory`: for plat_name in ("telegram", "whatsapp", "signal", "weixin", "email", "sms", "bluebubbles"): if plat_name not in platforms: platforms[plat_name] = _build_from_sessions(plat_name) with a dynamic enumeration over the `Platform` enum that excludes only infrastructure entries (`local`, `api_server`, `webhook`). Six platforms that had been missing from the old tuple are now discovered automatically. `test_email_in_session_discovery` was pinned to the old literal source text and grepped for `"email"` inside the function body, so the refactor broke it even though email is still routed through session discovery. Rewrite the test to assert actual behaviour: patch `_build_from_sessions` and `atomic_json_write`, invoke `build_channel_directory({})`, and verify that email is one of the platforms routed through session discovery AND shows up as a top-level key in the returned directory. Source-grep assertions are brittle against refactors like this one.
ciolansteen
pushed a commit
to ciolansteen/hermes-agent
that referenced
this pull request
Apr 26, 2026
Re-applied on top of clean origin/main after iAdrian branch reset: .gitea/workflows/: - sync-from-github.yml — pulls main from GitHub fork into Gitea every 10min - docker-build.yml — builds + pushes hermes-agent image to git.ciolan.net - tests.yml — pytest on PR/push (mirrors GitHub tests.yml subset) - nix.yml — no-op override to prevent upstream nix CI on Gitea .github/workflows/: - sync-upstream.yml — pulls NousResearch/hermes-agent main into iAdrian fork every 10min Replaces the 18 incremental CI commits from the old iAdrian history (all squashed into this single clean commit). All upstream code-level patches (matrix E2EE, Dockerfile-git, channel_directory) are obsolete: upstream shipped equivalent or better fixes (PRs NousResearch#10860, NousResearch#7450), so iAdrian now tracks main exactly minus this CI overlay. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
… hardcoded list (NousResearch#7450) Six platforms (matrix, mattermost, dingtalk, feishu, wecom, homeassistant) were missing from the session-based discovery loop, causing /channels and send_message to return empty results on those platforms. Instead of adding them to the hardcoded tuple (which would break again when new platforms are added), derive the list dynamically from the Platform enum. Only infrastructure entries (local, api_server, webhook) are excluded; Discord and Slack are skipped automatically because their direct builders already populate the platforms dict. Reported by sprmn24 in PR NousResearch#7416.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
… hardcoded list (NousResearch#7450) Six platforms (matrix, mattermost, dingtalk, feishu, wecom, homeassistant) were missing from the session-based discovery loop, causing /channels and send_message to return empty results on those platforms. Instead of adding them to the hardcoded tuple (which would break again when new platforms are added), derive the list dynamically from the Platform enum. Only infrastructure entries (local, api_server, webhook) are excluded; Discord and Slack are skipped automatically because their direct builders already populate the platforms dict. Reported by sprmn24 in PR NousResearch#7416.
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
… hardcoded list (NousResearch#7450) Six platforms (matrix, mattermost, dingtalk, feishu, wecom, homeassistant) were missing from the session-based discovery loop, causing /channels and send_message to return empty results on those platforms. Instead of adding them to the hardcoded tuple (which would break again when new platforms are added), derive the list dynamically from the Platform enum. Only infrastructure entries (local, api_server, webhook) are excluded; Discord and Slack are skipped automatically because their direct builders already populate the platforms dict. Reported by sprmn24 in PR NousResearch#7416.
skappafrost
pushed a commit
to skappafrost/hermes-agent
that referenced
this pull request
Aug 15, 2026
… hardcoded list (NousResearch#7450) Six platforms (matrix, mattermost, dingtalk, feishu, wecom, homeassistant) were missing from the session-based discovery loop, causing /channels and send_message to return empty results on those platforms. Instead of adding them to the hardcoded tuple (which would break again when new platforms are added), derive the list dynamically from the Platform enum. Only infrastructure entries (local, api_server, webhook) are excluded; Discord and Slack are skipped automatically because their direct builders already populate the platforms dict. Reported by sprmn24 in PR NousResearch#7416.
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
Six platforms (matrix, mattermost, dingtalk, feishu, wecom, homeassistant) were missing from the session-based discovery loop in
gateway/channel_directory.py, causing/channelsandsend_messageto return empty results on those platforms.Instead of adding them to the hardcoded tuple (which would break again when new platforms are added), this derives the list dynamically from the
Platformenum. Only infrastructure entries (local,api_server,webhook) are excluded. Discord and Slack are skipped automatically because their direct builders already populate theplatformsdict before the loop runs.Changes
gateway/channel_directory.py: Replace hardcoded 7-platform tuple with dynamic Platform enum iteration (+9/-4 lines)Test results
Salvaged from PR #7416 by @sprmn24 — upgraded from tuple expansion to dynamic enum derivation to prevent recurrence.