From 653fd98ea88ca80e1e237fdc1da450bda6ec29c5 Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Thu, 19 Nov 2026 13:30:44 +0000 Subject: [PATCH 1/2] Document comment-only edits under versioned fingerprints From the release with durable-workflow/workflow#1239 (#1227), runs record token fingerprints that ignore comments and whitespace, so comment-only edits to workflow classes and await() conditions keep replay. Runs started earlier keep raw-line fingerprints and still treat such edits as definition changes. Adds the note to the workflow constraints page in every locale. Co-Authored-By: Claude Opus 5.5 --- docs/constraints/workflow-constraints.md | 6 ++++++ .../current/constraints/workflow-constraints.md | 6 ++++++ i18n/de/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 6 ++++++ i18n/es/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 6 ++++++ i18n/fr/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 6 ++++++ i18n/ja/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 6 ++++++ i18n/pt-BR/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 6 ++++++ i18n/uk/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 6 ++++++ i18n/zh-Hans/source-hashes.json | 2 +- 15 files changed, 55 insertions(+), 7 deletions(-) diff --git a/docs/constraints/workflow-constraints.md b/docs/constraints/workflow-constraints.md index bb4713990e6..a915693d09c 100644 --- a/docs/constraints/workflow-constraints.md +++ b/docs/constraints/workflow-constraints.md @@ -53,3 +53,9 @@ It can't see calls made through helper or service classes, values that depend on First-release scope: boot-time scanning is the only blocking workflow-mode guardrail. The runtime does not rerun determinism diagnostics again at workflow-task claim time. That deferral is intentional for 2.0: boot scanning catches locally registered PHP workflows before rollout, and Waterline surfaces definition-fingerprint drift for long-lived runs without turning cross-build claims into a new source of deploy failures. Pre-fingerprint runs also follow a conservative first-release policy. If a run reaches a new `getVersion()` branch and its `WorkflowStarted` history predates the fingerprint snapshot, the runtime keeps that run on `WorkflowStub::DEFAULT_VERSION` instead of assuming the current definition is safe. See [Versioning](../features/versioning.md). + +### Comment and formatting edits {#comment-only-edits} + +From 2.34, editing only comments, docblocks or whitespace in a workflow class, its traits or parent workflow classes, or inside an `await()` condition closure doesn't change how runs started on 2.34 or later replay. Those runs record definition fingerprints of the PHP code tokens without comments and whitespace (prefix `sha256-tokens:`). + +Runs started on an earlier release recorded fingerprints of the raw source lines (prefix `sha256:`) and are still compared that way. For those runs a comment edit is a definition change: a missing `getVersion()` or `patched()` marker takes `WorkflowStub::DEFAULT_VERSION`, and an edited condition closure fails replay. Make such edits after those runs finish, or treat them like any other change. diff --git a/i18n/de/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/de/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index d7961c55780..d918b92f00d 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -53,3 +53,9 @@ Aufrufe über Hilfs- oder Service-Klassen, Werte, die vom Prozesszustand abhäng Im Umfang der ersten Veröffentlichung ist die Startprüfung die einzige blockierende Schutzprüfung für den Workflow-Modus. Beim Beanspruchen einer Workflow-Aufgabe führt die Laufzeitumgebung keine zusätzliche Determinismusdiagnose aus. Diese Entscheidung für 2.0 erlaubt es, lokal registrierte PHP-Workflows vor der Bereitstellung zu prüfen. Waterline zeigt abweichende Definitionsfingerprints bei lang laufenden Workflows, ohne zusätzliche Bereitstellungsfehler durch Aufgaben verschiedener Builds zu erzeugen. Auch Läufe ohne Fingerprint folgen einer vorsichtigen Regel. Erreicht ein Lauf einen neuen `getVersion()`-Zweig und stammt seine `WorkflowStarted`-Historie aus der Zeit vor dem Fingerprint-Snapshot, bleibt der Lauf auf `WorkflowStub::DEFAULT_VERSION`. Die aktuelle Definition wird nicht automatisch als sicher angenommen. Siehe [Versionierung](../features/versioning.md). + +### Änderungen an Kommentaren und Formatierung {#comment-only-edits} + +Ab 2.34 ändert das reine Bearbeiten von Kommentaren, Docblocks oder Leerraum in einer Workflow-Klasse, ihren Traits oder übergeordneten Workflow-Klassen oder innerhalb einer `await()`-Bedingungs-Closure nicht, wie Läufe, die ab 2.34 gestartet wurden, beim Replay ausgeführt werden. Diese Läufe zeichnen Definitions-Fingerprints der PHP-Code-Tokens ohne Kommentare und Leerraum auf (Präfix `sha256-tokens:`). + +Läufe, die mit einem früheren Release gestartet wurden, haben Fingerprints der unveränderten Quellzeilen aufgezeichnet (Präfix `sha256:`) und werden weiterhin so verglichen. Für diese Läufe ist eine Kommentaränderung eine Definitionsänderung: Ein fehlender `getVersion()`- oder `patched()`-Marker ergibt `WorkflowStub::DEFAULT_VERSION`, und eine geänderte Bedingungs-Closure lässt das Replay fehlschlagen. Nehmen Sie solche Änderungen erst vor, wenn diese Läufe beendet sind, oder behandeln Sie sie wie jede andere Änderung. diff --git a/i18n/de/source-hashes.json b/i18n/de/source-hashes.json index 2b249f3d5e0..1bd4cf66fb2 100644 --- a/i18n/de/source-hashes.json +++ b/i18n/de/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "f80f68b13877a67469a313b9fdcdbb27c1de6fe102cdfddb15e2af95997d2517", + "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/es/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/es/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index e4e802e6258..1475ae575e2 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -80,3 +80,9 @@ una política conservadora. Si una ejecución llega a una nueva rama de `getVersion()` y su evento `WorkflowStarted` es anterior a la captura de la huella, el runtime mantiene esa ejecución en `WorkflowStub::DEFAULT_VERSION`. Consulta [Versionado](../features/versioning.md). + +### Cambios en comentarios y formato {#comment-only-edits} + +Desde 2.34, editar solo comentarios, docblocks o espacios en blanco en una clase de workflow, sus traits o sus clases de workflow padre, o dentro de una closure de condición de `await()`, no cambia el replay de las ejecuciones iniciadas en 2.34 o posteriores. Esas ejecuciones registran huellas de definición de los tokens de código PHP sin comentarios ni espacios en blanco (prefijo `sha256-tokens:`). + +Las ejecuciones iniciadas en una versión anterior registraron huellas de las líneas de código fuente literales (prefijo `sha256:`) y se siguen comparando así. Para esas ejecuciones, editar un comentario es un cambio de definición: un marcador `getVersion()` o `patched()` ausente toma `WorkflowStub::DEFAULT_VERSION`, y una closure de condición editada hace fallar el replay. Haga esas ediciones cuando esas ejecuciones hayan terminado, o trátelas como cualquier otro cambio. diff --git a/i18n/es/source-hashes.json b/i18n/es/source-hashes.json index 2b249f3d5e0..1bd4cf66fb2 100644 --- a/i18n/es/source-hashes.json +++ b/i18n/es/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "f80f68b13877a67469a313b9fdcdbb27c1de6fe102cdfddb15e2af95997d2517", + "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/fr/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index 8cc8676c3c0..6a53dd57bb9 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -55,3 +55,9 @@ Elle ne voit pas les appels passant par des classes d’aide ou de service, les Dans le périmètre initial de 2.0, l’analyse au démarrage est le seul contrôle de déterminisme qui peut bloquer un workflow. Le runtime ne relance pas ces diagnostics lors de la prise d’une tâche de workflow. L’analyse vérifie les workflows PHP enregistrés localement avant leur déploiement. Waterline affiche les changements d’empreinte de définition des exécutions longues, sans faire de la prise de tâches entre builds une nouvelle source d’échec du déploiement. Les exécutions antérieures aux empreintes suivent aussi une politique prudente. Si une exécution atteint une nouvelle branche `getVersion()` et que son événement `WorkflowStarted` précède l’instantané d’empreinte, le runtime conserve `WorkflowStub::DEFAULT_VERSION`. Il ne suppose pas que la définition actuelle permet une relecture sûre. Consultez la [gestion des versions](../features/versioning.md). + +### Modifications des commentaires et de la mise en forme {#comment-only-edits} + +À partir de 2.34, modifier uniquement des commentaires, des docblocks ou des espaces dans une classe de workflow, ses traits ou ses classes de workflow parentes, ou dans une closure de condition `await()`, ne change pas la relecture des exécutions démarrées en 2.34 ou plus tard. Ces exécutions enregistrent des empreintes de définition calculées sur les tokens de code PHP, sans commentaires ni espaces (préfixe `sha256-tokens:`). + +Les exécutions démarrées avec une version antérieure ont enregistré des empreintes des lignes de source brutes (préfixe `sha256:`) et sont toujours comparées ainsi. Pour ces exécutions, modifier un commentaire est un changement de définition : un marqueur `getVersion()` ou `patched()` absent prend `WorkflowStub::DEFAULT_VERSION`, et une closure de condition modifiée fait échouer la relecture. Faites ces modifications une fois ces exécutions terminées, ou traitez-les comme tout autre changement. diff --git a/i18n/fr/source-hashes.json b/i18n/fr/source-hashes.json index 2b249f3d5e0..1bd4cf66fb2 100644 --- a/i18n/fr/source-hashes.json +++ b/i18n/fr/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "f80f68b13877a67469a313b9fdcdbb27c1de6fe102cdfddb15e2af95997d2517", + "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/ja/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index 05595ec1c64..03f53e539a7 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -55,3 +55,9 @@ CI では `DW_V2_GUARDRAILS_BOOT=throw` にして、安全でないリプレイ 初回リリースのワークフローモードでは、起動時スキャンだけが処理を阻止できるガードレールです。ランタイムはワークフロータスクの取得時に決定性診断を再実行しません。2.0 では、ローカルに登録した PHP ワークフローをデプロイ前に検査し、長期間実行中の定義フィンガープリントの変化は Waterline に表示します。異なるビルド間のタスク取得が、新たなデプロイ障害の原因になるのを避けています。 フィンガープリント記録以前の実行にも、保守的な方針を適用します。新しい `getVersion()` 分岐に到達した実行の `WorkflowStarted` 履歴がフィンガープリントのスナップショットより古い場合、ランタイムは `WorkflowStub::DEFAULT_VERSION` を維持します。現在の定義で安全にリプレイできるとは仮定しません。[バージョン管理](../features/versioning.md)を参照してください。 + +### コメントと書式の変更 {#comment-only-edits} + +2.34 以降、ワークフロークラス、その trait や親ワークフロークラス、または `await()` の条件 closure 内で、コメント、docblock、空白だけを編集しても、2.34 以降に開始した実行のリプレイは変わりません。これらの実行は、コメントと空白を除いた PHP コードトークンから求めた定義フィンガープリント(プレフィックス `sha256-tokens:`)を記録します。 + +それより前のリリースで開始した実行は、ソース行そのもののフィンガープリント(プレフィックス `sha256:`)を記録しており、引き続きその方法で比較されます。これらの実行では、コメントの編集も定義の変更です。履歴にない `getVersion()` や `patched()` のマーカーは `WorkflowStub::DEFAULT_VERSION` を取り、編集した条件 closure はリプレイを失敗させます。こうした編集はそれらの実行が終わってから行うか、ほかの変更と同じように扱ってください。 diff --git a/i18n/ja/source-hashes.json b/i18n/ja/source-hashes.json index 2b249f3d5e0..1bd4cf66fb2 100644 --- a/i18n/ja/source-hashes.json +++ b/i18n/ja/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "f80f68b13877a67469a313b9fdcdbb27c1de6fe102cdfddb15e2af95997d2517", + "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index b28155f7dd5..8a48b76dcd2 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -55,3 +55,9 @@ Ela não vê chamadas feitas por classes auxiliares ou de serviço, valores que Na versão inicial, a análise na inicialização é a única verificação de determinismo que pode bloquear a execução. O runtime não repete esse diagnóstico ao adquirir uma tarefa de workflow. Essa escolha é intencional na 2.0: a análise identifica problemas nos workflows PHP registrados localmente antes da implantação, e o Waterline mostra mudanças na impressão digital da definição em execuções longas, sem tornar a aquisição de tarefas entre builds uma nova fonte de falhas de implantação. Execuções anteriores ao registro de impressões digitais também seguem uma política conservadora. Se uma execução alcançar um novo ramo de `getVersion()` e seu histórico `WorkflowStarted` for anterior ao registro da impressão digital, o runtime mantém essa execução em `WorkflowStub::DEFAULT_VERSION`, sem presumir que a definição atual é segura. Veja [Versionamento](../features/versioning.md). + +### Edições de comentários e formatação {#comment-only-edits} + +A partir da 2.34, editar apenas comentários, docblocks ou espaços em branco em uma classe de workflow, em seus traits ou em suas classes de workflow pai, ou dentro de uma closure de condição de `await()`, não muda o replay das execuções iniciadas na 2.34 ou depois. Essas execuções registram impressões digitais de definição dos tokens de código PHP sem comentários e espaços em branco (prefixo `sha256-tokens:`). + +Execuções iniciadas em uma versão anterior registraram impressões digitais das linhas de código-fonte brutas (prefixo `sha256:`) e continuam sendo comparadas assim. Para essas execuções, editar um comentário é uma mudança de definição: um marcador `getVersion()` ou `patched()` ausente recebe `WorkflowStub::DEFAULT_VERSION`, e uma closure de condição editada faz o replay falhar. Faça essas edições depois que essas execuções terminarem, ou trate-as como qualquer outra mudança. diff --git a/i18n/pt-BR/source-hashes.json b/i18n/pt-BR/source-hashes.json index 2b249f3d5e0..1bd4cf66fb2 100644 --- a/i18n/pt-BR/source-hashes.json +++ b/i18n/pt-BR/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "f80f68b13877a67469a313b9fdcdbb27c1de6fe102cdfddb15e2af95997d2517", + "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/uk/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index 28de05ffa3d..2d6cf63d5a0 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -80,3 +80,9 @@ Worker відновлює зафіксовану історію workflow піс `WorkflowStarted` передує знімку відбитка, середовище залишає його на `WorkflowStub::DEFAULT_VERSION` замість припущення, що поточне визначення безпечне. Дивіться [версіонування](../features/versioning.md). + +### Зміни коментарів і форматування {#comment-only-edits} + +Починаючи з 2.34, редагування лише коментарів, docblock або пробілів у класі workflow, його traits чи батьківських класах workflow, або всередині closure умови `await()`, не змінює replay запусків, розпочатих у 2.34 або пізніше. Такі запуски записують fingerprint визначення з токенів коду PHP без коментарів і пробілів (префікс `sha256-tokens:`). + +Запуски, розпочаті в попередньому релізі, записали fingerprint необроблених рядків коду (префікс `sha256:`), і їх і далі порівнюють так само. Для цих запусків зміна коментаря є зміною визначення: відсутній маркер `getVersion()` або `patched()` отримує `WorkflowStub::DEFAULT_VERSION`, а змінена closure умови спричиняє помилку replay. Робіть такі зміни після завершення цих запусків або розглядайте їх як будь-яку іншу зміну. diff --git a/i18n/uk/source-hashes.json b/i18n/uk/source-hashes.json index 2b249f3d5e0..1bd4cf66fb2 100644 --- a/i18n/uk/source-hashes.json +++ b/i18n/uk/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "f80f68b13877a67469a313b9fdcdbb27c1de6fe102cdfddb15e2af95997d2517", + "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index 0f54fe06626..bd4bd4faafd 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -55,3 +55,9 @@ worker 在激活和冷替换后重建已提交的 workflow 历史,因此普通 在初始发布范围内,启动时扫描是唯一可以阻止工作流运行的确定性检查。运行时不会在获取工作流任务时再次执行确定性诊断。这是 2.0 的明确选择:启动扫描在部署前检查本地注册的 PHP 工作流,Waterline 则展示长期运行任务的定义指纹变化,避免跨构建获取任务成为新的部署故障来源。 对于早于指纹记录的运行,也采用保守策略。如果运行进入新的 `getVersion()` 分支,但其 `WorkflowStarted` 历史早于指纹快照,运行时将它保留在 `WorkflowStub::DEFAULT_VERSION`,不假定当前定义可以安全重放。参阅[版本管理](../features/versioning.md)。 + +### 注释和格式修改 {#comment-only-edits} + +从 2.34 起,只修改工作流类、其 trait 或父工作流类中的注释、docblock 或空白,或只修改 `await()` 条件 closure 中的这些内容,不会改变在 2.34 或之后启动的运行的重放。这些运行记录的定义指纹基于去掉注释和空白后的 PHP 代码 token(前缀 `sha256-tokens:`)。 + +在更早版本中启动的运行记录的是原始源代码行的指纹(前缀 `sha256:`),并继续按该方式比较。对这些运行来说,修改注释就是修改定义:历史中缺少的 `getVersion()` 或 `patched()` 标记会取 `WorkflowStub::DEFAULT_VERSION`,修改过的条件 closure 会导致重放失败。请在这些运行结束后再做此类修改,或把它们当作其他任何修改来处理。 diff --git a/i18n/zh-Hans/source-hashes.json b/i18n/zh-Hans/source-hashes.json index 2b249f3d5e0..1bd4cf66fb2 100644 --- a/i18n/zh-Hans/source-hashes.json +++ b/i18n/zh-Hans/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "f80f68b13877a67469a313b9fdcdbb27c1de6fe102cdfddb15e2af95997d2517", + "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", From fc3eb890eba71d58dd5a054073c721854fa1905b Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:31:30 +0000 Subject: [PATCH 2/2] Describe token fingerprints as an opt-in after upgrading every worker Review of durable-workflow/workflow#1239 made version 2 opt-in: new runs record raw-line fingerprints by default, and DW_DEFINITION_FINGERPRINT_VERSION=v2 switches once every worker is on 2.34 or later. Updated in all locales. Co-Authored-By: Claude Opus 5.5 --- docs/constraints/workflow-constraints.md | 4 ++-- .../current/constraints/workflow-constraints.md | 4 ++-- i18n/de/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 4 ++-- i18n/es/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 4 ++-- i18n/fr/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 4 ++-- i18n/ja/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 4 ++-- i18n/pt-BR/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 4 ++-- i18n/uk/source-hashes.json | 2 +- .../current/constraints/workflow-constraints.md | 4 ++-- i18n/zh-Hans/source-hashes.json | 2 +- 15 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/constraints/workflow-constraints.md b/docs/constraints/workflow-constraints.md index a915693d09c..963df203341 100644 --- a/docs/constraints/workflow-constraints.md +++ b/docs/constraints/workflow-constraints.md @@ -56,6 +56,6 @@ Pre-fingerprint runs also follow a conservative first-release policy. If a run r ### Comment and formatting edits {#comment-only-edits} -From 2.34, editing only comments, docblocks or whitespace in a workflow class, its traits or parent workflow classes, or inside an `await()` condition closure doesn't change how runs started on 2.34 or later replay. Those runs record definition fingerprints of the PHP code tokens without comments and whitespace (prefix `sha256-tokens:`). +By default, a definition fingerprint covers raw source lines. Editing only comments, docblocks or whitespace in a workflow class, its traits or parent workflow classes, or inside an `await()` condition closure therefore counts as a definition change for runs in flight: a missing `getVersion()` or `patched()` marker takes `WorkflowStub::DEFAULT_VERSION`, and an edited condition closure fails replay. -Runs started on an earlier release recorded fingerprints of the raw source lines (prefix `sha256:`) and are still compared that way. For those runs a comment edit is a definition change: a missing `getVersion()` or `patched()` marker takes `WorkflowStub::DEFAULT_VERSION`, and an edited condition closure fails replay. Make such edits after those runs finish, or treat them like any other change. +From 2.34, workers can instead record fingerprints of the PHP code tokens without comments and whitespace (prefix `sha256-tokens:`), which those edits don't change. Opt in with `DW_DEFINITION_FINGERPRINT_VERSION=v2` once all workers are upgraded to 2.34 or later, because an older worker treats such a run as changed. Each run keeps the fingerprint version it recorded: runs started before you opt in stay sensitive to comment edits, and switching back to `v1` is safe. diff --git a/i18n/de/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/de/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index d918b92f00d..95a50da4b97 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -56,6 +56,6 @@ Auch Läufe ohne Fingerprint folgen einer vorsichtigen Regel. Erreicht ein Lauf ### Änderungen an Kommentaren und Formatierung {#comment-only-edits} -Ab 2.34 ändert das reine Bearbeiten von Kommentaren, Docblocks oder Leerraum in einer Workflow-Klasse, ihren Traits oder übergeordneten Workflow-Klassen oder innerhalb einer `await()`-Bedingungs-Closure nicht, wie Läufe, die ab 2.34 gestartet wurden, beim Replay ausgeführt werden. Diese Läufe zeichnen Definitions-Fingerprints der PHP-Code-Tokens ohne Kommentare und Leerraum auf (Präfix `sha256-tokens:`). +Standardmäßig erfasst ein Definitions-Fingerprint die unveränderten Quellzeilen. Das reine Bearbeiten von Kommentaren, Docblocks oder Leerraum in einer Workflow-Klasse, ihren Traits oder übergeordneten Workflow-Klassen oder innerhalb einer `await()`-Bedingungs-Closure gilt daher für laufende Läufe als Definitionsänderung: Ein fehlender `getVersion()`- oder `patched()`-Marker ergibt `WorkflowStub::DEFAULT_VERSION`, und eine geänderte Bedingungs-Closure lässt das Replay fehlschlagen. -Läufe, die mit einem früheren Release gestartet wurden, haben Fingerprints der unveränderten Quellzeilen aufgezeichnet (Präfix `sha256:`) und werden weiterhin so verglichen. Für diese Läufe ist eine Kommentaränderung eine Definitionsänderung: Ein fehlender `getVersion()`- oder `patched()`-Marker ergibt `WorkflowStub::DEFAULT_VERSION`, und eine geänderte Bedingungs-Closure lässt das Replay fehlschlagen. Nehmen Sie solche Änderungen erst vor, wenn diese Läufe beendet sind, oder behandeln Sie sie wie jede andere Änderung. +Ab 2.34 können Worker stattdessen Fingerprints der PHP-Code-Tokens ohne Kommentare und Leerraum aufzeichnen (Präfix `sha256-tokens:`), die solche Änderungen nicht beeinflussen. Aktivieren Sie das mit `DW_DEFINITION_FINGERPRINT_VERSION=v2`, sobald alle Worker auf 2.34 oder neuer aktualisiert sind, denn ein älterer Worker behandelt einen solchen Lauf als geändert. Jeder Lauf behält die Fingerprint-Version, die er aufgezeichnet hat: Läufe, die vor der Umstellung gestartet wurden, bleiben empfindlich für Kommentaränderungen, und ein Zurückschalten auf `v1` ist sicher. diff --git a/i18n/de/source-hashes.json b/i18n/de/source-hashes.json index 1bd4cf66fb2..ae5d0063542 100644 --- a/i18n/de/source-hashes.json +++ b/i18n/de/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", + "constraints/workflow-constraints.md": "f6c734fdacf78b599f60ff2d2b6ee70ae3ff4001539fb55ac1cfa168673b21a7", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/es/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/es/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index 1475ae575e2..1f58304af81 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -83,6 +83,6 @@ Consulta [Versionado](../features/versioning.md). ### Cambios en comentarios y formato {#comment-only-edits} -Desde 2.34, editar solo comentarios, docblocks o espacios en blanco en una clase de workflow, sus traits o sus clases de workflow padre, o dentro de una closure de condición de `await()`, no cambia el replay de las ejecuciones iniciadas en 2.34 o posteriores. Esas ejecuciones registran huellas de definición de los tokens de código PHP sin comentarios ni espacios en blanco (prefijo `sha256-tokens:`). +De forma predeterminada, una huella de definición cubre las líneas de código fuente literales. Por eso, editar solo comentarios, docblocks o espacios en blanco en una clase de workflow, sus traits o sus clases de workflow padre, o dentro de una closure de condición de `await()`, cuenta como un cambio de definición para las ejecuciones en curso: un marcador `getVersion()` o `patched()` ausente toma `WorkflowStub::DEFAULT_VERSION`, y una closure de condición editada hace fallar el replay. -Las ejecuciones iniciadas en una versión anterior registraron huellas de las líneas de código fuente literales (prefijo `sha256:`) y se siguen comparando así. Para esas ejecuciones, editar un comentario es un cambio de definición: un marcador `getVersion()` o `patched()` ausente toma `WorkflowStub::DEFAULT_VERSION`, y una closure de condición editada hace fallar el replay. Haga esas ediciones cuando esas ejecuciones hayan terminado, o trátelas como cualquier otro cambio. +Desde 2.34, los workers pueden registrar en su lugar huellas de los tokens de código PHP sin comentarios ni espacios en blanco (prefijo `sha256-tokens:`), que esas ediciones no cambian. Actívelo con `DW_DEFINITION_FINGERPRINT_VERSION=v2` cuando todos los workers estén actualizados a 2.34 o posterior, porque un worker anterior trata esa ejecución como cambiada. Cada ejecución conserva la versión de huella que registró: las ejecuciones iniciadas antes de activarlo siguen siendo sensibles a los cambios de comentarios, y volver a `v1` es seguro. diff --git a/i18n/es/source-hashes.json b/i18n/es/source-hashes.json index 1bd4cf66fb2..ae5d0063542 100644 --- a/i18n/es/source-hashes.json +++ b/i18n/es/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", + "constraints/workflow-constraints.md": "f6c734fdacf78b599f60ff2d2b6ee70ae3ff4001539fb55ac1cfa168673b21a7", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/fr/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index 6a53dd57bb9..5a56762ec25 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -58,6 +58,6 @@ Les exécutions antérieures aux empreintes suivent aussi une politique prudente ### Modifications des commentaires et de la mise en forme {#comment-only-edits} -À partir de 2.34, modifier uniquement des commentaires, des docblocks ou des espaces dans une classe de workflow, ses traits ou ses classes de workflow parentes, ou dans une closure de condition `await()`, ne change pas la relecture des exécutions démarrées en 2.34 ou plus tard. Ces exécutions enregistrent des empreintes de définition calculées sur les tokens de code PHP, sans commentaires ni espaces (préfixe `sha256-tokens:`). +Par défaut, une empreinte de définition porte sur les lignes de source brutes. Modifier uniquement des commentaires, des docblocks ou des espaces dans une classe de workflow, ses traits ou ses classes de workflow parentes, ou dans une closure de condition `await()`, compte donc comme un changement de définition pour les exécutions en cours : un marqueur `getVersion()` ou `patched()` absent prend `WorkflowStub::DEFAULT_VERSION`, et une closure de condition modifiée fait échouer la relecture. -Les exécutions démarrées avec une version antérieure ont enregistré des empreintes des lignes de source brutes (préfixe `sha256:`) et sont toujours comparées ainsi. Pour ces exécutions, modifier un commentaire est un changement de définition : un marqueur `getVersion()` ou `patched()` absent prend `WorkflowStub::DEFAULT_VERSION`, et une closure de condition modifiée fait échouer la relecture. Faites ces modifications une fois ces exécutions terminées, ou traitez-les comme tout autre changement. +À partir de 2.34, les workers peuvent plutôt enregistrer des empreintes des tokens de code PHP, sans commentaires ni espaces (préfixe `sha256-tokens:`), que ces modifications ne changent pas. Activez-les avec `DW_DEFINITION_FINGERPRINT_VERSION=v2` une fois tous les workers mis à jour vers 2.34 ou plus récent, car un worker plus ancien considère une telle exécution comme modifiée. Chaque exécution garde la version d’empreinte qu’elle a enregistrée : les exécutions démarrées avant l’activation restent sensibles aux modifications de commentaires, et revenir à `v1` est sans risque. diff --git a/i18n/fr/source-hashes.json b/i18n/fr/source-hashes.json index 1bd4cf66fb2..ae5d0063542 100644 --- a/i18n/fr/source-hashes.json +++ b/i18n/fr/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", + "constraints/workflow-constraints.md": "f6c734fdacf78b599f60ff2d2b6ee70ae3ff4001539fb55ac1cfa168673b21a7", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/ja/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index 03f53e539a7..579f1440949 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -58,6 +58,6 @@ CI では `DW_V2_GUARDRAILS_BOOT=throw` にして、安全でないリプレイ ### コメントと書式の変更 {#comment-only-edits} -2.34 以降、ワークフロークラス、その trait や親ワークフロークラス、または `await()` の条件 closure 内で、コメント、docblock、空白だけを編集しても、2.34 以降に開始した実行のリプレイは変わりません。これらの実行は、コメントと空白を除いた PHP コードトークンから求めた定義フィンガープリント(プレフィックス `sha256-tokens:`)を記録します。 +既定では、定義フィンガープリントはソース行そのものを対象にします。そのため、ワークフロークラス、その trait や親ワークフロークラス、または `await()` の条件 closure 内で、コメント、docblock、空白だけを編集しても、実行中のランにとっては定義の変更になります。履歴にない `getVersion()` や `patched()` のマーカーは `WorkflowStub::DEFAULT_VERSION` を取り、編集した条件 closure はリプレイを失敗させます。 -それより前のリリースで開始した実行は、ソース行そのもののフィンガープリント(プレフィックス `sha256:`)を記録しており、引き続きその方法で比較されます。これらの実行では、コメントの編集も定義の変更です。履歴にない `getVersion()` や `patched()` のマーカーは `WorkflowStub::DEFAULT_VERSION` を取り、編集した条件 closure はリプレイを失敗させます。こうした編集はそれらの実行が終わってから行うか、ほかの変更と同じように扱ってください。 +2.34 以降、ワーカーは代わりに、コメントと空白を除いた PHP コードトークンのフィンガープリント(プレフィックス `sha256-tokens:`)を記録できます。こうした編集ではこの値は変わりません。すべてのワーカーを 2.34 以降に更新してから `DW_DEFINITION_FINGERPRINT_VERSION=v2` で有効にしてください。古いワーカーはそのような実行を変更済みとみなすためです。各実行は記録したフィンガープリントのバージョンを保持します。有効化する前に開始した実行はコメントの編集の影響を受けたままで、`v1` に戻すことは安全です。 diff --git a/i18n/ja/source-hashes.json b/i18n/ja/source-hashes.json index 1bd4cf66fb2..ae5d0063542 100644 --- a/i18n/ja/source-hashes.json +++ b/i18n/ja/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", + "constraints/workflow-constraints.md": "f6c734fdacf78b599f60ff2d2b6ee70ae3ff4001539fb55ac1cfa168673b21a7", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index 8a48b76dcd2..e2b5a644e17 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -58,6 +58,6 @@ Execuções anteriores ao registro de impressões digitais também seguem uma po ### Edições de comentários e formatação {#comment-only-edits} -A partir da 2.34, editar apenas comentários, docblocks ou espaços em branco em uma classe de workflow, em seus traits ou em suas classes de workflow pai, ou dentro de uma closure de condição de `await()`, não muda o replay das execuções iniciadas na 2.34 ou depois. Essas execuções registram impressões digitais de definição dos tokens de código PHP sem comentários e espaços em branco (prefixo `sha256-tokens:`). +Por padrão, a impressão digital de uma definição cobre as linhas de código-fonte brutas. Por isso, editar apenas comentários, docblocks ou espaços em branco em uma classe de workflow, em seus traits ou em suas classes de workflow pai, ou dentro de uma closure de condição de `await()`, conta como uma mudança de definição para execuções em andamento: um marcador `getVersion()` ou `patched()` ausente recebe `WorkflowStub::DEFAULT_VERSION`, e uma closure de condição editada faz o replay falhar. -Execuções iniciadas em uma versão anterior registraram impressões digitais das linhas de código-fonte brutas (prefixo `sha256:`) e continuam sendo comparadas assim. Para essas execuções, editar um comentário é uma mudança de definição: um marcador `getVersion()` ou `patched()` ausente recebe `WorkflowStub::DEFAULT_VERSION`, e uma closure de condição editada faz o replay falhar. Faça essas edições depois que essas execuções terminarem, ou trate-as como qualquer outra mudança. +A partir da 2.34, os workers podem registrar, em vez disso, impressões digitais dos tokens de código PHP sem comentários e espaços em branco (prefixo `sha256-tokens:`), que essas edições não alteram. Ative com `DW_DEFINITION_FINGERPRINT_VERSION=v2` depois que todos os workers estiverem na 2.34 ou posterior, porque um worker mais antigo trata essa execução como alterada. Cada execução mantém a versão de impressão digital que registrou: execuções iniciadas antes da ativação continuam sensíveis a edições de comentários, e voltar para `v1` é seguro. diff --git a/i18n/pt-BR/source-hashes.json b/i18n/pt-BR/source-hashes.json index 1bd4cf66fb2..ae5d0063542 100644 --- a/i18n/pt-BR/source-hashes.json +++ b/i18n/pt-BR/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", + "constraints/workflow-constraints.md": "f6c734fdacf78b599f60ff2d2b6ee70ae3ff4001539fb55ac1cfa168673b21a7", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/uk/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index 2d6cf63d5a0..6e1364711db 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -83,6 +83,6 @@ Worker відновлює зафіксовану історію workflow піс ### Зміни коментарів і форматування {#comment-only-edits} -Починаючи з 2.34, редагування лише коментарів, docblock або пробілів у класі workflow, його traits чи батьківських класах workflow, або всередині closure умови `await()`, не змінює replay запусків, розпочатих у 2.34 або пізніше. Такі запуски записують fingerprint визначення з токенів коду PHP без коментарів і пробілів (префікс `sha256-tokens:`). +За замовчуванням fingerprint визначення охоплює необроблені рядки коду. Тому редагування лише коментарів, docblock або пробілів у класі workflow, його traits чи батьківських класах workflow, або всередині closure умови `await()`, вважається зміною визначення для запусків, що виконуються: відсутній маркер `getVersion()` або `patched()` отримує `WorkflowStub::DEFAULT_VERSION`, а змінена closure умови спричиняє помилку replay. -Запуски, розпочаті в попередньому релізі, записали fingerprint необроблених рядків коду (префікс `sha256:`), і їх і далі порівнюють так само. Для цих запусків зміна коментаря є зміною визначення: відсутній маркер `getVersion()` або `patched()` отримує `WorkflowStub::DEFAULT_VERSION`, а змінена closure умови спричиняє помилку replay. Робіть такі зміни після завершення цих запусків або розглядайте їх як будь-яку іншу зміну. +Починаючи з 2.34, workers можуть натомість записувати fingerprint токенів коду PHP без коментарів і пробілів (префікс `sha256-tokens:`), на які такі зміни не впливають. Увімкніть це через `DW_DEFINITION_FINGERPRINT_VERSION=v2`, коли всі workers оновлено до 2.34 або новішої версії, бо старіший worker вважає такий запуск зміненим. Кожен запуск зберігає версію fingerprint, яку записав: запуски, розпочаті до ввімкнення, і далі чутливі до змін коментарів, а повернення до `v1` безпечне. diff --git a/i18n/uk/source-hashes.json b/i18n/uk/source-hashes.json index 1bd4cf66fb2..ae5d0063542 100644 --- a/i18n/uk/source-hashes.json +++ b/i18n/uk/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", + "constraints/workflow-constraints.md": "f6c734fdacf78b599f60ff2d2b6ee70ae3ff4001539fb55ac1cfa168673b21a7", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418", diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md index bd4bd4faafd..d1c8dc12837 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/constraints/workflow-constraints.md @@ -58,6 +58,6 @@ worker 在激活和冷替换后重建已提交的 workflow 历史,因此普通 ### 注释和格式修改 {#comment-only-edits} -从 2.34 起,只修改工作流类、其 trait 或父工作流类中的注释、docblock 或空白,或只修改 `await()` 条件 closure 中的这些内容,不会改变在 2.34 或之后启动的运行的重放。这些运行记录的定义指纹基于去掉注释和空白后的 PHP 代码 token(前缀 `sha256-tokens:`)。 +默认情况下,定义指纹覆盖原始源代码行。因此,只修改工作流类、其 trait 或父工作流类中的注释、docblock 或空白,或只修改 `await()` 条件 closure 中的这些内容,对进行中的运行来说都算作定义修改:历史中缺少的 `getVersion()` 或 `patched()` 标记会取 `WorkflowStub::DEFAULT_VERSION`,修改过的条件 closure 会导致重放失败。 -在更早版本中启动的运行记录的是原始源代码行的指纹(前缀 `sha256:`),并继续按该方式比较。对这些运行来说,修改注释就是修改定义:历史中缺少的 `getVersion()` 或 `patched()` 标记会取 `WorkflowStub::DEFAULT_VERSION`,修改过的条件 closure 会导致重放失败。请在这些运行结束后再做此类修改,或把它们当作其他任何修改来处理。 +从 2.34 起,worker 可以改为记录去掉注释和空白后的 PHP 代码 token 的指纹(前缀 `sha256-tokens:`),这类修改不会改变它。请在所有 worker 都升级到 2.34 或更高版本后,通过 `DW_DEFINITION_FINGERPRINT_VERSION=v2` 启用,因为较旧的 worker 会把这样的运行视为已修改。每个运行都保留它记录的指纹版本:启用前启动的运行仍对注释修改敏感,切换回 `v1` 是安全的。 diff --git a/i18n/zh-Hans/source-hashes.json b/i18n/zh-Hans/source-hashes.json index 1bd4cf66fb2..ae5d0063542 100644 --- a/i18n/zh-Hans/source-hashes.json +++ b/i18n/zh-Hans/source-hashes.json @@ -18,7 +18,7 @@ "constraints/idempotent-vs-deterministic.md": "f7396f01a4111ce187e751b009c1efb96f5538e8a602006eed24f7b1d8f44adf", "constraints/overview.md": "fd6c842c6c22d6f0df37a52de15ca74b34664f5ecd78af0c08b1e0cdb9a2be1f", "constraints/structural-limits.md": "5c7b7f6c86c5ca547eb3f200400ceab3b589f32d83866914f44e3a5a7d81e964", - "constraints/workflow-constraints.md": "38e364554a68edc556f7d9d0138152b8b64d8c28ce2b8ce8f3f036a5430627d9", + "constraints/workflow-constraints.md": "f6c734fdacf78b599f60ff2d2b6ee70ae3ff4001539fb55ac1cfa168673b21a7", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418",