test(toolsets): include kanban in expected post-#17805 toolset assertions#18122
Merged
teknium1 merged 1 commit intoMay 1, 2026
Merged
Conversation
…olset assertions The kanban PR (NousResearch#17805, c868425) 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 (180a703) 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>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates test expectations to account for the kanban toolset introduced in #17805, restoring CI by aligning “full toolset inventory” assertions with current toolset resolution behavior.
Changes:
- Add
tools.kanban_toolsto the expected builtin tool module discovery list. - Update TUI gateway server toolset-loading tests to expect the auto-recovered
kanbantoolset alongsidememory. - Reframe the “explicit empty selection” tools-config test to assert that no configurable toolsets reappear (while allowing non-configurable auto-recovered toolsets like
kanban).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/tools/test_registry.py | Extends the manual builtin module expectation to include tools.kanban_tools. |
| tests/test_tui_gateway_server.py | Updates fallback assertions to include sorted ["kanban", "memory"] to reflect _get_platform_tools recovery behavior. |
| tests/hermes_cli/test_tools_config.py | Adjusts the explicit-empty-selection contract to focus on configurable toolsets, allowing non-configurable recovered toolsets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
kanbantoolset (intoolsets.py) andtools/kanban_tools.pybut did not update three pre-existing test assertions that bake the full toolset/tool inventory.mainitself is red on these tests right now (last push, 8fed969, fails the same four). This commit restores green so unrelated PRs stop inheriting these failures.The bug
Four tests fail on clean
origin/main:tests/tools/test_registry.py::TestBuiltinDiscovery::test_matches_previous_manual_builtin_tool_settools.kanban_toolstests/hermes_cli/test_tools_config.py::test_get_platform_tools_preserves_explicit_empty_selectionset(){'kanban'}tests/test_tui_gateway_server.py::test_load_enabled_toolsets_rejects_disabled_mcp_env['memory']['kanban', 'memory']tests/test_tui_gateway_server.py::test_load_enabled_toolsets_falls_back_when_tui_env_invalid['memory']['kanban', 'memory']Root cause for the three resolver-driven failures:
_get_platform_toolsruns a recovery loop that adds non-configurable platform toolsets whose tools live insidehermes-cli's universe but are absent fromCONFIGURABLE_TOOLSETS(so they can't appear in the TUI checklist and would otherwise be silently dropped on save).kanbanis exactly such a toolset — the kanban tools are in_HERMES_CORE_TOOLSbutkanbanis not inCONFIGURABLE_TOOLSETS, so the loop now picks it up. That is the intended behavior of the recovery loop; the tests just predate it.The fix
Test-only:
test_matches_previous_manual_builtin_tool_set: addtools.kanban_toolsto the expected manual list.test_load_enabled_toolsets_*(both): expect['kanban', 'memory']and add a one-line comment pointing future readers at_get_platform_toolsso the auto-recovery isn't surprising.test_get_platform_tools_preserves_explicit_empty_selection: replaceassert enabled == set()withassert enabled.isdisjoint(CONFIGURABLE_TOOLSETS)and a comment explaining the actual contract — no toolset the user could have unchecked in the TUI gets re-enabled. This keeps the test honest as more non-configurable platform toolsets land (kanban is unlikely to be the last).No production change.
Test plan
origin/main(180a703) withuv run --with pytest --with pytest-xdist --with fastapi --with starlette --with httpx --with pytest-asyncio— same install shape CI uses for[all,dev].tests/hermes_cli/test_tools_config.py,tests/tools/test_registry.py,tests/tools/test_kanban_tools.py,tests/hermes_cli/test_kanban_cli.py,tests/test_tui_gateway_server.py— 238/239 pass; the 1 unrelated failure (test_browser_manage_connect_default_local_reports_launch_hint) reproduces on clean main and is about Chrome executable detection on the test runner.assert enabled == set()failed ({'kanban'}); reframed assertion passes; pre-feat(kanban): durable multi-profile collaboration board #17805 behavior (no kanban) would still pass under the new assertion sincekanbanwas never inCONFIGURABLE_TOOLSETS.Related