moa_tower_ci
Run CI in the mission branch worktree, returning immediately with a run_id; await the CI record before merging.
Instructions
Run the configured CI command (boot ci_command) in the mission branch's worktree (tower-only). M1 async: the MCP bridge forwards the request to the persistent Bus owner, which spawns CI and the tool returns IMMEDIATELY with {run_id, started_at, status:"started"}. The ci/ record that lands when the process exits {commit (tip at run time), exitCode, dirty, logRef, ranAt, runId} is the SOURCE OF TRUTH; await it with moa_tower_wait(wait={kind:"ci", branch}) before merging. Per-worktree serialization and completion writes live in the Bus owner, so closing this MCP session cannot cancel the run. A dirty worktree is intercepted BEFORE execution: the run errors asking for a commit first and records a dirty:true failed result. The run log is truncated (last 200 lines, ≤64KB) and referenced by logRef. When a ci_command is configured, the merge gate requires a green (exitCode 0, clean, current tip) record before merging.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | The mission branch to run CI against (e.g. "feat/M1-x") | |
| workspace | Yes | The absolute repo root (main checkout) this tower namespace anchors to. Required on every tower tool — the server cwd is never used as a fallback. | |
| caller_agent_id | Yes | Your engine agent id. The tower tools resolve it against the boot-registered roster (the booted tower, or a spawned worker/reviewer). |