Queue daemon: hardcoded origin/main..HEAD for commit detection #165

Closed
opened 2026-04-06 02:07:43 +02:00 by shoko · 2 comments
Owner

Problem

The queue daemon's check_task_completion() uses hardcoded 'origin/main..HEAD' to detect if a task has commits:

This assumes all worktrees track 'origin/main', which may not be correct for:

  • Forks with different remotes (e.g., upstream/main)
  • Worktrees created from different branches
  • Users with custom branch naming conventions

Expected Fix

Make the base branch configurable via:

  1. Environment variable (e.g., KUGETSU_BASE_BRANCH)
  2. Or store the base branch per-session in the session JSON file

Severity

Medium - works for most users but breaks for forks/custom setups

## Problem The queue daemon's check_task_completion() uses hardcoded 'origin/main..HEAD' to detect if a task has commits: This assumes all worktrees track 'origin/main', which may not be correct for: - Forks with different remotes (e.g., upstream/main) - Worktrees created from different branches - Users with custom branch naming conventions ## Expected Fix Make the base branch configurable via: 1. Environment variable (e.g., KUGETSU_BASE_BRANCH) 2. Or store the base branch per-session in the session JSON file ## Severity Medium - works for most users but breaks for forks/custom setups

I am thinking of the config should be in each repository. but we can always have default config that applicable to every repository as long as not being override. what do you think?

I am thinking of the config should be in each repository. but we can always have default config that applicable to every repository as long as not being override. what do you think?
shoko added the ready label 2026-04-07 08:55:25 +02:00
Author
Owner

Implemented in PR #257: #257

Implemented in PR #257: https://git.fbrns.co/shoko/kugetsu/pulls/257
shoko closed this issue 2026-04-08 08:22:10 +02:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#165