You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step executes at least once, may execute multiple times on failure/retry.
191
+
Step executes at least once on each retry attempt. If the step succeeds but the checkpoint fails (e.g. due to a sandbox crash), the step will re-execute on replay. Use for idempotent operations that can tolerate duplicate execution.
192
192
193
193
**TypeScript:**
194
194
@@ -202,9 +202,9 @@ const result = await context.step(
202
202
);
203
203
```
204
204
205
-
### AT_MOST_ONCE
205
+
### AtMostOncePerRetry
206
206
207
-
Step executes at most once, never retries. Use for non-idempotent operations.
207
+
Step executes at most once per retry attempt. If a crash happens between the pre-step checkpoint and step completion, the step is skipped on replay rather than re-executed. The step can still run across multiple retry attempts. To guarantee at-most-once overall, pair with `retryStrategy: () => ({ shouldRetry: false })`.
208
208
209
209
**TypeScript:**
210
210
@@ -360,4 +360,4 @@ except Exception as error:
360
360
4.**Use appropriate retry strategies** based on operation type
361
361
5.**Handle errors explicitly** - don't let them propagate unexpectedly
362
362
6.**Use custom serialization** for complex types
363
-
7.**Choose correct semantics** (AT_LEAST_ONCE vs AT_MOST_ONCE)
363
+
7.**Choose correct semantics** (`AtLeastOncePerRetry` vs `AtMostOncePerRetry`)
0 commit comments