fix: notify gateway-origin kanban_create tasks - #28073
Closed
finnnagen wants to merge 1 commit into
Closed
Conversation
Collaborator
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
kanban_createtasks to native Kanban completion notifications when a concrete messaging gateway origin is present.kanban_createcalls board-only and return explicitnotify_subscribed/notify_errorfields.Diff summary
tools/kanban_tools.py: adds_gateway_notify_origin()usinggateway.session_context.get_session_env(...); afterkb.create_task(...), callskb.add_notify_sub(...)only when platform/chat origin exists; preserves successful task creation if subscription fails and reportsnotify_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 nativekanban_notify_subsrow creation, and tests no-origin calls do not create subscriptions.Safety / privacy check
kb.create_task(...),kb.add_notify_sub(...),kanban_notify_subs, and gateway session contextvars.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.kanban_notify_subsrow; no-origin structured create produced none.Note
tests/tools/test_kanban_tools.pycurrently has one unrelated existing failure intest_heartbeat_extends_claim_expireson this checkout; the focused create/notification tests pass.