Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/constraints/workflow-constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion i18n/de/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion i18n/es/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion i18n/fr/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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` に戻すことは安全です。
2 changes: 1 addition & 1 deletion i18n/ja/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion i18n/pt-BR/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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` безпечне.
2 changes: 1 addition & 1 deletion i18n/uk/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading