Skip to content

Commit 128b4dd

Browse files
committed
docs: diagram lifecycle recovery
1 parent e40ecd7 commit 128b4dd

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,48 @@ OBS compatibility mode can also read and update:
129129

130130
### Recovery Behavior
131131

132+
Every recovery path first preserves ownership and retry state. Media must be fresh and YouTube ingest active before reconciliation can create or transition anything.
133+
134+
```mermaid
135+
stateDiagram-v2
136+
state "Startup or restart" as RecoveryStartup
137+
state "Retry deadline pending" as RecoveryWait
138+
state "Probe camera source" as RecoveryProbe
139+
state "Start and supervise FFmpeg" as RecoveryEncoder
140+
state "Wait for active ingest" as RecoveryIngest
141+
state "Reconcile marked broadcast" as RecoveryReconcile
142+
state "Resume same event" as RecoveryResume
143+
state "Create unlisted generation" as RecoveryCreate
144+
state "Testing, live, and health gates" as RecoveryGates
145+
state "Verified public stream" as RecoveryStable
146+
state "Persist source cooldown" as RecoverySourceBackoff
147+
state "Persist API, quota, or ambiguity cooldown" as RecoveryControlBackoff
148+
state "Prior event terminal or missing" as RecoveryTerminal
149+
150+
[*] --> RecoveryStartup
151+
RecoveryStartup --> RecoveryWait : deadline still active
152+
RecoveryWait --> RecoveryStartup : deadline expires or host restarts
153+
RecoveryStartup --> RecoveryProbe : no active deadline
154+
RecoveryProbe --> RecoverySourceBackoff : source unavailable
155+
RecoverySourceBackoff --> RecoveryWait
156+
RecoveryProbe --> RecoveryEncoder : source available
157+
RecoveryEncoder --> RecoveryIngest
158+
RecoveryIngest --> RecoverySourceBackoff : media stops or ingest stays inactive
159+
RecoveryIngest --> RecoveryReconcile : media fresh and ingest active
160+
RecoveryReconcile --> RecoveryResume : one marked nonterminal event
161+
RecoveryReconcile --> RecoveryCreate : no recoverable event
162+
RecoveryReconcile --> RecoveryControlBackoff : API, quota, or ambiguous state
163+
RecoveryCreate --> RecoveryResume : insert and bind verified
164+
RecoveryResume --> RecoveryGates
165+
RecoveryGates --> RecoveryStable : two healthy live observations and privacy readback
166+
RecoveryResume --> RecoverySourceBackoff : camera or FFmpeg interruption
167+
RecoveryGates --> RecoveryControlBackoff : control-plane failure before public verification
168+
RecoveryControlBackoff --> RecoveryWait
169+
RecoveryStable --> RecoveryResume : media path recovers with the same watch URL
170+
RecoveryResume --> RecoveryTerminal : YouTube confirms terminal or missing
171+
RecoveryTerminal --> RecoveryCreate : next generation only
172+
```
173+
132174
| Failure | Expected behavior |
133175
| --- | --- |
134176
| Camera offline before stream start | Source probe fails; no new broadcast is created; source backoff is persisted. |

0 commit comments

Comments
 (0)