[codex] refactor(tools): derive configurable built-in toolsets from metadata - #5666
Open
Streamweaver wants to merge 2 commits into
Open
[codex] refactor(tools): derive configurable built-in toolsets from metadata#5666Streamweaver wants to merge 2 commits into
Streamweaver wants to merge 2 commits into
Conversation
Streamweaver
marked this pull request as ready for review
April 7, 2026 00:11
Contributor
|
Thanks for targeting a real drift risk: current main still has a separate configurator registry at Problems
Suggested changes
Automated hermes-sweeper review. |
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.
This removes the duplicated built-in toolset registry between
toolsets.pyandhermes_cli/tools_config.py.Today Hermes has two separate sources of truth for built-in toolsets:
toolsets.pyCONFIGURABLE_TOOLSETSinhermes_cli/tools_config.pyThat duplication causes drift. A built-in toolset can be valid and runnable, but still be invisible to
hermes tools listor rejected byhermes tools enable.This PR fixes that class of issue by making the built-in configurable toolset list derive from toolset metadata instead of a second hardcoded registry.
Why
This problem has already shown up multiple times in slightly different forms:
honchoexisted intoolsets.pybut was missing from the configurator pathmessagingneeded manual addition toCONFIGURABLE_TOOLSETSInstead of continuing to patch this one toolset at a time, this refactor removes the duplication that makes those bugs possible.
What Changed
toolsets.pyhermes_cli/tools_config.pyfromtoolsets.pyNon-Goals
hermes-cliResult
After this change, adding a new built-in configurable toolset in
toolsets.pyis sufficient for:hermes tools listto show ithermes tools enable/disableto recognize itwithout requiring a second manual registration in
hermes_cli/tools_config.py.Validation
python3 -m py_compile toolsets.py hermes_cli/tools_config.py tests/hermes_cli/test_tools_config.py tests/hermes_cli/test_tools_disable_enable.pypython3 -m pytest tests/hermes_cli/test_tools_config.py tests/hermes_cli/test_tools_disable_enable.py -qThe focused CLI/config tool tests passed:
39 passed.