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
{{ message }}
Repository navigation
Replay a redriven run with the failed run's start time #232
When a failed run is redriven, the new run's history starts with a WorkflowStarted whose recorded_at is the redrive time. Embedded Core replays such a run from the failed run's start time, carried as WorkflowStarted.replayed_started_at. The Python SDK ignores that key. ctx.now() and anything derived from the start clock, such as ctx.uuid7(), return redrive-time values in the new run.
Workflow code that reads the clock before the failed step therefore gets different values than the failed run did, so retried activity arguments or branches can change. This was reproduced by cold-replaying a hand-built redriven history with the current SDK: the reused side effect, version marker, timer and activity all replayed correctly, but ctx.now() returned 10:05 (the redrive) instead of 10:00 (the failed run's start).
The SDK also does not read the per-step reused_from_run_id / reused_recorded_at keys that workflow#991 and #992 add to ActivityCompleted, SideEffectRecorded, VersionMarkerRecorded and TimerFired.
Expected
When recovery_kind == "redrive" and replayed_started_at is present, use it as the run start time for the workflow clock.
Accept the reused keys on the four events, and prefer reused_recorded_at wherever the SDK reads an event's time.
Acceptance
A redriven history with a reused side effect, version marker, fired timer and activity replays cold to the same next command as Core's redrive-reused-markers-clock and redrive-reused-timer-clock fixtures.
ctx.now() equals the failed run's start time.
test_history_event_contract.py lists the new keys.
Activity