github durable-workflow/workflow 2.4.0

latest releases: 1.0.84, 2.4.1
6 hours ago

Cooperative cancellation

Native 2.4.0 adds whole-run cooperative cancellation with an immutable request context, original deadline and one bounded parent/child/Activity tree. Workflow code can perform shielded durable cleanup, inspect its remaining budget and resume at the same delivery boundary after worker replacement.

Operation policies distinguish trying cancellation, waiting for cancellation completion and abandoning eligible work. Managed stop receipts fence stale Activity results. The canonical cascade records delivery, stop evidence, cleanup recovery and terminal outcomes.

Scheduler lease repair and cancellation-deadline enforcement now acquire the run before its tasks, matching operator repair and Server mutations. The PHP 8.1 minimum remains supported.

The published stable mixed PHP parent, Python child, Rust remote Activity and PHP local Activity demonstration passes 236 assertions. Both runs finish Cancelled with cleanup completed 15.802418 seconds after the original request, before its unchanged 30-second deadline. It includes physical stop without application heartbeats, actual cleanup-worker SIGKILL, replacement replay, stale result refusal, duplicate identity/deadline and one API/CLI view. The unchanged published Waterline frontend displays the qualified cascade on desktop and mobile.

The demonstration uses published Native 2.4.0 in Server 2.5.0, PHP SDK 2.2.0, Python 2.4.0, Rust 3.0.0 and CLI 2.2.0. Waterline 2.1.0 is also published. Published lifecycle conformance passes all 12 cells. Independently cancellable scopes remain disabled experimental source preview outside the stable release claim. Existing immediate cancellation remains available through its legacy API.

Exact tuples and comparison results are recorded in shared cancellation #136.

Don't miss a new workflow release

NewReleases is sending notifications on new releases.