Ironflow Execution Engine

Ironflow Execution Engine A lifecycle diagram generated by Archify. 01 / Step lifecycle 02 / Yield and failure 03 / Outcomes Pending · step reached · Step lifecycle 01 Pending step reached Memo check · result cached? · Step lifecycle · by step ID 02 Memo check result cached? by step ID Running · handler executes · Step lifecycle 03 Running handler executes Persist result · before the next step · Step lifecycle · write-ahead 04 Persist result before the next step write-ahead Completed · result memoized · Step lifecycle 05 Completed result memoized Yielded · suspended at a boundary · Yield and failure · sleep / wait / pause Yielded suspended at a boundary sleep / wait / pause Failed · retryable error · Yield and failure · backoff Failed retryable error backoff Permanently failed · no retries left · Yield and failure · no retry, or none left Permanently failed no retries left no retry, or none left enter step hit, skip execution miss handler returned yield resume through the memo check error retry with backoff Legend start active state waiting decision terminal success failure / exit

Write-ahead, not replay-and-hope

  • • Every step checks the DB for a stored result first (internal/engine/engine.go)
  • • A new result is persisted before the next step starts
  • • A failed run resumes from the last successful step

Four ways to yield

  • • step.sleep(name, duration) — resumes when the wake time is reached
  • • step.waitForEvent(name, filter) — resumes when a matching event arrives
  • • step.parallel(name, branches) — resumes when every branch completes
  • • A pause request takes effect at the next step boundary

Failure handling

  • • Retryable errors go back to Running with backoff between attempts
  • • Non-retryable errors, or exhausted retries, end the run permanently
  • • Because results are memoized, a retry never repeats a step that already succeeded