Repository navigation
fix(nix): load google_chat platform under Nix - #27077
milanglacier wants to merge 1 commit into
Conversation
Honor HERMES_BUNDLED_PLUGINS when scanning bundled platform plugins so google_chat resolves before adapter import in packaged installs.
This comment was marked as spam.
This comment was marked as spam.
|
Thanks for the targeted Nix fix. I verified the premise against the current checkout: gateway/config.py:217 still scans only the repo-relative plugins/platforms path, while hermes_cli/plugins.py:55-65 and nix/hermes-agent.nix:180 already use HERMES_BUNDLED_PLUGINS for bundled plugin discovery. The failure path is also real: plugins/platforms/google_chat/adapter.py:119 imports Platform and plugins/platforms/google_chat/adapter.py:129 calls Platform("google_chat") during plugin import, and hermes_cli/plugins.py:1589-1593 logs the reported “Failed to load plugin” warning when import raises. Problems
Suggested changes
This is an automated hermes-sweeper review. |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused Nix packaging fix. The premise still holds on current main: gateway/config.py:290-308 scans only the repository-relative plugins/platforms, while the Nix wrapper exports the installed tree through HERMES_BUNDLED_PLUGINS at nix/hermes-agent.nix:166-180. The proposed resolution matches the established loader behavior in hermes_cli/plugins.py:55-65.
Problems
- The PR changes the dynamic-enum discovery path without a regression test.
tests/gateway/test_google_chat.py:23-28resolvesPlatform("google_chat"), but does not exercise a Nix-styleHERMES_BUNDLED_PLUGINSdirectory or reset the scanner cache.
Suggested changes
- Add a focused test using a temporary
plugins/platforms/google_chatmanifest tree, setHERMES_BUNDLED_PLUGINS, clear_Platform__bundled_plugin_names, and assertPlatform("google_chat")resolves before adapter import. Cover the unset override retaining repository-relative discovery as well.
This is an automated hermes-sweeper review.
| Keep this scanner aligned with the main plugin loader so dynamic | ||
| platform enum members are available before plugin adapters import. | ||
| """ | ||
| names: set = set() |
There was a problem hiding this comment.
Please add a regression test for this packaged-path branch: create a temporary plugins/platforms/google_chat manifest tree, set HERMES_BUNDLED_PLUGINS, reset the module-level bundled-name cache, and assert Platform("google_chat") resolves before adapter import.
Problem
When starting hermes gateway under nix, get this warning:
Summary
Verification