#361 CRITICAL: ctx.now is non-deterministic - breaks replay guarantees

closed critical Created 2025-12-11 21:39 · Updated 2025-12-12 14:48

Description

Edit
## Issue The ctx.now property in engine/durable_context.py:486-503 returns datetime.now(timezone.utc) directly without checkpointing. The docstring claims 'In replay mode, this returns the simulated time frozen at the original execution start' but the implementation doesn't do this. ## Impact - Workflows using ctx.now for business logic decisions will behave differently during replay - Data corruption or incorrect branching on replay - Violates Temporal's determinism principle ## Location engine/durable_context.py:486-503 ## Suggested Fix Either checkpoint the first call per workflow OR return workflow_start_time for determinism

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...