Skip to content

Use persisted workflow-start clocks during cold replay - #147

Merged
rmcdaniel merged 1 commit into
mainfrom
fix/146-persisted-replay-clock
Oct 13, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
fix/146-persisted-replay-clock

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Actual supported Workflow bridge histories omit WorkflowStarted.payload.timestamp, so Python currently falls back to wall time and returns different ctx.now() values on identical cold reads. This seeds the fixed workflow-start clock from canonical recorded_at when the optional explicit timestamp is absent, preserving explicit timestamp precedence and making UUIDv7 use the same validated clock.

Clock-dependent replay reports missing or invalid persisted time rather than using wall time. Empty local authoring and marker-only partial histories retain their existing use; marker clocks, original histories and the shared reader are unchanged.

Adds a minimal replay-corpus reproduction and controls for repeated cold reads, marker boundaries, explicit precedence, malformed/missing timestamps and UUIDv7. Validation: 310 focused source checks, Ruff and mypy pass. Normally installed 2.5.12 fails all 27 new regressions while passing both compatibility controls. Source CI, exact stable backport and normally installed consumer qualification remain required. This preserves Python's workflow-start clock contract and makes no PHP per-command clock-parity claim.

Refs #146.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Reviewed the persisted-clock implementation and minimal corpus case. The exact source tree 1ec1608d768d067b5ce7314ba6c36db57664e73f at 3abe8abcbb6115eda04265ed4c46ff0134010c6e passes the complete normal CI38348692021 after rerunning the reset-interrupted integration. Original cancelled attempt is preserved. Docs and public boundaries pass.

The private stable candidate also passes159 installed clock/corpus/marker controls, including the formerly plugin-blocked asynchronous cases. Two fresh interpreter executions on the unchanged genuine PHP bridge wire produce identical original-start clocks and UUIDv7 with exact typed values. Explicit payload timestamp precedence/offsets and deterministic refusal of missing or malformed persisted time remain intact. Partial marker-only histories can still replay without accessing a clock. This preserves Python's fixed start-clock model.

Merging the source correction. Independent stable148 still requires its full CI, connected worker consumers and normal publication/installed verification; no published2.5.13 claim yet.

@rmcdaniel
rmcdaniel marked this pull request as ready for review October 13, 2026 05:38
@rmcdaniel
rmcdaniel merged commit e2602c3 into main Oct 13, 2026
21 of 23 checks passed
@rmcdaniel
rmcdaniel deleted the fix/146-persisted-replay-clock branch October 13, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants