Repository navigation
Let the worker-protocol runner read the replay_clock entry carrier - #1307
Merged
Merged
Conversation
WorkflowFiberRunner took Workflow::now() at entry from the WorkflowStarted event time. That event is written with its own now(), separate from the run's started_at, which the embedded executor and the Server's WorkerReplayClock v1 carrier use. The runner now accepts the task's replay_clock object as an optional replayClock argument. When it validates for the run and its source agrees with the history's start kind, ordinary entry uses its started_at. A redrive anchor the history proves is kept, and without a carrier entry is unchanged, so runs already in flight replay identically. Refs durable-workflow/.github#215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The corpus counterfactual runs this harness against base source, where the runner has no replayClock parameter. Passing it only for fixtures that carry a replay_clock keeps every other fixture runnable on base, so only the new fixture fails there. Refs durable-workflow/.github#215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs durable-workflow/.github#215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Independent review: PASS at e30e661 A reviewer in a fresh context reviewed this PR's own changes against main and .github#215. The merge of main only resolved a CHANGELOG conflict. Verified
Blocking: none. Non-blocking
|
rmcdaniel
enabled auto-merge
November 26, 2026 04:05
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
The embedded side of the cross-SDK replay-clock check for durable-workflow/.github#215.
Finding.
started_atat entry.WorkflowExecutorandQueryStateReplayercallWorkflowExecution::start(..., RedriveReplayClock::startedAt($run)), which readsworkflow_runs.started_at, or the redrivereplayed_started_at. Server'sWorkerReplayClockv1 carrier reads that same column, so embedded entry already equals the carrier.WorkflowFiberRunner, used by external PHP workers. It took entry from theWorkflowStartedevent'srecorded_at. That timestamp comes from its ownnow()call, separate from the run'sstarted_at:DefaultWorkflowControlPlanesets$startedAt = now()andWorkflowHistoryEventrecords$now = now(), and the native server'sappenddoes the same. So the two can differ by microseconds.Change.
WorkflowFiberRunnertakes an optionalreplayClockargument, the task'sreplay_clockobject, on its constructor and onforClass().started_at, which is the reference. A valid carrier has exactly the four v1 keys, the v1 schema, the runner's run id, strict six-digit UTC withZon a real date, and one of the two sources.WorkflowStartedtime, so external runs already in flight replay unchanged. This is additive.Evidence
tests/Unit/V2/WorkflowFiberRunnerEntryCarrierTest.php(13 tests) covers:WorkflowStartedtime;worker-protocol-entry-replay-clock-carrierusesworker_task.replay_clock. Both corpus runners forward it to the runner. It fails on base and passes here.WorkflowFiberRunnerEntryCarrierTest,WorkflowFiberRunnerTestandReplayRegressionCorpusTestpass (293 tests), and phpstan and ecs are clean on the changed files. CI runs the full suites and the corpus counterfactual.Refs durable-workflow/.github#215
🤖 Generated with Claude Code