Skip to content

Document update validators and replay-aware workflow logging - #617

Merged
rmcdaniel merged 7 commits into
mainfrom
general/validators-and-workflow-logging
Nov 26, 2026
Merged

rmcdaniel merged 7 commits into
mainfrom
general/validators-and-workflow-logging

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Documents update validators (durable-workflow/.github#234) and replay-aware workflow logging (durable-workflow/.github#227).

Changes

  • docs/features/updates.md: a new section, Validate updates before acceptance. It covers embedded #[UpdateValidator]: what triggers a rejection (update_validator_rejected, rejected_invalid_arguments) and what gets recorded, that validators are read-only, the rule that a generator validator is rejected, the failure path (UpdateValidationFailedException and the retryable webhook 503), that keyed retries reuse the earlier answer, and the locking and visibility caveats.
  • docs/constraints/workflow-constraints.md: the workflow logging section now covers the replay-aware logger in embedded ($this->logger(), replayState(), isReplaying()), the PHP SDK, Rust and Python, with an embedded example. It also describes when lines are written: embedded after the workflow task's database transaction commits, the PHP SDK after the Server accepts the task. Run identity is claimed only for the embedded, PHP SDK and Rust loggers; Python's ctx.logger is silent during replay but adds no identity.
  • docs/polyglot/php.md: new Update validators and Replay-aware workflow logging sections for the PHP SDK.
  • docs/polyglot/rust.md: a new Update validators subsection under Workflow updates.
  • All seven offered languages are translated (uk, es, pt-BR, zh-Hans, ja, fr, de). Code blocks are identical to English, and each locale's source-hashes.json records the reviewed English SHA-256 for the four guides.

Source PRs

Release versions

Workflow 2.42.0, PHP SDK 3.32.0 and Rust SDK 4.25.0 are released, and their changelogs at the release tags confirm the versions named in the text, in English and all locales. Those releases also ship worker interceptors, which wrap update validation tasks (executeUpdateValidation() in embedded and the PHP SDK, execute_update_validation_task in Rust) with a read-only view of the validator's decision, so the guides now say that instead of "validators don't pass through worker interceptors".

Checks run locally

DOCS_TRANSLATION_BASE=<origin/main> node scripts/check-doc-translations.js passes: current-guide hashes, changed-guide translations in all seven locales, and code blocks matching English. check-doc-translation-updates.test.js passes. The full npm run build was not run locally because the host is overloaded; CI covers it.

🤖 Generated with Claude Code

rmcdaniel and others added 2 commits November 25, 2026 21:19
Embedded updates guide: pre-acceptance validators. Workflow constraints:
the replay-aware logger for embedded, PHP, Rust and Python. PHP guide:
update validators and $context->logger(). Rust guide: update validators.

Refs durable-workflow/.github#234, durable-workflow/.github#227

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the update validator sections of the embedded updates guide and the
PHP and Rust guides, the PHP workflow logging section, and the revised
workflow logging guidance on the constraints page in all seven offered
languages, with identical code blocks and recorded reviewed-source hashes.

Refs durable-workflow/.github#234, durable-workflow/.github#227

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rmcdaniel and others added 2 commits November 25, 2026 21:59
Embedded workflow lines are written after the workflow task's database
transaction commits; PHP SDK lines after the Server accepts the workflow
task. Rolled-back, superseded, declined and refused attempts write
nothing; code parked on a pending handle logs once; side-effect closures
and validators never log; lines are lost if the worker dies between the
commit or acceptance and the write. The updates guide notes that
validators are not intercepted. All seven languages and their reviewed
source hashes are updated.

Refs durable-workflow/.github#227, durable-workflow/.github#234

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The updates guide says update() includes the reason and the validator's
message, lists getVersion() and patched() among the refused durable
calls, and uses a fully qualified RuntimeException in its example. The
constraints page claims run identity only for the embedded, PHP SDK and
Rust loggers; Python's ctx.logger is silent during replay but adds none.
All seven languages and their reviewed source hashes are updated.

Refs durable-workflow/.github#234, durable-workflow/.github#227

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

Copy link
Copy Markdown
Member Author

Independent docs review: PASS at e8e61369be4d98af39c15e6078e665635badd7d4.

The reviewer checked the English text against the merged code:

All 7 locales carry the same sections, identical code blocks, links and anchors, and current source-hashes.json entries. The review notes are applied: the update() wording, getVersion()/patched() added to the refused calls, \RuntimeException in the example, and Python's logger no longer claimed to add run identity.

Open before merge:

  • The version numbers (Workflow 2.42.0, PHP SDK 3.32.0, Rust SDK 4.25.0) are the expected next releases. Confirm them at release time, in English and every locale.
  • CI has no docs-build check yet.

rmcdaniel and others added 2 commits November 26, 2026 11:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Workflow 2.42.0, PHP SDK 3.32.0 and Rust SDK 4.25.0 ship worker
interceptors in the same release as update validators, and each wraps
update validation tasks with a read-only view of the decision.

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

Copy link
Copy Markdown
Member Author

Independent docs review: PASS at b93661f (re-review after the version confirmation and interceptor sentences). The new 'interceptors wrap update validation but can't change the decision' sentences match Workflow 2.42.0 executeUpdateValidation(), PHP SDK 3.32.0 WorkerInterceptorChain::updateValidation and Rust SDK 4.25.0 execute_update_validation_task. Validators, the logger and interceptors first ship in Workflow 2.42.0, PHP SDK 3.32.0 and Rust SDK 4.25.0 (none exist at the previous tags). The merge of main is a hash-only conflict, resolved correctly. All 7 locales match, including uk, and the hashes are correct. CI is green. Blocking: none.

@rmcdaniel
rmcdaniel enabled auto-merge November 26, 2026 11:36
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit e1c5abe into main Nov 26, 2026
11 checks passed
rmcdaniel added a commit that referenced this pull request Nov 26, 2026
Resolves the source-hashes.json conflicts with #617 by taking main's
entries and recording the merged English sha256 for the three guides
this branch changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rmcdaniel added a commit that referenced this pull request Nov 26, 2026
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>
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