diff options
| -rwxr-xr-x | Omni/Agent/start-worker.sh | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Omni/Agent/start-worker.sh b/Omni/Agent/start-worker.sh index 820c1bb..0b09d5e 100755 --- a/Omni/Agent/start-worker.sh +++ b/Omni/Agent/start-worker.sh @@ -141,14 +141,22 @@ Context: git checkout omni-worker-1 >/dev/null # Sync again (rebase on latest live) - git rebase live >/dev/null 2>&1 + # If rebase fails, we MUST abort to avoid leaving the repo in a broken state + if ! git rebase live >/dev/null 2>&1; then + echo "Warning: Rebase conflict. Aborting rebase and proceeding with local state." + git rebase --abort || true + fi + sync_tasks # Update status - "$TASK_BIN" update "$TASK_ID" review >/dev/null - sync_tasks --commit >/dev/null - - echo "Task $TASK_ID submitted for review." + echo "Marking task $TASK_ID as Review..." + if "$TASK_BIN" update "$TASK_ID" review; then + sync_tasks --commit >/dev/null + echo "Task $TASK_ID submitted for review." + else + echo "Error: Failed to update task status to Review." + fi else echo "Agent failed (exit code $AGENT_EXIT_CODE). Sleeping for 10s before retrying..." |
