fix(gateway): auto-subscribe /kanban create with explicit --board#23223
Closed
Zyrixtrex wants to merge 1 commit into
Closed
fix(gateway): auto-subscribe /kanban create with explicit --board#23223Zyrixtrex wants to merge 1 commit into
Zyrixtrex wants to merge 1 commit into
Conversation
Collaborator
|
Duplicate of #23206 which fixes the same gateway |
Contributor
Author
|
Closed for Duplicate |
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
Fix gateway
/kanbanauto-subscribe behavior when the command uses an explicit board override.Before this change, a gateway command like:
/kanban --board projx create "board scoped task"would create the task successfully, but the gateway would fail to auto-subscribe the originating chat/thread to task notifications.
Problem
The gateway handler detected create commands by checking only the first token after
/kanban. That works for/kanban create ..., but fails for/kanban --board <slug> create ...because the first token is--board, notcreate.There was a second consistency issue in the same path: even if create detection had worked, the auto-subscribe write used an implicit kanban connection instead of the explicit board override, which could route the subscription to the wrong board DB.
Root Cause
In
gateway/run.py:add_notify_sub(...)path openedkanban_db.connect()without passing the explicit board contextFix
/kanbanarguments withshlex--board/--board=<slug>options when detecting the actual subcommandcreatewhen the first non-board token iscreateWhy this is safe
This is a narrow gateway-only fix:
/kanbanhandlerTests
Added a regression test covering:
/kanban --board <slug> create ...through the gateway handlerValidated together with existing Kanban notify and multi-board tests.