ticket.software-delivery.cost-record ​
Append immutable model, compute, storage, or provider spend with validated delivery/session/execution/artifact attribution.
Append one trusted actual or explicitly unpriced cost observation.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-tickets |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | — |
delivery_uuid | string | No | — | — |
work_uuid | string | No | — | — |
idempotency_key | string | Yes | — | — |
category | string | Yes | — | — |
pricing_status | string | Yes | — | — |
amount_usd | string | No | — | — |
quantity | string | No | — | — |
unit | string | No | — | — |
source_type | string | Yes | — | — |
source_uuid | string | Yes | — | — |
actor_uuid | string | No | — | — |
session_uuid | string | No | — | — |
runner_execution_uuid | string | No | — | — |
model_name | string | No | — | — |
provider | string | No | — | — |
resource_type | string | No | — | — |
evidence_digest | string | Yes | — | — |
price_snapshot | json | No | — | — |
metadata | json | No | — | — |
usage_started_at | datetime | No | — | — |
usage_ended_at | datetime | No | — | — |
reservation_uuid | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cost_entry | dict | No | — | — |
cost_summary | dict | No | — | — |
created | boolean | No | — | — |
organization_uuid | string | No | — | Input field preserved in workflow state. |
delivery_uuid | string | No | — | Input field preserved in workflow state. |
work_uuid | string | No | — | Input field preserved in workflow state. |
idempotency_key | string | No | — | Input field preserved in workflow state. |
category | string | No | — | Input field preserved in workflow state. |
pricing_status | string | No | — | Input field preserved in workflow state. |
amount_usd | string | No | — | Input field preserved in workflow state. |
quantity | string | No | — | Input field preserved in workflow state. |
unit | string | No | — | Input field preserved in workflow state. |
source_type | string | No | — | Input field preserved in workflow state. |
source_uuid | string | No | — | Input field preserved in workflow state. |
actor_uuid | string | No | — | Input field preserved in workflow state. |
session_uuid | string | No | — | Input field preserved in workflow state. |
runner_execution_uuid | string | No | — | Input field preserved in workflow state. |
model_name | string | No | — | Input field preserved in workflow state. |
provider | string | No | — | Input field preserved in workflow state. |
resource_type | string | No | — | Input field preserved in workflow state. |
evidence_digest | string | No | — | Input field preserved in workflow state. |
price_snapshot | json | No | — | Input field preserved in workflow state. |
metadata | json | No | — | Input field preserved in workflow state. |
usage_started_at | datetime | No | — | Input field preserved in workflow state. |
usage_ended_at | datetime | No | — | Input field preserved in workflow state. |
reservation_uuid | 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.software-delivery.cost-record",
"initial_data": {
"organization_uuid": "value",
"idempotency_key": "value",
"category": "value",
"pricing_status": "value"
}
}