Promote my worktree

Merge orch/<session> into the base branch — fail-closed on conflicts, and never pushed for you.

Prompt#

The worker's branch looks good — promote its worktree into main.

What the Chair does#

Lists the session worktrees, then merges the one you name into the project's base branch. It stops at the first conflict and it never pushes.

MCP calls#

Look before you merge:

worktree_status({ "project": "billing" })

Then promote:

worktree_promote({
  "session":  "task-42",
  "project":  "billing",
  "base":     "main",
  "strategy": "merge"
})

And clean up what nothing points at any more:

worktree_prune({ "project": "billing" })

CLI equivalents: orch worktree status, orch worktree promote <session>, orch worktree prune, orch worktree base.

Expected response#

worktree_status returns a JSON list with dirty and orphan flags per worktree. worktree_promote returns the promote result as JSON. On a conflict it returns an error naming the conflicting files — nothing is half-merged and nothing is committed for you.

Gotchas#

  • session is required. project, base and strategy are optional; base falls back to ORCH_GIT_BASE, then main or master (orch worktree base prints what it resolved to).
  • Fail-closed means fail-closed. A conflict is an error with file names, not a merge with markers in it. Resolve it in the worktree and promote again.
  • No auto-push, ever. Promotion lands on your local base branch. Pushing is a human decision and orch does not make it.
  • Check verification before you promote. The dispatch_worker / task_run result and task_list both carry it; verify_status({"session": "task-42"}) reads it on its own. A worker that never called verify_report leaves every acceptance criterion standing as unmet — deliberately.
  • Promote a dirty worktree and you promote the committed half only. Uncommitted changes stay where they are; worktree_status flags them as dirty for exactly this reason.
  • worktree_prune only removes orphans — directories and orch/* branches nothing points at. It is the safe call to make first.
  • One Chair per git project. N repos means N orch project add entries, capped by orch.projects.max on your plan; entitlements_status tells you the cap.