ticket.git-work.begin ​
Bind a ticket to one local repository worktree and full branch ref.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-tickets |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | — |
ticket_uuid | string | Yes | — | — |
repository_uuid | string | Yes | — | — |
executor_uuid | string | No | — | Opaque owner UUID; supply with worktree_uuid for pre-bound work. |
worktree_uuid | string | No | — | Opaque local worktree identity; supply with executor_uuid. |
runner_group_uuid | string | No | — | Active cloudless DevKit group that will atomically claim ownerless planned work. Omit for pre-bound Phase 1 work. |
branch_ref | string | No | — | Full refs/heads/* ref. Omit to derive a collision-proof ref from the policy prefix, the ticket, and this work's own uuid -- a leftover branch from a previous attempt then cannot collide on a runner's cached clone. |
target_ref | string | No | — | Full Git ref this work merges back into. Omit to derive the repository's default_branch_ref, checked against the active policy's allowed_target_refs -- a runner refuses an assignment that names no target. |
base_oid | string | No | — | Git object id this work forks from. Omit only when this pipeline is the sole writer of the target: the value is then derived from the newest merge this ledger recorded on it. If nothing has merged there yet, claim-protocol work is refused rather than forked from the base a previous run was handed -- that value is an echo of this control plane's own guess, and a runner rejects the assignment with a base-drift blocker once the target moves. Resolve the provider head and pass it. |
head_oid | string | No | — | Git object id already on branch_ref when resuming work; not derived. |
extra | json | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
work | dict | No | — | — |
created | boolean | No | — | — |
organization_uuid | string | No | — | Input field preserved in workflow state. |
ticket_uuid | string | No | — | Input field preserved in workflow state. |
repository_uuid | string | No | — | Input field preserved in workflow state. |
executor_uuid | string | No | — | Input field preserved in workflow state. |
worktree_uuid | string | No | — | Input field preserved in workflow state. |
runner_group_uuid | string | No | — | Input field preserved in workflow state. |
branch_ref | string | No | — | Input field preserved in workflow state. |
target_ref | string | No | — | Input field preserved in workflow state. |
base_oid | string | No | — | Input field preserved in workflow state. |
head_oid | string | No | — | Input field preserved in workflow state. |
extra | json | No | — | Input field preserved in workflow state. |
failed_at | string | No | — | ISO-8601 timestamp when action_fail recorded the failure |
failure_reason | string | No | — | Human-readable failure reason from action_fail |
failure_type | string | No | — | Engine-stamped failure category |
failed_action | string | No | — | Engine-stamped action that raised |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | string | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | execute | Accepted |
executing | No | No | — | complete | Applying the mutation |
completed | No | Yes | Yes | — | Done |
failed | No | Yes | No | — | Failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | execute | executing | Run the mutation |
executing | complete | completed | Finalize |
* (any state) | fail | failed | Catch-all failure |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "ticket.git-work.begin",
"initial_data": {
"organization_uuid": "value",
"ticket_uuid": "value",
"repository_uuid": "value"
}
}