Repository navigation
Conversation
Closed
4 of 10 tasks
platform_toolsets validation (NousResearch#38798) runs during migrate_config(), which is before plugins load and register their toolsets. validate_toolset() therefore reports every plugin toolset as unknown, so `hermes update` prints a warning for a name that resolves correctly at runtime: platform 'cli' references unknown toolset 'a2a' — did you mean 'hermes-cli'? The config already records which plugin toolsets are legitimate: the `hermes tools` save flow writes known_plugin_toolsets on every save, and tools_config.py reads it back per platform. Validation just never consulted it. validate_platform_toolsets() gains an optional known_plugin_toolsets parameter and accepts names declared there for that platform. Scoped per platform so one platform's plugin names cannot mask a typo under another. Omitting the argument reproduces the previous behavior exactly.
prasta1
force-pushed
the
fix/plugin-toolset-validation
branch
from
September 24, 2026 17:56
3800504 to
5d2a31a
Compare
|
Thanks @prasta1. Merged in #127782 (16c59d0 on main). Verified on 16c59d0,
|
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.
What does this PR do?
platform_toolsetsvalidation (added for #38798) runs insidemigrate_config(), which executesbefore plugins load and register their toolsets.
validate_toolset()consults the toolregistry, the registry is still empty at that point, so every plugin-provided toolset is reported
as unknown on each
hermes update:The names are correct and resolve fine at runtime, so the warning is purely false — and the
suggested "did you mean
hermes-cli?" fix would actively make the config worse if followed.The config already knows these names are legitimate. The
hermes toolssave flow writesknown_plugin_toolsetson every save (hermes_cli/tools_config.py:703), and reads it backper-platform at
tools_config.py:539. Validation simply never consulted it. This wires it up.Scoped per platform on purpose: flattening every platform's names into one set would let a
plugin toolset declared for
discordmask a genuine typo undercli. Omitting the new argumentreproduces the previous behavior exactly, so no existing caller changes.
Related Issue
No open issue filed for this specific symptom. Prior art, all still unfixed on
main:and not labeled a duplicate. It carried an approving review and an independent deployment
confirmation. This PR revives it, with the per-platform scoping that thread asked for.
server names rather than plugin toolsets. Complementary, not overlapping; both inject a
predicate into
validate_platform_toolsets. If that one lands first I'm happy to rebase onto itso the two parameters sit side by side rather than conflict.
duplicate/needs-decision.Type of Change
Changes Made
hermes_cli/toolset_validation.py—validate_platform_toolsets()gains an optionalknown_plugin_toolsetsparameter (the raw config section,{platform: [name, ...]}). A namedeclared for that platform is treated as valid instead of warned about, and is not run through
is_allowed_for_platform(), which would reject it for the same not-yet-loaded reason. New_known_plugin_toolsets()helper normalizes the section and tolerates malformed shapes.hermes_cli/config.py—_warn_invalid_platform_toolsets()readsknown_plugin_toolsetsfrom the raw config and passes it through (one
read_raw_config()call, reused).tests/hermes_cli/test_toolset_validation.py— 5 new tests (11 cases with parametrization).How to Test
pytest tests/hermes_cli/test_toolset_validation.py -qa2a-platform), add its toolset name to a platform's list inplatform_toolsets, and runhermes update. Before: one false "unknown toolset" warning per platform. After: none.name listed under a platform it was not declared for (covered by
test_plugin_toolset_declared_for_another_platform_still_warns).Checklist
Code
pytest tests/ -qand all tests pass — see note belowDocumentation & Housekeeping
known_plugin_toolsetsalready exists and is already written byhermes tools