commit 5fb137ae5afbaef1ebccc376c411e5e616741860
Author: Coder Agent <coder@agents.omni>
Date: Wed Feb 11 21:48:19 2026
Omni/Ide: fail integrator when base branch checkout is not exact
- remove fallback integration to non-base branch in prepare_workspace_for_task
- require integrator workspace branch to match configured --base
- restore integrating/review claims when workspace prep fails
- add explicit task comment when integrator prep fails and claim is restored
- document strict base-branch assertion in integrator workflow guide
Task-Id: t-591
diff --git a/Omni/Ide/Workflows/integrator.md b/Omni/Ide/Workflows/integrator.md
index 04afebc6..74f365f6 100644
--- a/Omni/Ide/Workflows/integrator.md
+++ b/Omni/Ide/Workflows/integrator.md
@@ -52,7 +52,8 @@ Runtime context (task id, branch, workspace, base branch) is appended by the loo
### 1) Integrate
-1. Checkout the provided base branch.
+1. Checkout the provided base branch and verify current branch matches it.
+ If checkout fails or branch mismatches, stop and report blocked.
2. Cherry-pick task commit onto base branch:
```bash
git cherry-pick t-XXX
diff --git a/Omni/Ide/dev-review-release.sh b/Omni/Ide/dev-review-release.sh
index a6d0a34e..85e6b4be 100755
--- a/Omni/Ide/dev-review-release.sh
+++ b/Omni/Ide/dev-review-release.sh
@@ -477,9 +477,15 @@ prepare_workspace_for_task() {
;;
integrator)
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"
+ log "Could not checkout required base branch $base_branch in $workspace"
+ return 1
+ fi
+
+ local current_branch
+ current_branch="$(git -C "$workspace" rev-parse --abbrev-ref HEAD 2>/dev/null || true)"
+ if [[ "$current_branch" != "$base_branch" ]]; then
+ log "Integrator workspace is on '$current_branch', expected '$base_branch'"
+ return 1
fi
;;
*)
@@ -627,6 +633,14 @@ run_single_task() {
fi
if ! prepare_workspace_for_task "$role" "$workspace" "$tid" "$base_branch"; then
+ # Release role claims when workspace preparation fails.
+ if [[ "$role" == "review" && "$(current_task_status "$tid")" == "ReviewInProgress" ]]; then
+ task update "$tid" review --json >/dev/null || true
+ fi
+ if [[ "$role" == "integrator" && "$(current_task_status "$tid")" == "Integrating" ]]; then
+ task update "$tid" approved --json >/dev/null || true
+ task comment "$tid" "Automation ($role) could not prepare integration workspace for base branch '$base_branch'; status restored to approved." --json >/dev/null || true
+ fi
return 1
fi