diff --git a/docs/constraints/workflow-constraints.md b/docs/constraints/workflow-constraints.md index bb4713990e6..963df203341 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} + +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. + +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 d7961c55780..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 @@ -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} + +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. + +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 3c6324df3ac..57ea79027e3 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": "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 e4e802e6258..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 @@ -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} + +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. + +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 3c6324df3ac..57ea79027e3 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": "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 8cc8676c3c0..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 @@ -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} + +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. + +À 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 3c6324df3ac..57ea79027e3 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": "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 05595ec1c64..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 @@ -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} + +既定では、定義フィンガープリントはソース行そのものを対象にします。そのため、ワークフロークラス、その trait や親ワークフロークラス、または `await()` の条件 closure 内で、コメント、docblock、空白だけを編集しても、実行中のランにとっては定義の変更になります。履歴にない `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 3c6324df3ac..57ea79027e3 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": "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 b28155f7dd5..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 @@ -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} + +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. + +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 3c6324df3ac..57ea79027e3 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": "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 28de05ffa3d..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 @@ -80,3 +80,9 @@ Worker відновлює зафіксовану історію workflow піс `WorkflowStarted` передує знімку відбитка, середовище залишає його на `WorkflowStub::DEFAULT_VERSION` замість припущення, що поточне визначення безпечне. Дивіться [версіонування](../features/versioning.md). + +### Зміни коментарів і форматування {#comment-only-edits} + +За замовчуванням fingerprint визначення охоплює необроблені рядки коду. Тому редагування лише коментарів, docblock або пробілів у класі workflow, його traits чи батьківських класах workflow, або всередині closure умови `await()`, вважається зміною визначення для запусків, що виконуються: відсутній маркер `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 3c6324df3ac..57ea79027e3 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": "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 0f54fe06626..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 @@ -55,3 +55,9 @@ worker 在激活和冷替换后重建已提交的 workflow 历史,因此普通 在初始发布范围内,启动时扫描是唯一可以阻止工作流运行的确定性检查。运行时不会在获取工作流任务时再次执行确定性诊断。这是 2.0 的明确选择:启动扫描在部署前检查本地注册的 PHP 工作流,Waterline 则展示长期运行任务的定义指纹变化,避免跨构建获取任务成为新的部署故障来源。 对于早于指纹记录的运行,也采用保守策略。如果运行进入新的 `getVersion()` 分支,但其 `WorkflowStarted` 历史早于指纹快照,运行时将它保留在 `WorkflowStub::DEFAULT_VERSION`,不假定当前定义可以安全重放。参阅[版本管理](../features/versioning.md)。 + +### 注释和格式修改 {#comment-only-edits} + +默认情况下,定义指纹覆盖原始源代码行。因此,只修改工作流类、其 trait 或父工作流类中的注释、docblock 或空白,或只修改 `await()` 条件 closure 中的这些内容,对进行中的运行来说都算作定义修改:历史中缺少的 `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 3c6324df3ac..57ea79027e3 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": "f6c734fdacf78b599f60ff2d2b6ee70ae3ff4001539fb55ac1cfa168673b21a7", "contribute-a-sample.md": "d250d8c63d448e32d3160ff7a2900e7a270dcbd9cda22cf3af46cdf219395ea3", "conversational-workflows.md": "d155b4af3d83293802cfa765bb28de7b3fc52345509f4f3d02e16318d825a675", "defining-workflows/activities.md": "05b46f73477a0bbd5f21d17ac37def8a8eac53f1e629155805c98cc46e75b418",