mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-02 02:01:47 +00:00
test(toolsets): include kanban in expected post-#17805 toolset assertions
The kanban PR (#17805,c86842546) added the `kanban` toolset and `tools/kanban_tools.py`, but didn't update three pre-existing test assertions that bake the full toolset/tool inventory: * `tests/tools/test_registry.py::test_matches_previous_manual_builtin_tool_set` hard-codes the manual list of builtin tool modules. `tools.kanban_tools` was missing. * `tests/test_tui_gateway_server.py::test_load_enabled_toolsets_rejects_disabled_mcp_env` and `test_load_enabled_toolsets_falls_back_when_tui_env_invalid` both expect `["memory"]` from `_load_enabled_toolsets()`. With kanban now auto-recovered by `_get_platform_tools` (its tools live in hermes-cli's universe but are not in CONFIGURABLE_TOOLSETS), the resolver returns `["kanban", "memory"]`. * `tests/hermes_cli/test_tools_config.py::test_get_platform_tools_preserves_explicit_empty_selection` asserts `set()` for an explicit empty list. The recovery loop now also surfaces `kanban`. Reframed to assert the contract the test name describes — no CONFIGURABLE toolset gets re-enabled when the user explicitly saved an empty list — which stays correct as more non-configurable platform toolsets are added. Verified the failures reproduce on clean origin/main (180a7036b) with `.[all,dev]`-equivalent extras (fastapi, starlette, httpx, pytest-asyncio) and that all four pass with this commit applied. CI on main itself is currently red on these tests; this restores green for everyone's PRs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f61695ee73
commit
97d6f25008
3 changed files with 16 additions and 3 deletions
|
|
@ -120,7 +120,16 @@ def test_get_platform_tools_preserves_explicit_empty_selection():
|
|||
|
||||
enabled = _get_platform_tools(config, "cli")
|
||||
|
||||
assert enabled == set()
|
||||
# An explicit empty list disables every CONFIGURABLE toolset (web,
|
||||
# terminal, memory, …). Non-configurable platform toolsets that ride
|
||||
# along on the platform's default composite (e.g. `kanban`, whose tools
|
||||
# live in _HERMES_CORE_TOOLS but aren't user-toggleable) are still
|
||||
# auto-recovered by _get_platform_tools so saving via `hermes tools`
|
||||
# doesn't silently drop them. The contract this test guards is the
|
||||
# configurable side: nothing the user could have checked in the TUI
|
||||
# checklist should reappear here.
|
||||
configurable = {ts_key for ts_key, _, _ in CONFIGURABLE_TOOLSETS}
|
||||
assert enabled.isdisjoint(configurable)
|
||||
|
||||
|
||||
def test_apply_toolset_change_from_default_does_not_enable_default_off_toolsets():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue