---
source: statum-graph/tests/codebase.rs
expression: "render::json(&doc)"
---
{
"machines": [
{
"index": 0,
"module_path": "codebase::detached",
"rust_type_path": "codebase::detached::Machine",
"role": "protocol",
"label": null,
"description": null,
"docs": null,
"states": [
{
"index": 0,
"rust_name": "Alone",
"label": null,
"description": null,
"docs": null,
"has_data": false,
"direct_construction_available": true,
"is_graph_root": true
}
],
"transitions": [],
"validator_entries": []
},
{
"index": 1,
"module_path": "codebase::named_holder",
"rust_type_path": "codebase::named_holder::Machine",
"role": "protocol",
"label": null,
"description": null,
"docs": null,
"states": [
{
"index": 0,
"rust_name": "Pending",
"label": null,
"description": null,
"docs": null,
"has_data": true,
"direct_construction_available": true,
"is_graph_root": true
},
{
"index": 1,
"rust_name": "Settled",
"label": null,
"description": null,
"docs": null,
"has_data": false,
"direct_construction_available": true,
"is_graph_root": false
}
],
"transitions": [
{
"index": 0,
"method_name": "settle",
"label": null,
"description": null,
"docs": null,
"from": 0,
"to": [
1
]
}
],
"validator_entries": []
},
{
"index": 2,
"module_path": "codebase::task",
"rust_type_path": "codebase::task::Machine",
"role": "protocol",
"label": "Task Machine",
"description": "Owns the exact task execution lifecycle.",
"docs": "Handles the task lifecycle from idle to done.",
"states": [
{
"index": 0,
"rust_name": "Idle",
"label": null,
"description": null,
"docs": null,
"has_data": false,
"direct_construction_available": true,
"is_graph_root": true
},
{
"index": 1,
"rust_name": "Running",
"label": "Running",
"description": "Task execution is active.",
"docs": "Task execution is in progress.",
"has_data": false,
"direct_construction_available": true,
"is_graph_root": false
},
{
"index": 2,
"rust_name": "Done",
"label": null,
"description": null,
"docs": null,
"has_data": false,
"direct_construction_available": true,
"is_graph_root": false
}
],
"transitions": [
{
"index": 0,
"method_name": "start",
"label": "Start Task",
"description": "Moves the task from idle into running work.",
"docs": "Starts task execution.",
"from": 0,
"to": [
1
]
},
{
"index": 1,
"method_name": "finish",
"label": null,
"description": null,
"docs": null,
"from": 1,
"to": [
2
]
}
],
"validator_entries": [
{
"index": 0,
"source_module_path": "codebase::task",
"source_type_display": "TaskRow",
"docs": "Rebuilds task machines from persisted task rows.",
"target_states": [
0,
1,
2
]
}
]
},
{
"index": 3,
"module_path": "codebase::workflow",
"rust_type_path": "codebase::workflow::Machine",
"role": "composition",
"label": "Workflow Machine",
"description": "Tracks workflow progress across task execution.",
"docs": "Coordinates workflow progress around task execution.",
"states": [
{
"index": 0,
"rust_name": "Draft",
"label": null,
"description": null,
"docs": null,
"has_data": false,
"direct_construction_available": true,
"is_graph_root": true
},
{
"index": 1,
"rust_name": "InProgress",
"label": "In Progress",
"description": "Work is currently delegated to a running task.",
"docs": "Workflow execution is delegated to a running task.",
"has_data": true,
"direct_construction_available": true,
"is_graph_root": false
},
{
"index": 2,
"rust_name": "Complete",
"label": null,
"description": null,
"docs": null,
"has_data": false,
"direct_construction_available": true,
"is_graph_root": false
}
],
"transitions": [
{
"index": 0,
"method_name": "start",
"label": "Start Workflow",
"description": "Begins workflow execution with a running task.",
"docs": "Starts the workflow with a running task.",
"from": 0,
"to": [
1
]
},
{
"index": 1,
"method_name": "finish",
"label": null,
"description": null,
"docs": null,
"from": 1,
"to": [
2
]
}
],
"validator_entries": [
{
"index": 0,
"source_module_path": "codebase::workflow",
"source_type_display": "WorkflowRow",
"docs": "Rebuilds workflow machines from persisted workflow rows.",
"target_states": [
0,
1,
2
]
}
]
}
],
"links": [
{
"index": 0,
"from_machine": 1,
"from_state": 0,
"field_name": "child",
"to_machine": 2,
"to_state": 2
},
{
"index": 1,
"from_machine": 3,
"from_state": 1,
"field_name": null,
"to_machine": 2,
"to_state": 1
}
],
"relations": [
{
"index": 0,
"kind": "StatePayload",
"basis": "DirectTypeSyntax",
"semantic": "exact",
"source": {
"StatePayload": {
"machine": 1,
"state": 0,
"field_name": "child"
}
},
"target_machine": 2,
"target_state": 2,
"declared_reference_type": null,
"attested_via": null
},
{
"index": 1,
"kind": "StatePayload",
"basis": "DirectTypeSyntax",
"semantic": "composition_direct_child",
"source": {
"StatePayload": {
"machine": 3,
"state": 1,
"field_name": null
}
},
"target_machine": 2,
"target_state": 1,
"declared_reference_type": null,
"attested_via": null
},
{
"index": 2,
"kind": "TransitionParam",
"basis": "DirectTypeSyntax",
"semantic": "composition_direct_child",
"source": {
"TransitionParam": {
"machine": 3,
"transition": 0,
"param_index": 0,
"param_name": "running_task"
}
},
"target_machine": 2,
"target_state": 1,
"declared_reference_type": null,
"attested_via": null
}
]
}