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
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@ Build the same static site and validate the same links as CI:
npm run build
```

## Ukrainian translations

English is the default locale. Current documentation and site pages are also
available in Ukrainian under `/uk/`. Preview that locale with:

```bash
npm run start -- --locale uk
```

Translate current docs in `i18n/uk/docusaurus-plugin-content-docs/current/`
and standalone pages in `i18n/uk/docusaurus-plugin-content-pages/`. Keep the
English source file paths, examples, commands, API names and explicit heading
anchors intact. Keep workflow, activity, worker, signal, timer, query, update
and saga as English technical terms.

Use Docusaurus translation markers for component text. Run
`npm run write-translations -- --locale uk` to extract new messages, then
translate them in `i18n/uk/code.json` and the plugin message files. Build both
locales with `npm run build` before submitting a change. Blog articles and the
versioned 1.x docs use the English fallback.

## Repository layout

| Path | Purpose |
Expand Down
4 changes: 2 additions & 2 deletions docs/ai-agent-workflow-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ All three use the same durable execution model and public protocol.
Cross-language child workflows and activities use registered string types and
the shared Avro envelope, preserving fixed typed Value semantics through the
official Avro language packages. The [2.0 Capability Index](/docs/capabilities/)
records exact floors and deliberate gaps such as Rust's current update-authoring
and schedule-management boundary.
records exact floors and deliberate gaps such as Rust's current schedule-management
and fleet-wide visibility boundary.

## Does a Python or Rust team need Laravel?

Expand Down
4 changes: 2 additions & 2 deletions docs/capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ implied to have parity.
| Deterministic parallel composition | PHP `all()`/`parallel()`, Python nested list-yield, and Rust `WorkflowContext::parallel()`/`join()` schedule activity, child-workflow, timer, mixed, and nested groups through ordinary commands. All three publish the shared group identity/path metadata and restore results in nested input order. | [Concurrency](/docs/features/concurrency/), [Python SDK](/docs/polyglot/python/#fan-out), [Rust SDK](/docs/polyglot/rust/#deterministic-parallel-groups) |
| <span id="durable-first-completion-selection-capability">Durable first-completion selection</span> | Embedded PHP and the PHP, Python, and Rust service SDKs start independent activity, child-workflow, timer, external-input wait, and nested-group members. One winner is persisted with stable member identity; non-winners continue and retain await/cancel handles. | [Concurrency](/docs/features/concurrency/#first-completion-selection), [Python SDK](/docs/polyglot/python/#first-completion-selection), [Rust SDK](/docs/polyglot/rust/#durable-first-completion-selection) |
| Saga compensation | PHP's Saga helpers, Python `WorkflowContext.saga()`, and Rust `WorkflowContext::saga()` register durable compensations after forward success and unwind sequentially in reverse order by default. Python and Rust stop at the first compensation failure and preserve the initiating plus compensation failures; PHP additionally exposes opt-in parallel and continue-on-error policies. | [Sagas](/docs/features/sagas/), [Python SDK](/docs/polyglot/python/#saga-compensation), [Rust SDK](/docs/polyglot/rust/#saga-compensation) |
| Cancellation | Service-mode PHP, Python, and Rust clients expose immediate terminal cancellation with selected-run safety and typed outcomes. Embedded Laravel separately supports a cooperative cancellation request with bounded cleanup; Server and service-mode SDKs do not yet expose that request. | [Cancel and terminate](/docs/features/cancel-and-terminate/), [Rust SDK](/docs/polyglot/rust/) |
| Cancellation | Embedded Laravel and service-mode PHP, Python, and Rust support cooperative cancellation requests with one root identity, an immutable deadline, and bounded cleanup on explicitly enabled workers. Immediate terminal cancellation remains available with selected-run safety and typed outcomes. | [Cancel and terminate](/docs/features/cancel-and-terminate/), [Service-mode cancellation](/docs/polyglot/cancellation/), [Rust SDK](/docs/polyglot/rust/) |
| Termination | Termination closes a run immediately with a distinct terminal outcome; it is exposed through Cloud and self-hosted Server service runtimes, CLI, PHP, Python, and Rust control surfaces. | [Cancel and terminate](/docs/features/cancel-and-terminate/), [Server API](/docs/polyglot/server-api-reference/) |
| Side effects | PHP, Python, and Rust record non-deterministic values exactly once and decode the recorded value on replay. | [Side effects](/docs/features/side-effects/), [Python SDK](/docs/polyglot/python/), [Rust SDK](/docs/polyglot/rust/) |
| Workflow Streams | PHP, Python, and Rust expose typed list, describe, offset subscription/resume, append, close, and error operations for Server-owned run-scoped output streams. All three author replay-safe emits from a durable command identity. Python resolves external payloads with its configured storage driver; PHP and Rust preserve opaque references. | [Workflow Streams](/docs/polyglot/workflow-streams/), [exact SDK matrix](/workflow-stream-capabilities.json), [runtime scenarios](/platform-conformance/workflow-stream-runtime-scenarios.json) |
Expand All @@ -90,7 +90,7 @@ implied to have parity.
| Search attributes | Cloud and self-hosted Server service runtimes index typed search attributes. PHP and Python expose authoring/control surfaces; CLI and operator APIs expose structured discovery and filtering. | [Search attributes](/docs/features/search-attributes/), [Python SDK](/docs/polyglot/python/) |
| Worker compatibility | SDKs register runtime, SDK version, build ID, supported types, protocol version, and capacity; the server publishes accepted versions and routing facts. | [Compatibility](/docs/compatibility/), [Worker compatibility and routing](/docs/polyglot/worker-compatibility-routing/) |
| Local activities | Available in embedded Laravel, PHP and Python service SDKs, and Rust SDK 3.1.0 with explicit worker opt-in. | [Embedded activity execution](/docs/features/activity-execution-model/), [Service-mode support matrix](/docs/polyglot/portable-worker-affinity/) |
| Worker sessions | Available in embedded Laravel, PHP and Python service SDKs. Rust remains unsupported. | [Worker Sessions](/docs/features/worker-sessions/), [Service-mode support matrix](/docs/polyglot/portable-worker-affinity/) |
| Worker sessions | Available in embedded Laravel, PHP and Python service SDKs, and Rust SDK 3.2.0 with explicit worker opt-in. | [Worker Sessions](/docs/features/worker-sessions/), [Service-mode support matrix](/docs/polyglot/portable-worker-affinity/) |
| Sticky execution | Available in embedded Laravel and the PHP service SDK. Python and Rust remain unsupported. | [Sticky Execution](/docs/features/sticky-execution/), [Service-mode support matrix](/docs/polyglot/portable-worker-affinity/) |
| Codec interoperability | PHP, Python, and Rust use the public `codec` + `blob` envelope and one fixed recursive Avro Value schema. Named branches preserve integers versus doubles, text versus bytes, booleans versus integers, and lists versus maps. | [Avro Value protocol](/docs/polyglot/avro-value-protocol/), [Worker protocol](/docs/polyglot/worker-protocol/), [Rust SDK](/docs/polyglot/rust/) |
| Diagnostics | Service runtimes and CLI publish version, protocol, worker, task-queue, replay, history, typed failure, and repair facts as JSON. Managed Waterline, a separately deployed self-hosted service, or the embedded package presents evidence from its owning runtime. | [Monitoring](/docs/monitoring/), [CLI reference](/docs/polyglot/cli-reference/), [Waterline operator API](/docs/waterline-operator-api/) |
Expand Down
4 changes: 3 additions & 1 deletion docs/contribute-a-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ Three docs surfaces move when a sample lands:
sample-app docs page is the canonical list; an entry that names a
surface but does not link to a sample is treated as a gap.

These three changes ship in the same PR as the sample workflow itself.
Submit the sample and README changes in the sample-app PR, and the gallery
and pattern-page changes in a linked docs-site PR. Maintainers land the linked
changes together.
A sample that lands without a docs-site mirror is in `gap` state for
the upstream-coverage tracker until the docs PR catches up, so
contributors are encouraged to ship them together.
Expand Down
9 changes: 5 additions & 4 deletions docs/features/cancel-and-terminate.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ Cancel and terminate are first-class durable commands that close a running workf
In the current embedded API, both commands close the run immediately. **Cancel**
records a `cancelled` outcome; **terminate** records a `terminated` outcome.
Neither command schedules cleanup inside the closed workflow. Embedded Laravel
also provides `requestCancellation()` for bounded cooperative cleanup; that
separate request is not yet exposed by Server or service-mode SDKs. If your
service-mode application needs compensation before closing, signal the workflow
to run it and wait for completion before issuing terminal cancel.
also provides `requestCancellation()` for bounded cooperative cleanup.
Server and the PHP, Python and Rust SDKs support the separate cooperative
request with workers that explicitly enable it. See
[Cooperative Cancellation](/docs/polyglot/cancellation) for the capability,
deadline, cleanup and recovery contract.

## Cancel

Expand Down
5 changes: 4 additions & 1 deletion docs/features/child-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ When a parent workflow closes — whether by completing, failing, timing out, be
| Policy | Value | Behavior |
|---|---|---|
| Abandon | `abandon` | The child continues running independently. This is the default. |
| Request Cancellation | `request_cancellation` | The child receives a cooperative cleanup request with the parent's original cancellation lineage and deadline. |
| Request Cancel | `request_cancel` | A cancel command is sent to the child when the parent closes. |
| Terminate | `terminate` | A terminate command is sent to the child when the parent closes. |

Expand Down Expand Up @@ -184,7 +185,7 @@ $results = all([
### How it works

- The policy is recorded on the `workflow_links` row (`parent_close_policy`) and in the `ChildWorkflowScheduled` history event payload.
- When the parent run closes for any reason, the engine queries open child links with a non-abandon policy and sends the appropriate command (cancel or terminate) to each open child.
- When the parent run closes for any reason, the engine queries open child links with a non-abandon policy and sends the appropriate command (request cancellation, cancel, or terminate) to each open child.
- If the child has already closed by the time the policy is enforced, no action is taken — the command is silently skipped.
- Policy enforcement is best-effort: if a child command is rejected (e.g. the child is already terminal), the parent's closure is not affected. When enforcement succeeds, a `ParentClosePolicyApplied` history event is recorded on the parent run. When enforcement fails, a `ParentClosePolicyFailed` history event is recorded instead, so operators can distinguish successful enforcement from silent failures.
- Continue-as-new does **not** trigger parent-close policy, because the workflow instance remains active under a new run.
Expand All @@ -207,6 +208,8 @@ Parent-close policy fires on every terminal parent disposition, and stays inert

**Abandon** (default) is correct when children represent independent work that should complete regardless of the parent's fate — for example, a notification workflow or a cleanup task that must finish.

**Request Cancellation** uses `ParentClosePolicy::RequestCancellation` for cooperative cleanup. It preserves an existing parent cancellation request's root identity and immutable deadline. If the parent closes without such a request, the policy records one shared cleanup budget of 600 seconds from the parent's recorded closure time. Repeated enforcement does not grant more time. See [Cooperative Cancellation](/docs/polyglot/cancellation) for the service-mode worker capability and cleanup contract.

**Request Cancel** applies the child's terminal `cancel()` command when the parent closes. Despite the policy name, it does not deliver the separate cooperative `requestCancellation()` request. The child cannot run workflow-code cleanup or compensation after this policy closes its run. Complete any required compensation before closing the parent, or use **Abandon** for independent cleanup work.

**Terminate** is correct when children must stop immediately. Use this for children that are purely auxiliary to the parent and have no independent value after the parent closes.
Expand Down
6 changes: 3 additions & 3 deletions docs/features/continue-as-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class CounterWorkflow extends Workflow

if ($count >= $max) {
return [
‘count’ => $result,
‘workflow_id’ => $this->workflowId(),
‘run_id’ => $this->runId(),
'count' => $result,
'workflow_id' => $this->workflowId(),
'run_id' => $this->runId(),
];
}

Expand Down
7 changes: 4 additions & 3 deletions docs/features/sticky-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,10 @@ Use these diagnostics this way:
## Replay-Safe Code

Workflow code must behave identically under sticky and cold-replay execution.
Only durable history is safe for workflow decisions: workflow inputs, activity
results, timers, signals, updates, side effects, version markers, memo, and
search attributes.
Workflow decisions must use durable history: workflow inputs, activity results,
timers, signals, updates, side effects and version markers. Memo and search
attribute projections are operator metadata; do not branch workflow logic on
their mutable values.

Do not rely on mutable globals, local files, open sockets, object identity,
random values, wall-clock reads, or any other process-local state for
Expand Down
6 changes: 4 additions & 2 deletions docs/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ By calling multiple activities, a workflow can orchestrate the results between e

If a workflow fails, the events leading up to the failure are replayed to rebuild the current state. This allows the workflow to pick up where it left off, with the same inputs and outputs as before, ensuring determinism.

Activities are always durable queued work in v2. There is no in-process local
activity fast path. Ordinary activities can run on any compatible worker, and
Ordinary activities are durable queued work in v2. Explicit
[local activities](./features/local-activities.md) run short activity work in
the workflow worker process while preserving durable history and retry semantics.
Ordinary activities can run on any compatible worker, and
[worker sessions](./features/worker-sessions.md) add an explicit lease when a
sequence of activity steps needs the same worker-local resource. If you need a
replay-safe one-shot value without queueing an activity, use
Expand Down
4 changes: 2 additions & 2 deletions docs/laravel-adoption.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ database, network, clock, and other side effects belong in activities.

### Stable v1 Laravel

Keep the [stable installation](/docs/installation/) and its real queue-driver
Keep the [stable v1 installation](/docs/1.x/installation/) and its real queue-driver
requirements. This representative implementation uses a constructor-injected
application starter and method-injected activity services:

Expand Down Expand Up @@ -565,7 +565,7 @@ last step, never the cutover mechanism.

## Continue with the chosen path

- [Stable v1 installation](/docs/installation/)
- [Stable v1 installation](/docs/1.x/installation/)
- [Stable v1 migration planning](/docs/migration/)
- [2.0 embedded installation](/docs/installation/)
- [Detailed v1-to-v2 package migration](/docs/migration/)
Expand Down
10 changes: 5 additions & 5 deletions docs/operator-operating-envelope.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@ These facts describe durable workflow-task and activity-task traffic only.

When you need queue-local drill-down instead of fleet totals, use the server
task-queue visibility routes for backlog age, poller state, current leases,
and admission budgets. Those routes do not currently expose per-queue
`stats.tasks_added_last_minute` or `stats.tasks_dispatched_last_minute`; use
the fleet-level `operator_metrics.backlog.*` pair above to compare durable
inflow with dispatch, then use queue-local routes to see which queue is
building backlog or has no available worker capacity.
admission budgets, `stats.tasks_added_last_minute`, and
`stats.tasks_dispatched_last_minute`. Compare queue-local inflow with dispatch
to identify the queue building backlog or lacking available worker capacity.
Use the fleet-level `operator_metrics.backlog.*` pair above for the aggregate
comparison.

Waterline's `GET /waterline/api/v2/health` surface publishes the same queue
drill-down under `queue_visibility.*` for the configured namespace. Treat these
Expand Down
2 changes: 1 addition & 1 deletion docs/polyglot/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"position": 14,
"link": {
"type": "generated-index",
"description": "Run workflows in any language. The standalone server, CLI, Python SDK, and worker protocol let you drive Durable Workflow from PHP, Python, or any HTTP client."
"description": "Run workflows with PHP, Python, or Rust SDK workers against Cloud or a self-hosted Server. Use the CLI and public HTTP protocols for control, diagnostics, and worker integrations."
}
}
Loading
Loading