Add architecture package and application skeleton
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
# State Machines
|
||||
|
||||
## TaskStatus
|
||||
|
||||
```text
|
||||
created
|
||||
-> planned
|
||||
-> running
|
||||
-> waiting_confirmation
|
||||
-> waiting_manual
|
||||
-> completed
|
||||
-> failed
|
||||
-> cancelled
|
||||
```
|
||||
|
||||
Правила:
|
||||
|
||||
- `created -> planned`: planner graph создан;
|
||||
- `planned -> running`: есть готовые к исполнению nodes;
|
||||
- `running -> waiting_confirmation`: execution остановлен на pending approval;
|
||||
- `running -> waiting_manual`: policy/manual gate остановил автостарт;
|
||||
- `running -> completed`: finalizer сформировал итог;
|
||||
- `running -> failed`: unrecoverable error;
|
||||
- `waiting_confirmation -> running`: approval получен;
|
||||
- `waiting_manual -> running`: пользователь вручную продолжил выполнение.
|
||||
|
||||
## NodeStatus
|
||||
|
||||
```text
|
||||
pending
|
||||
-> ready
|
||||
-> running
|
||||
-> waiting_confirmation
|
||||
-> completed
|
||||
-> failed
|
||||
-> skipped
|
||||
-> cancelled
|
||||
```
|
||||
|
||||
## ConfirmationStatus
|
||||
|
||||
```text
|
||||
pending
|
||||
-> approved
|
||||
-> rejected
|
||||
-> expired
|
||||
-> cancelled
|
||||
```
|
||||
|
||||
## WorkerSessionStatus
|
||||
|
||||
```text
|
||||
connecting
|
||||
-> online
|
||||
-> busy
|
||||
-> stale
|
||||
-> disconnected
|
||||
```
|
||||
|
||||
## Retry Principles
|
||||
|
||||
- retry выполняется только для явно retryable failures;
|
||||
- retry history фиксируется в node attempts и event log;
|
||||
- confirmation-required state не считается failure;
|
||||
- idempotency must be explicit for side-effecting nodes.
|
||||
|
||||
Reference in New Issue
Block a user