fix: daemon worktree path and agent forking issues #191
Reference in New Issue
Block a user
Delete Branch "fix/issue-daemon-worktree-path-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Multiple fixes for queue daemon and agent forking issues.
Bug 1: Worktree path mismatch (caused "use kugetsu continue" log)
Location:
kugetsu-queue-daemon.shline 112Problem: Daemon checked
worktree_exists "$issue_ref" "$HOME/.kugetsu-worktrees"but worktrees are created in$WORKTREES_DIR(~/.kugetsu/worktrees)Fix: Changed to use
$WORKTREES_DIRBug 2: GITEA_TOKEN unbound variable
Location:
kugetsu-session.shlines 197, 316, 371, 373Problem:
load_agent_env "dev"was called but~/.kugetsu/env/dev.envand~/.kugetsu/env/default.envdon't exist, so GITEA_TOKEN was never loadedFix: Added fallback to
pm-agent.envinload_agent_env()inkugetsu-config.shBug 3: disown error
Location:
kugetsu-session.shlines 316, 371, 373Problem:
&& disownpattern caused "no such job" errors because subshell exited before disown ranFix: Removed
&& disown-nohupalready makes process immune to SIGHUPChanges
kugetsu-queue-daemon.sh: Use$WORKTREES_DIRinstead of hardcoded pathkugetsu-config.sh: Add fallback topm-agent.envinload_agent_env()kugetsu-session.sh: Fix agent forking incmd_delegate,cmd_start, andcmd_continue