fix: allow kanban tools for orchestrator profiles with kanban toolset#18970
Closed
pdonizete wants to merge 1 commit into
Closed
fix: allow kanban tools for orchestrator profiles with kanban toolset#18970pdonizete wants to merge 1 commit into
pdonizete wants to merge 1 commit into
Conversation
The _check_kanban_mode() gating function only checked for HERMES_KANBAN_TASK env var, which is only set by the dispatcher when spawning workers. This prevented orchestrator profiles (like techlead) from using kanban_create, kanban_link, etc. even when they had 'kanban' explicitly in their toolsets config. Now uses load_config() from hermes_cli.config (which has mtime-based caching) to check if 'kanban' is in the profile's toolsets list. This enables orchestrators to route work via Kanban while workers continue using the dispatcher env var. Fixes NousResearch#18968
683f976 to
fd342ff
Compare
Contributor
|
Merged via #19606 — your commit was cherry-picked onto current main (138 commits ahead of your branch) with your authorship preserved in git log. Also included a test fixup for the stale |
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.
Problem
The
_check_kanban_mode()gating function intools/kanban_tools.pyonly returnsTruewhenHERMES_KANBAN_TASKis set in the environment. This env var is only set by the kanban dispatcher when spawning a worker process.Orchestrator profiles (like a techlead that routes work via Kanban) never see the kanban tools, even when they have
kanbanexplicitly listed in theirtoolsetsconfig.Impact
HERMES_KANBAN_TASKset)Fix
Modified
_check_kanban_mode()to also returnTruewhen the current profile haskanbanin itstoolsetsconfig.Uses
load_config()fromhermes_cli.configwhich has mtime-based caching, so this adds negligible overhead. Thecheck_fnresults are further TTL-cached (~30s) by the tool registry.This allows orchestrator profiles to use
kanban_create,kanban_link, etc. to route work, while workers continue to use the full kanban toolset via the dispatcher env var.Testing
Tested in a real multi-agent setup with 4 profiles (techlead, dev, devops, qa). Before the fix, the techlead orchestrator could not see any kanban tools and hallucinated task creation. After the fix, it correctly sees and uses
kanban_create,kanban_link, etc.Fixes #18968