ticket.reconcile.orphaned ​
Sweep non-terminal tickets stuck with a claim label but no pipeline stage label; flag them (queue + audit) and, opt-in, re-inject them into the pipeline.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-tickets |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | No | — | — |
stale_hours | integer | No | — | Hours a ticket must sit untouched before it is judged orphaned (default 24). |
claim_label | string | No | — | Label marking a ticket as claimed by the pipeline (default 'triage-claimed'). |
reentry_label | string | No | — | Stage label added on apply to re-engage the pipeline (default 'pipeline:verify'). |
apply | boolean | No | — | Re-inject flagged tickets by adding the re-entry stage label. Default false — flag only, and wait for a human. |
dry_run | boolean | No | — | Evaluate and report without writing anything. |
statuses | list | No | — | — |
limit | integer | No | — | — |
now | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
scanned | integer | No | — | — |
flagged | integer | No | — | — |
reinjected | integer | No | — | — |
skipped | integer | No | — | — |
errors | integer | No | — | — |
dry_run | boolean | No | — | — |
results | list | No | — | — |
organization_uuid | string | No | — | Input field preserved in workflow state. |
stale_hours | integer | No | — | Input field preserved in workflow state. |
claim_label | string | No | — | Input field preserved in workflow state. |
reentry_label | string | No | — | Input field preserved in workflow state. |
apply | boolean | No | — | Input field preserved in workflow state. |
statuses | list | No | — | Input field preserved in workflow state. |
limit | integer | No | — | Input field preserved in workflow state. |
now | string | 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.reconcile.orphaned",
"initial_data": {
"organization_uuid": "value",
"stale_hours": 123,
"claim_label": "value",
"reentry_label": "value"
}
}