Skip to content

Document the advancing replay clock - #619

Merged
rmcdaniel merged 9 commits into
mainfrom
general/215-replay-clock-guides
Nov 26, 2026
Merged

rmcdaniel merged 9 commits into
mainfrom
general/215-replay-clock-guides

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Released versions. This page set documents the replay-safe clock as it ships in Python SDK 2.24.0, Rust SDK 4.25.0 and PHP SDK 3.32.0 (value at entry), Server 3.30.0 (replay_clock on query and update-validation tasks) and Workflow 2.42.0 (the worker-protocol runner reads the carrier). The guides name those versions in English and all locales.

What changes

  • docs/polyglot/python.md:

    • an API-table row for ctx.replay_now();
    • a new "Advancing replay clock" section (#advancing-replay-clock);
    • updated rows in the cross-SDK clock table;
    • a sentence on event ordering.

    The new section covers:

    • the value at entry, which is the run's start from the task's replay_clock (Server 3.6.0+), and the recorded time after each supported consumed step;
    • a deadline-loop example;
    • that repeated reads and replays return the same values;
    • the unavailable cases. Inline and local families stay unavailable until Core defines a persisted time for them;
    • that an unhandled error fails the workflow;
    • the Python/Rust query and validation rule;
    • release status and the upgrade note;
    • a "Clock reads after inline steps are not portable" subsection (#inline-step-clock-reads) recording the .github#215 decisions of 2026-11-26: after side effects, version markers, memo and search-attribute updates and local activities, service-mode SDKs report the clock unavailable, embedded Workflow::now() moves to the step's recorded time, and the external-worker WorkflowFiberRunner keeps the previous boundary time. Its version-marker first-execution/replay divergence stays deliberately (pinned by repeated-version-legacy-clock-boundaries). Mixed embedded/external fleets are unsupported for clock reads right after side effects and memo/search-attribute updates.

    The clock table now lists Rust replay_now() and PHP replayNow() instead of "no clock".

  • docs/polyglot/rust.md: a "Replay-safe workflow time" section, and a determinism-table row pointing to ctx.replay_now().

  • docs/polyglot/php.md: a "Replay-safe workflow time" section. The PHP and Rust sections point to the inline-step subsection.

  • Locales: all seven (de, es, fr, pt-BR, uk, ja, zh-Hans) are translated with matching {#id} anchors. Each source-hashes.json records the new English hashes, and checkTranslationUpdates passes locally.

Sources: sdk-python #380/#382, sdk-rust #321, sdk-php #485/#489 and server #1338 (all merged), and the decisions on durable-workflow/.github#215 to keep inline and local families unavailable and to document clock reads after inline steps as not portable.

Refs durable-workflow/.github#215, website#302

🤖 Generated with Claude Code

Describes ctx.replay_now(), replay_now() and replayNow() as they ship in
the next SDK and Server releases: the run's start at ordinary entry from
the task's replay_clock, each supported consumed step's recorded time
afterwards, the unavailable cases (including inline and local families
until Core defines a persisted time), the query and validation rule, and
the upgrade note. The cross-SDK clock table now lists the service-mode
clocks. All seven locales and their source hashes are updated.

Refs durable-workflow/.github#215

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rmcdaniel rmcdaniel added the agent:general Pull request opened by General agent label Nov 25, 2026
rmcdaniel and others added 2 commits November 26, 2026 00:02
Review of #619: query handlers can read the clock in Python and Rust when
the queried history ends at a supported scalar boundary; only PHP is always
unavailable. Also notes the redrive-successor entry instant, that the clock
is not guaranteed monotonic, which SDKs ship which rule, offline replay and
WorkflowEnvironment, mixed-version and Server-upgrade cases in the upgrade
note, embedded side-effect time on first execution too, and links the
polling recipe to the new section. All seven locales and hashes updated.

Refs durable-workflow/.github#215

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g wording

Re-review of #619: the de, ja and zh-Hans PHP pages lacked the
redrive-successor parenthetical. The polling recipe now says
ctx.replay_now() already advances in Python SDK 2.15.0 and later, and that
only its entry value is new in the next release. Hashes updated.

Refs durable-workflow/.github#215

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rmcdaniel

Copy link
Copy Markdown
Member Author

Independent review: PASS at 72f637175b01c90d90681a4cf567608e5bdb31c7 after two rounds. All 11 checks pass.

Round 1 (blocking): the pages said query handler reads were unavailable in every SDK. In fact Python and Rust return the time when the queried history ends at a supported scalar boundary; PHP is always unavailable.

Round 2 (blocking): the redrive parenthetical was missing from the de, ja and zh-Hans php.md pages.

Both are fixed, along with the non-blocking items:

  • redrive entry;
  • not monotonic;
  • release split;
  • upgrade triggers;
  • Python offline replay;
  • polling-patterns wording.

Verified:

  • every claim against merged sdk-python, sdk-rust, sdk-php, server and workflow code;
  • real translations in all 7 locales;
  • all 28 source-hashes.json entries equal the English sha256;
  • identical {#id} anchors.

This stays a draft describing the next release; General takes it out of draft at release time.

🤖 Generated with Claude Code

rmcdaniel and others added 3 commits November 26, 2026 04:39
Record the .github#215 decisions in the canonical advancing replay clock
section: service-mode SDKs report the clock unavailable after side effects,
version markers, memo and search-attribute updates and local activities;
embedded Workflow::now() moves to the step's recorded time; the
external-worker WorkflowFiberRunner keeps the previous boundary time, with
the deliberate version-marker first-execution/replay divergence pinned by
repeated-version-legacy-clock-boundaries; and mixed embedded/external fleets
are unsupported for clock reads right after those steps. Point to it from
the PHP and Rust guides and carry the change into all seven locales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python SDK 2.24.0, Rust SDK 4.25.0 and PHP SDK 3.32.0 return the run's
start at entry, Server 3.30.0 sends replay_clock on query and
update-validation tasks, and Workflow 2.42.0 lets the worker-protocol
runner read the carrier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rmcdaniel rmcdaniel changed the title Document the advancing replay clock (next release) Document the advancing replay clock Nov 26, 2026
@rmcdaniel

Copy link
Copy Markdown
Member Author

Independent docs review: CHANGES REQUESTED at 360af81

Verified: the version fill-ins (Python SDK 2.24.0, Rust SDK 4.25.0, PHP SDK 3.32.0 ship the entry value; server#1338 is in 3.30.0 and not 3.29.0; Workflow 2.42.0 adds replayClock to WorkflowFiberRunner; "from Python SDK 2.24.0"). The service SDKs do leave the clock unavailable after inline steps (Python excludes RecordLocalActivity, as do Rust's docs and PHP's BusinessReplayClock::consume). The embedded executor resumes at recorded times. The repeated-version-legacy-clock-boundaries fixture exists. All 7 locales carry {#inline-step-clock-reads}, and the hashes and code blocks match. CI is green.

BLOCKING

  1. python.md:983-990 (and all locales) misdescribes the external-worker runner. In Workflow 2.42.0, WorkflowFiberRunner treats side effects, memo updates and search-attribute updates exactly like version markers. A first execution keeps the previous boundary time. A replay reads the step's recorded_at (indexRecordedSideEffects/MemoUpserts/SearchAttributeUpserts → eventRecordedAt). A probe at the 2.42.0 tag showed side effect 10:00 first and 10:05 on replay, and memo 10:00 first and 10:07 on replay. Fix: describe all four alike, and keep the note that the version-marker case is pinned by the fixture.
  2. python.md:991-998: "embedded first execution, external replay" reads the same recorded time on both sides for those steps. The divergence happens whenever the first execution ran on the external runner, including in a fleet of only external workers. Fix: make the advice unconditional (don't rely on a clock read right after an inline step; read the clock after the next durable step) and name the external runner case. Update all 7 locales and the hashes.

rmcdaniel and others added 2 commits November 26, 2026 11:37
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Workflow 2.42.0's WorkflowFiberRunner, side effects, memo and
search-attribute updates and version markers all keep the previous
boundary time on first execution and read the step's recorded time on
replay. Describe all four alike, keep the note that the version-marker
case is pinned by the replay fixture, and make the advice unconditional:
read the clock after the next durable step. Carry the change into all
seven locales and refresh their source hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rmcdaniel

Copy link
Copy Markdown
Member Author

Independent docs review: PASS at adb03eb (re-review). The external-runner bullet now matches the Workflow 2.42.0 WorkflowFiberRunner: side effects, memo and search-attribute updates and version markers keep the previous boundary time on first execution and read recorded_at on replay, as a probe at the tag shows. The fleets-of-only-external-workers case is covered, and the advice is unconditional. All 7 locales are faithful, and the code blocks, IDs and hashes match. CI is green. Blocking: none. It must merge main once #617/#618/#622 have landed (hash-only conflicts).

Resolves the source-hashes.json conflicts with #617, #618 and #622 by
taking main's entries and recording the merged English sha256 for the
guides this branch changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rmcdaniel

Copy link
Copy Markdown
Member Author

Merged main (b2da71c) after #617, #618 and #622 landed. The only conflicts were the seven source-hashes.json files, resolved with main's entries plus the merged English sha256 for this PR's guides. check-doc-translations.js passes.

@rmcdaniel
rmcdaniel marked this pull request as ready for review November 26, 2026 11:58
@rmcdaniel
rmcdaniel enabled auto-merge November 26, 2026 11:58
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit d792980 into main Nov 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:general Pull request opened by General agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant