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: 3 additions & 3 deletions docs/polyglot/cancellation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Request bounded cleanup across a workflow, its children and its act

# Cooperative cancellation

Protocol 1.20 adds cooperative cancellation to the self-hosted Server release
candidate. It requires workers that explicitly enable cooperation. Check runtime
Server 2.5.0 adds cooperative cancellation through protocol 1.20. It requires
workers that explicitly enable cooperation. Check runtime
discovery and the SDK's capability support before using it.

## Request cleanup
Expand Down Expand Up @@ -89,7 +89,7 @@ registration does not upgrade a claim that was already issued.
## Release boundary

Whole-run requests, child and activity policies, bounded shielded cleanup,
recovery and cascade inspection form this release candidate. Independently
recovery and cascade inspection form the supported release. Independently
cancellable operation scopes remain a disabled source preview and are marked
experimental in the protocol reference.

Expand Down
4 changes: 4 additions & 0 deletions docs/polyglot/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ The current public client is broader than selected-run result handling:
- `Client` exposes `listWorkflows` with server filtering and pagination,
`workflowHistory`, `updateWorkflow`, `cancelWorkflow`, and
`terminateWorkflow`.
- `requestCancellation()` requests bounded cleanup from cooperating workers.
Existing `cancel()` and `cancelWorkflow()` close the run immediately. See
[cooperative cancellation](/docs/polyglot/cancellation) for the authoring and
recovery contract.
- Schedule methods cover create, describe, list, update, pause, resume,
trigger, backfill, and delete.
- Operational visibility includes `listNamespaces`, `listWorkers`, and
Expand Down
17 changes: 11 additions & 6 deletions docs/polyglot/portable-worker-affinity.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,17 @@ server records that sequence atomically as normal activity history marked
`execution_mode=local`.

Replay consumes the recorded terminal activity event. It does not invoke the
local handler again. The synchronous PHP handler is not preempted: cancellation
and elapsed heartbeat, per-attempt, and total timeouts are observed before an
attempt, when the handler calls `ActivityContext::heartbeat()`, or after the
handler returns. A handler that neither returns nor heartbeats cannot be
interrupted by these cooperative controls, so local activities must remain
short and divide blocking work with safe heartbeat boundaries.
local handler again. Ordinary PHP workers execute the synchronous handler
inline. Cancellation and elapsed heartbeat, per-attempt, and total timeouts
are observed before an attempt, at `ActivityContext::heartbeat()`, or after the
handler returns. These handlers must remain short and divide blocking work
with safe heartbeat boundaries.

Workers that enable [cooperative cancellation](/docs/polyglot/cancellation)
use protocol 1.20 and supervised callback processes for prepared local
activities. They observe cancellation and stop the callback independently of
application heartbeats. Durable stop receipts and attempt fencing distinguish
callback stop from refusal of a late result.

## Worker session lifecycle

Expand Down
7 changes: 4 additions & 3 deletions docs/polyglot/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,10 @@ when a script already knows the workflow id and wants handle-style methods.

Both operations close the Server run immediately with distinct terminal
outcomes. `cancel_workflow` does not deliver a cooperative request to workflow
code or run saga/finally cleanup. Arrange cleanup before terminal cancellation
or use external reconciliation; embedded Laravel's `requestCancellation()` is
a separate capability, not yet available in service mode.
code or run saga/finally cleanup. Use `request_cancellation()` with cooperating
workers for bounded workflow cleanup. See the
[cooperative cancellation guide](/docs/polyglot/cancellation) for operation
policies, supervision and recovery.

### Schedules

Expand Down
8 changes: 4 additions & 4 deletions docs/polyglot/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ drained. See [Side Effects](/docs/features/side-effects/) and

Service-mode `cancel_workflow` and `terminate_workflow` both close the run
immediately. They record distinct terminal outcomes, but neither asks workflow
code to run cleanup. Arrange compensation before closing the run or use external
reconciliation. Embedded Laravel has a separate cooperative
`requestCancellation()` capability; Server and service-mode SDKs do not yet
expose that request.
code to run cleanup. Use `request_cancellation()` with cooperating workers for
bounded workflow cleanup. See the
[cooperative cancellation guide](/docs/polyglot/cancellation) for operation
policies, supervision and recovery.

```rust
use durable_workflow::{Client, WorkflowCommandOptions};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: durable-workflow.v2.worker-protocol-api
version: "47"
version: "48"
summary: Durable Workflow worker-plane HTTP+JSON API
description: >
Normative OpenAPI specification for the worker-plane HTTP+JSON API:
Expand Down Expand Up @@ -56,7 +56,7 @@ x-durable-workflow-cancellation-scope-opening:
allowance: shares_existing_workflow_claim_budget
replay: identical_parent_and_shield_reuses_canonical_history_identity
x-durable-workflow-cooperative-cancellation-contract:
status: release_candidate
status: stable
minimum_protocol_version: "1.20"
worker_capability: cooperative_cancellation
request_operation: POST /workflows/{workflowId}/request-cancellation
Expand Down Expand Up @@ -91,7 +91,7 @@ x-durable-workflow-cooperative-cancellation-contract:
cleanup_completion: cancelled_with_original_request_id
terminal_cancel_and_terminate: unchanged
x-durable-workflow-prepared-local-activity-contract:
status: release_candidate
status: stable
minimum_protocol_version: "1.20"
worker_capabilities: [cooperative_cancellation, prepared_local_activities]
backend_role: Workflow\V2\Contracts\PreparedLocalActivityTaskBridge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ asyncapi: 2.6.0
id: durable-workflow.v2.worker-protocol-stream
info:
title: Durable Workflow worker-protocol long-poll stream semantics
version: "14"
version: "15"
description: >
Normative AsyncAPI description of the public worker-protocol stream
semantics. Durable uses HTTP long-poll request/response rather than a
Expand Down Expand Up @@ -226,7 +226,7 @@ components:
properties:
protocol_version:
type: string
const: "1.19"
const: "1.20"
server_capabilities:
type: object
additionalProperties: true
Expand Down
12 changes: 6 additions & 6 deletions static/stable-releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"updated_at": "2026-10-06",
"artifacts": {
"cli": "2.2.0",
"sdk-php": "2.1.0",
"sdk-python": "2.1.0",
"sdk-rust": "2.1.0",
"server": "2.4.0",
"waterline": "2.0.4",
"workflow": "2.1.1"
"sdk-php": "2.2.0",
"sdk-python": "2.4.0",
"sdk-rust": "3.0.0",
"server": "2.5.0",
"waterline": "2.1.0",
"workflow": "2.4.0"
}
}
Loading