catalyst-workflow-determinism

Installation
SKILL.md

Workflow Determinism

Goal: for every line inside a workflow function, be able to say why it produces the same value on the tenth execution as on the first. Where you cannot, either move it to an activity or take the value from the workflow context.

The mechanism

A workflow function is not run once. It is re-executed from the first line every time the engine needs to advance it — after a crash, a worker restart, a scale event, or a timer firing days later. On each re-execution the function emits a sequence of actions (schedule this activity, create this timer, start this child workflow). The engine compares that sequence against the events already recorded in history:

  • Same sequence — the engine returns the recorded results without re-running anything and the workflow continues from where it left off.
  • Different sequence — history and code disagree. The instance cannot advance.

Two properties make this the hardest class of bug in the system:

Installs
23
GitHub Stars
2
First Seen
Oct 1, 2026