Add daemon-attached goal recovery operator
Resume goals after transient API failures with persisted exponential backoff while respecting pauses and interruptions.
This commit is contained in:
parent
a4522e5ed6
commit
e4b84d9802
1 changed files with 1595 additions and 0 deletions
33
codex-keep/README.md
Normal file
33
codex-keep/README.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> Running
|
||||
Running --> [*]: operator stopped / close socket / retain checkpoint
|
||||
state Running {
|
||||
state Connection {
|
||||
[*] --> Connect
|
||||
Connect --> Reconcile: WebSocket over Unix socket / initialize
|
||||
Reconcile --> Listen: enumerate loaded threads / subscribe / read goal and latest turn
|
||||
Listen --> Reconcile: poll interval or retry deadline
|
||||
Reconcile --> Reconnect: connection failure
|
||||
Listen --> Reconnect: connection failure
|
||||
Connect --> Reconnect: connection failure
|
||||
Reconnect --> Connect: capped exponential backoff with jitter
|
||||
}
|
||||
--
|
||||
state "Per loaded thread; checkpointed across connections" as Recovery {
|
||||
[*] --> Observe
|
||||
Observe --> Armed: active goal and in-progress turn observed
|
||||
Armed --> Backoff: same goal blocked and same turn failed with transient API error
|
||||
Armed --> Observe: successful turn / reset failure count
|
||||
Armed --> Observe: human interrupt / pause / clear / replacement / limit / completion / non-transient error
|
||||
Backoff --> Check: persisted retry deadline reached
|
||||
Check --> Observe: goal changed / turn changed / thread active or unloaded
|
||||
Check --> Resume: same blocked goal / failed turn / thread idle or systemError
|
||||
Resume --> Armed: goal activated and new turn observed
|
||||
Resume --> Backoff: RPC failure / persist next retry
|
||||
Resume --> Observe: activation observed before next turn
|
||||
Backoff --> Observe: human pause / clear / replacement / limit / completion
|
||||
Observe --> Observe: existing blocked goal or non-transient failure
|
||||
}
|
||||
}
|
||||
```
|
||||
Loading…
Reference in a new issue