runner.workspace-lease.complete ​
Finalize a workspace lease as completed, blocked, failed, or abandoned.
Finalize a lease with a terminal outcome.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-runners |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Authenticated organization; injected by the workflow API. |
workspace_lease_uuid | uuid | Yes | — | Workspace lease UUID. |
executor_uuid | uuid | No | — | Claim owner UUID. May be omitted only to abandon an unclaimed request after runner-launch compensation. |
outcome | string | Yes | — | — |
head_oid | string | No | — | — |
failure_reason | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
workspace_lease_uuid | uuid | No | — | — |
organization_uuid | uuid | No | — | — |
actor_uuid | uuid | No | — | — |
agent_session_uuid | uuid | No | — | — |
runner_execution_uuid | uuid | No | — | — |
ticket_uuid | uuid | No | — | — |
ticket_git_work_uuid | uuid | No | — | — |
repository_uuid | uuid | No | — | — |
status | string | No | — | — |
executor_uuid | uuid | No | — | — |
worktree_uuid | uuid | No | — | — |
branch_ref | string | No | — | — |
target_ref | string | No | — | — |
base_oid | string | No | — | — |
head_oid | string | No | — | — |
claimed_at | string | No | — | — |
heartbeat_at | string | No | — | — |
completed_at | string | No | — | — |
failure_reason | string | No | — | — |
extra | dict | No | — | — |
created_at | string | No | — | — |
updated_at | string | No | — | — |
failed_at | string | No | — | — |
outcome | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "runner.workspace-lease.complete",
"initial_data": {
"organization_uuid": "value",
"workspace_lease_uuid": "value",
"outcome": "value"
}
}