← Back to task

Commit a0b2f8d5

commit a0b2f8d544a71e5713069a659b58b8e97e04667c
Author: Ben Sima <ben@bensima.com>
Date:   Tue Feb 10 21:15:19 2026

    Omni/Ide: fix dogfood blockers in dev-review-release runner
    
    Fix prompt invocation, base-branch checkout conflicts, and
    
    dev auto-promotion conditions in loop execution.
    
    Restore workflow frontmatter/tools for reviewer/integrator.
    
    Task-Id: t-579

diff --git a/Omni/Ide/Workflows/integrator.md b/Omni/Ide/Workflows/integrator.md
index 01cac619..cf3e82aa 100644
--- a/Omni/Ide/Workflows/integrator.md
+++ b/Omni/Ide/Workflows/integrator.md
@@ -1,18 +1,32 @@
+---
+model: claude-sonnet-4-5
+max_cost_cents: 200
+max_iterations: 120
+imports:
+  - ../../../AGENTS.md
+tools:
+  - read_file
+  - write_file
+  - edit_file
+  - run_bash
+  - skill
+---
+
 # Integrator Workflow (Patch-Based)
 
 You are the **integrator** in a dev → review → integrate workflow.
 
-Runtime context (task id, branch, workspace) is appended by the loop runner.
+Runtime context (task id, branch, workspace, base branch) is appended by the loop runner.
 
 ## Goals
 
-1. Integrate approved task commit from `t-XXX` into `live`.
+1. Integrate approved task commit from `t-XXX` into the provided base branch.
 2. Verify build/tests after integration.
 3. Mark task done and clean up branch pointer safely.
 
 ## Hard Rules
 
-1. Work only in the provided live workspace.
+1. Work only in the provided integrator workspace.
 2. Never delete or mutate unrelated worktrees.
 3. Do not delete worktree directories.
 4. Integrate exactly one commit from task branch.
@@ -21,7 +35,7 @@ Runtime context (task id, branch, workspace) is appended by the loop runner.
 
 ### 0) Pre-flight
 
-1. Ensure clean live workspace:
+1. Ensure clean workspace:
    ```bash
    git status --porcelain
    ```
@@ -31,16 +45,16 @@ Runtime context (task id, branch, workspace) is appended by the loop runner.
    task show t-XXX --json | jq -r '.taskStatus'
    ```
 
-3. Ensure task branch has exactly one commit relative to live:
+3. Ensure task branch has exactly one commit relative to base branch:
    ```bash
-   git rev-list --count live..t-XXX
+   git rev-list --count <base-branch>..t-XXX
    ```
    Must be `1`.
 
 ### 1) Integrate
 
-1. Checkout `live` branch.
-2. Cherry-pick task commit onto live:
+1. Checkout the provided base branch.
+2. Cherry-pick task commit onto base branch:
    ```bash
    git cherry-pick t-XXX
    ```
@@ -58,7 +72,7 @@ Run namespace-specific checks:
 - `bild --test <namespace>` where available
 
 If verification fails:
-- Revert cherry-pick commit (`git reset --hard HEAD~1`) only if commit is local/unpushed in this workflow run
+- Revert local cherry-pick commit only if unpushed in this run
 - Add task comment with failure details
 - Set task back to `open`
 - Stop
diff --git a/Omni/Ide/Workflows/reviewer.md b/Omni/Ide/Workflows/reviewer.md
index da80227f..1decd3a8 100644
--- a/Omni/Ide/Workflows/reviewer.md
+++ b/Omni/Ide/Workflows/reviewer.md
@@ -1,8 +1,22 @@
+---
+model: claude-opus-4-6
+max_cost_cents: 200
+max_iterations: 120
+imports:
+  - ../../../AGENTS.md
+tools:
+  - read_file
+  - write_file
+  - edit_file
+  - run_bash
+  - skill
+---
+
 # Reviewer Workflow (Patch-Based)
 
 You are the **reviewer** in a dev → review → integrate workflow.
 
-Runtime context (task id, branch, workspace) is appended by the loop runner.
+Runtime context (task id, branch, workspace, base branch) is appended by the loop runner.
 
 ## Goals
 
@@ -29,13 +43,12 @@ Runtime context (task id, branch, workspace) is appended by the loop runner.
 
 2. Check out the task branch tip in detached mode:
    ```bash
-   git checkout live
    git checkout --detach t-XXX
    ```
 
-3. Confirm exactly one commit on task branch relative to live:
+3. Confirm exactly one commit on task branch relative to base branch:
    ```bash
