durable_execution_sdk/docs/determinism.rs
1//! # Determinism in Durable Executions
2//!
3//! For detailed documentation on determinism requirements, see the
4//! [DETERMINISM.md](https://github.com/aws/durable-execution-sdk-rust/blob/main/durable-execution-sdk/docs/DETERMINISM.md)
5//! file in the repository.
6//!
7//! ## Quick Summary
8//!
9//! Durable execution workflows must be deterministic because they can be replayed.
10//! Common sources of non-determinism to avoid:
11//!
12//! - `HashMap`/`HashSet` iteration order (use `BTreeMap`/`BTreeSet` instead)
13//! - Random number generation outside steps
14//! - `SystemTime::now()` outside steps
15//! - UUID generation outside steps
16//! - Environment variables that affect control flow
17//! - External API calls outside steps
18//!
19//! Use the replay-safe helpers in [`crate::replay_safe`] for deterministic
20//! UUID and timestamp generation.
21
22// This module is documentation-only.