fix(kugetsu): cmd_delegate should enqueue instead of calling cmd_start #159

Closed
shoko wants to merge 0 commits from fix/issue-156 into main
Owner

When cmd_delegate detects an issue ref with number (e.g. git.fbrns.co/shoko/kugetsu#158), it was calling cmd_start directly which tries to create worktree and clone. This breaks the queue-based workflow where daemon should handle task execution.

Now cmd_delegate calls enqueue_task to add to queue, and daemon processes tasks by calling cmd_start/cmd_continue as appropriate.

Fixes #158

When cmd_delegate detects an issue ref with number (e.g. git.fbrns.co/shoko/kugetsu#158), it was calling cmd_start directly which tries to create worktree and clone. This breaks the queue-based workflow where daemon should handle task execution. Now cmd_delegate calls enqueue_task to add to queue, and daemon processes tasks by calling cmd_start/cmd_continue as appropriate. Fixes #158
shoko added 1 commit 2026-04-06 00:05:37 +02:00
When cmd_delegate detects an issue ref with number (e.g. git.fbrns.co/shoko/kugetsu#158),
it was calling cmd_start directly which tries to create worktree and clone.
This breaks the queue-based workflow where daemon should handle task execution.

Now cmd_delegate calls enqueue_task to add to queue, and daemon processes
tasks by calling cmd_start/cmd_continue as appropriate.
shoko added 2 commits 2026-04-06 00:21:00 +02:00
The daemon (kugetsu-queue-daemon.sh) sources kugetsu-index.sh but not the main kugetsu script.
Move update_queue_item_state and kugetsu_add_notification to kugetsu-index.sh
so the daemon can use these functions when processing tasks.
When daemon sources kugetsu-session.sh to call cmd_start/cmd_continue,
it needs access to functions from kugetsu-config.sh, kugetsu-index.sh,
kugetsu-worktree.sh, and kugetsu-log.sh. Add sourcing at top of
kugetsu-session.sh.
shoko closed this pull request 2026-04-06 02:03:08 +02:00

Pull request closed

Sign in to join this conversation.