From aa974c4888851f10c782e07b9d9bff7a6f1aef15 Mon Sep 17 00:00:00 2001 From: soryu Date: Fri, 20 Feb 2026 00:46:21 +0000 Subject: fix: reconcile:on blocking, pending question notifications, and infra improvements (#73) * feat: soryu-co/soryu - makima: Fix contracts page overflow - constrain layout to viewport height * feat: soryu-co/soryu - makima: Add git fetch to create_worktree and improve completion prompt merge conflict handling * WIP: heartbeat checkpoint * feat: soryu-co/soryu - makima: Add pending question notification badge to directive sidebar and nav * feat: soryu-co/soryu - makima: Fix reconcile:on blocking - make phaseguard poll indefinitely instead of returning immediately --- makima/src/daemon/worktree/manager.rs | 59 +---------------------------------- 1 file changed, 1 insertion(+), 58 deletions(-) (limited to 'makima/src/daemon') diff --git a/makima/src/daemon/worktree/manager.rs b/makima/src/daemon/worktree/manager.rs index 489c488..ea26767 100644 --- a/makima/src/daemon/worktree/manager.rs +++ b/makima/src/daemon/worktree/manager.rs @@ -491,64 +491,7 @@ impl WorktreeManager { .output() .await; - // Prefer origin/{base_branch} to get latest remote state. - // If neither origin/{base_branch} nor {base_branch} exist (e.g. PR branch - // was deleted after merge), fall back to the repo's default branch. - let origin_ref = format!("origin/{}", base_branch); - let has_origin_ref = Command::new("git") - .args(["rev-parse", "--verify", &format!("refs/remotes/{}", origin_ref)]) - .current_dir(source_repo) - .output() - .await - .map(|o| o.status.success()) - .unwrap_or(false); - - let has_local_ref = if !has_origin_ref { - Command::new("git") - .args(["rev-parse", "--verify", &format!("refs/heads/{}", base_branch)]) - .current_dir(source_repo) - .output() - .await - .map(|o| o.status.success()) - .unwrap_or(false) - } else { - false // don't need to check — we already have origin ref - }; - - let start_point: String = if has_origin_ref { - origin_ref - } else if has_local_ref { - base_branch.to_string() - } else { - // Branch doesn't exist (likely deleted after PR merge) — use default branch - tracing::warn!( - task_id = %task_id, - base_branch = %base_branch, - "Base branch ref not found, falling back to default branch" - ); - let default_branch = self.detect_default_branch(source_repo).await?; - let default_origin = format!("origin/{}", default_branch); - let has_default_origin = Command::new("git") - .args(["rev-parse", "--verify", &format!("refs/remotes/{}", default_origin)]) - .current_dir(source_repo) - .output() - .await - .map(|o| o.status.success()) - .unwrap_or(false); - if has_default_origin { - default_origin - } else { - default_branch - } - }; - - tracing::info!( - task_id = %task_id, - start_point = %start_point, - "Using start point for new worktree branch" - ); - - // Create the worktree with a new branch based on the start point + // Create the worktree with a new branch based on the local base_branch let output = Command::new("git") .args([ "worktree", -- cgit v1.2.3