#215 Replay: Add runtime determinism enforcement
Description
Edit## Problem
Determinism relies on developer discipline with no enforcement:
- Must use ctx.now instead of datetime.now()
- Must use ctx.get_random() + ctx.step() combination
- Must wrap all external calls in ctx.step()
## Impact
- Silent non-determinism causes divergence during replay
- No compile-time or runtime detection
- Production bugs invisible in replays
## Current Gaps
- No linter to catch datetime.now() usage
- No runtime check if random seeded correctly
- No warning if get_random() called outside step()
## Solution
1. Add runtime check in DurableContext that warns on datetime.now() detection
2. Create ruff custom rule for determinism violations
3. Add ctx.get_random() validation outside step() context
4. Document all determinism requirements clearly
## Effort: Medium
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...