fix(plugins): include platforms/ namespace in bundled platform plugin keys#28160
Conversation
BoardJames-Bot
left a comment
There was a problem hiding this comment.
Reviewed by Hermes Agent. The diff itself looks reasonable and the focused plugin tests pass locally (63 passed), but GitHub currently reports this PR as CONFLICTING against main. I am leaving a comment instead of approval/merge: please rebase or resolve the conflicts, then it can be re-reviewed. BoardJames-Bot also has pull-only repo permission, so I cannot merge even after conflicts are resolved.
|
Rebased/salvaged this locally. The fix itself is good, but the current PR is non-mergeable/conflicting against main. I opened a clean replacement here: #28178. Verification on the replacement branch: scripts/run_tests.sh tests/hermes_cli/test_plugins.py -> 73 passed. |
… keys Bundled gateway platform plugins under plugins/platforms/<name>/ were discovered with keys derived from the manifest name (e.g. teams-platform) instead of the path-derived namespaced key (e.g. platforms/teams). This broke config entries in plugins.enabled / plugins.disabled that use canonical namespaced keys, because the discovery key did not match. Pass prefix='platforms' to _scan_directory_level() when scanning the platforms directory so keys are computed as platforms/<dir_name>. Closes NousResearch#27548
|
Superseded by #28179, which applies the same fix cleanly on current main. |
a0cede1 to
22c79a0
Compare
Rebased onto latest
|
|
Closing — this is a duplicate of #27240 by @felix-windsor, which was opened first and carries a cleaner focused diff. Apologies for the overlap; our duplicate-PR search missed it because #27240 doesn't reference the issue number in its title or body. |
What does this PR do?
Fixes a bug where bundled gateway platform plugins under
plugins/platforms/<name>/(e.g.,plugins/platforms/teams/) were discovered with keys derived from the manifestnamefield (e.g.,teams-platform) instead of the path-derived namespaced key (e.g.,platforms/teams).This broke
plugins.enabled/plugins.disabledconfig entries that use canonical namespaced keys, and was inconsistent with the plugin manager's key model for namespaced plugins (image_gen/openai,web/tavily, etc.).The fix passes
prefix="platforms"to_scan_directory_level()when scanning the bundled platforms directory so plugin keys are computed asplatforms/<dir_name>.Related Issue
Fixes #27548
Type of Change
Changes Made
hermes_cli/plugins.py: Passprefix="platforms"to_scan_directory_level()in the bundled platform plugin discovery pathtests/hermes_cli/test_plugins.py: Add regression testtest_bundled_platform_plugins_have_platforms_namespace_keyverifying platform plugin keys include theplatforms/namespaceHow to Test
python -m pytest tests/hermes_cli/test_plugins.py -q -o 'addopts='platforms/teams,platforms/irc, etc. instead ofteams-platform,irc-platformChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping