ProcessResult
Import: from stbass import ProcessResult
An immutable (frozen dataclass) result of executing a process. Every process must return one.
Factory Methods
---
### Failure
**Import:** `from stbass import Failure`
A frozen dataclass containing full diagnostic context about a process failure.
#### Fields
| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `error` | `Exception` | required | The exception that caused the failure |
| `process_name` | `str` | `"unknown"` | Name of the failed process |
| `process_id` | `str` | auto UUID | Unique ID of the execution |
| `started_at` | `datetime \| None` | `None` | When execution started |
| `failed_at` | `datetime` | `now()` | When the failure occurred |
| `placement` | `Any \| None` | `None` | Placement info if using PLACED_PAR |
| `parent_process` | `str \| None` | `None` | Parent process name |
| `channel_state` | `dict` | `{}` | State of channels at failure time |
| `checkpoint` | `Any \| None` | `None` | Last checkpoint value before failure |
| `traceback_str` | `str` | `""` | Full Python traceback as string |
#### Properties
| Property | Type | Description |
|----------|------|-------------|
| `elapsed` | `timedelta \| None` | Time between `started_at` and `failed_at`. `None` if `started_at` is not set. |
| `summary` | `str` | One-line summary: `[process_name] ErrorType: message` |
| `detailed` | `str` | Multi-line diagnostic output including traceback |
**Example:**
```python
result = await agent.execute(ctx)
if result.is_fail:
f = result.failure
print(f.summary) # [agent] ValueError: bad input
print(f.elapsed) # 0:00:00.032145
print(f.detailed) # full multi-line diagnostic