Skip to content

fix: notify gateway-origin kanban_create tasks - #28073

Closed
finnnagen wants to merge 1 commit into
NousResearch:mainfrom
finnnagen:fix/kanban-create-gateway-notify
Closed

fix: notify gateway-origin kanban_create tasks#28073
finnnagen wants to merge 1 commit into
NousResearch:mainfrom
finnnagen:fix/kanban-create-gateway-notify

Conversation

@finnnagen

@finnnagen finnnagen commented May 18, 2026

Copy link
Copy Markdown

Summary

  • Auto-subscribe structured kanban_create tasks to native Kanban completion notifications when a concrete messaging gateway origin is present.
  • Keep CLI/local/no-origin kanban_create calls board-only and return explicit notify_subscribed / notify_error fields.
  • Add regression coverage for gateway-origin subscription creation and no-origin behavior.

Diff summary

  • tools/kanban_tools.py: adds _gateway_notify_origin() using gateway.session_context.get_session_env(...); after kb.create_task(...), calls kb.add_notify_sub(...) only when platform/chat origin exists; preserves successful task creation if subscription fails and reports notify_error; documents gateway-origin behavior in the structured tool schema.
  • tests/tools/test_kanban_tools.py: asserts default create results are board-only, tests gateway-origin native kanban_notify_subs row creation, and tests no-origin calls do not create subscriptions.

Safety / privacy check

  • Uses existing Hermes Kanban primitives only: kb.create_task(...), kb.add_notify_sub(...), kanban_notify_subs, and gateway session contextvars.
  • No wrapper services, custom callback protocols, stdout scraping, or setup-specific routing.
  • Diff privacy scan checked for user-specific names, business/project-specific names, local filesystem paths, host/workspace identifiers, real-looking Discord snowflakes, phone-number patterns, and raw token/secret assignments. All returned 0 hits.
  • Test IDs are synthetic placeholders (chat-123, thread-456, user-789).

Test plan

  • python -m pytest tests/tools/test_kanban_tools.py::test_create_happy_path tests/tools/test_kanban_tools.py::test_create_auto_subscribes_gateway_origin tests/tools/test_kanban_tools.py::test_create_stays_board_only_without_gateway_origin -q -o 'addopts=' — passed.
  • python -m ruff check tools/kanban_tools.py tests/tools/test_kanban_tools.py — passed.
  • Temp-DB smoke test: gateway-origin structured create produced one kanban_notify_subs row; no-origin structured create produced none.

Note

  • Full tests/tools/test_kanban_tools.py currently has one unrelated existing failure in test_heartbeat_extends_claim_expires on this checkout; the focused create/notification tests pass.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/tools Tool registry, model_tools, toolsets labels May 18, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate — this re-implements the kanban_create auto-subscribe feature from #19718 (merged then reverted by #19721). Multiple competing open PRs exist for the same feature: #27064, #25195, #24307, #21523, #22190. Please coordinate with those authors or close in favor of one.

@finnnagen finnnagen closed this May 18, 2026
@finnnagen
finnnagen deleted the fix/kanban-create-gateway-notify branch May 18, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants