feat(conductor): task state machine — TIMED_OUT state and retriable steps

- Add 'timed_out' to flow_runs/flow_steps CHECK constraints
- Add retry_count and max_retries columns to flow_steps
- Add timeout detection in advanceInner loop (configurable FLOW_STEP_TIMEOUT_MS)
- Add retriable logic: re-dispatch on timeout if maxRetries > 0 and retryCount < maxRetries
- Add isRetriable() + shouldRetry() pure decision functions
- Add timed_out handling to reconcileResumeStep and reconcileRun
- Add 'timed_out' to ws-frames enum, publishStep status type
This commit is contained in:
2026-06-08 02:43:45 +00:00
parent f2401352a8
commit c4ee377dbc
8 changed files with 207 additions and 19 deletions

View File

@@ -52,6 +52,7 @@ const emptyState = (over: Partial<SchedulerState> = {}): SchedulerState => ({
skipped: new Set(),
inFlight: new Set(),
excluded: new Set(),
timedOut: new Set(),
...over,
});