-   git rev-list --count live..t-XXX
+   git rev-list --count <base-branch>..t-XXX
    ```
    Must be `1`.
 
diff --git a/Omni/Ide/dev-review-release.sh b/Omni/Ide/dev-review-release.sh
index ab4cf580..54cd916f 100755
--- a/Omni/Ide/dev-review-release.sh
+++ b/Omni/Ide/dev-review-release.sh
@@ -182,7 +182,6 @@ prepare_workspace_for_task() {
       if git -C "$workspace" show-ref --verify --quiet "refs/heads/$tid"; then
         git -C "$workspace" checkout "$tid" >/dev/null
       else
-        git -C "$workspace" checkout "$base_branch" >/dev/null
         git -C "$workspace" checkout -b "$tid" "$base_branch" >/dev/null
       fi
       ;;
@@ -191,11 +190,14 @@ prepare_workspace_for_task() {
         log "Task branch $tid does not exist yet, skipping"
         return 1
       fi
-      git -C "$workspace" checkout "$base_branch" >/dev/null
       git -C "$workspace" checkout --detach "$tid" >/dev/null
       ;;
     integrator)
-      git -C "$workspace" checkout "$base_branch" >/dev/null
+      if ! git -C "$workspace" checkout "$base_branch" >/dev/null 2>&1; then
+        local current_branch
+        current_branch="$(git -C "$workspace" rev-parse --abbrev-ref HEAD)"
+        log "Could not checkout base branch $base_branch in $workspace; using $current_branch"
+      fi
       ;;
     *)
       echo "Unknown role: $role" >&2
@@ -209,6 +211,7 @@ build_prompt() {
   local workflow_file="$2"
   local workspace="$3"
   local tid="$4"
+  local base_branch="$5"
 
   local workflow
   workflow="$(<"$workflow_file")"
@@ -226,15 +229,16 @@ build_prompt() {
 
   printf '%s\n\n---\n\n' "$workflow"
   printf '## Runtime Task Context\n\n'
-  printf '- Role: %s\n' "$role"
-  printf '- Task ID: %s\n' "$tid"
-  printf '- Branch: %s\n' "$tid"
-  printf '- Workspace: %s\n' "$workspace"
-  printf '- Status: %s\n' "$status"
-  printf '- Patchset: %s\n' "$patchset_count"
-  printf '- Trailer: %s\n' "$trailer"
+  printf -- '- Role: %s\n' "$role"
+  printf -- '- Task ID: %s\n' "$tid"
+  printf -- '- Branch: %s\n' "$tid"
+  printf -- '- Workspace: %s\n' "$workspace"
+  printf -- '- Base branch: %s\n' "$base_branch"
+  printf -- '- Status: %s\n' "$status"
+  printf -- '- Patchset: %s\n' "$patchset_count"
+  printf -- '- Trailer: %s\n' "$trailer"
   if [[ -n "$namespace" ]]; then
-    printf '- Namespace: %s\n' "$namespace"
+    printf -- '- Namespace: %s\n' "$namespace"
   fi
   printf '\n### Title\n%s\n\n' "$title"
   printf '### Description\n%s\n\n' "$desc"
@@ -294,12 +298,18 @@ run_single_task() {
   workflow_file="$(workflow_path_for_role "$role")"
 
   local prompt
-  prompt="$(build_prompt "$role" "$workflow_file" "$workspace" "$tid")"
+  prompt="$(build_prompt "$role" "$workflow_file" "$workspace" "$tid" "$base_branch")"
 
   log "Starting agentd run: $run_name"
 
+  local prompt_dir prompt_file
+  prompt_dir="$workspace/_/tmp/dev-review-release"
+  mkdir -p "$prompt_dir"
+  prompt_file="$prompt_dir/${run_name}.md"
+  printf '%s\n' "$prompt" > "$prompt_file"
+
   local -a cmd
-  cmd=(agentd run "$prompt" -n "$run_name" --fg --timeout "$timeout" --max-iter "$max_iter" --max-cost "$max_cost")
+  cmd=(agentd run "$prompt_file" -n "$run_name" --fg --timeout "$timeout" --max-iter "$max_iter" --max-cost "$max_cost")
   if [[ -n "$provider" ]]; then
     cmd+=( -p "$provider" )
   fi
@@ -321,17 +331,12 @@ run_single_task() {
   local new_status
   new_status="$(current_task_status "$tid")"
 
-  if [[ "$role" == "dev" && ("$new_status" == "Open" || "$new_status" == "InProgress") ]]; then
-    log "Dev run succeeded but status is $new_status; promoting $tid to review"
-    task update "$tid" review --json >/dev/null || true
-    task comment "$tid" "Automation (dev) promoted task to review after successful run $run_name." --json >/dev/null || true
-    new_status="$(current_task_status "$tid")"
-  fi
-
+  local dev_changed_commit="false"
   if [[ "$role" == "dev" ]]; then
     local after_sha
     after_sha="$(task_branch_sha "$workspace" "$tid")"
     if [[ -n "$after_sha" && "$after_sha" != "$before_sha" ]]; then
+      dev_changed_commit="true"
       if patchset_json="$(task patchset "$tid" --increment --json 2>/dev/null)"; then
         local new_patchset
         new_patchset="$(jq -r '.patchset_count // .patchsetCount // "?"' <<<"$patchset_json")"
@@ -342,6 +347,18 @@ run_single_task() {
     fi
   fi
 
+  if [[ "$role" == "dev" && ("$new_status" == "Open" || "$new_status" == "InProgress") ]]; then
+    if [[ "$dev_changed_commit" == "true" ]]; then
+      log "Dev run succeeded with commit change and status=$new_status; promoting $tid to review"
+      task update "$tid" review --json >/dev/null || true
+      task comment "$tid" "Automation (dev) promoted task to review after successful run $run_name." --json >/dev/null || true
+      new_status="$(current_task_status "$tid")"
+    else
+      log "Dev run did not produce a commit change; leaving status as $new_status"
+      task comment "$tid" "Automation (dev) run $run_name made no commit change; status left at $new_status." --json >/dev/null || true
+    fi
+  fi
+
   log "Completed task run for $tid (status now: $new_status)"
   return 0
 }