Repository navigation
Rust #325: activity lease renewal like Server 2.11 - #680
Merged
Merged
Conversation
POST /api/worker/activity-tasks/{task}/renew-lease keeps a live
attempt's lease for its owner without recording progress, moving a
business deadline or adding history, as published Server 2.11.1 does
over Workflow 2.10's ActivityLeaseRenewal: PHP's ownership guard and
bodies, Laravel's validation, the attempt status with lease_renewed and
server_time, and refusals for closed, cancelled, terminated or expired
authority. Native advertises activity_lease_renewal, so current SDKs use
it.
Closing an attempt now clears its lease and its task's, as PHP's
closeAttempt does; completed attempts and their tasks kept a stale lease.
The activity-lease-renewal fixture records each case against the
published reference.
rmcdaniel
changed the base branch from
rust-325-reference-2-11-1
to
rust-325-train-oct22c
October 22, 2026 21:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #325. Stacked on #679, the 2.11.1 parity reference; it retargets when that merges.
What
POST /api/worker/activity-tasks/{task}/renew-lease, as published Server 2.11.1 serves it over Workflow 2.10.2'sActivityLeaseRenewal. Current PHP, Python and Rust SDKs renew long activity leases through it when the server advertisesserver_capabilities.activity_lease_renewal. Native now advertises it.The behavior was measured on the published 2.11.1 image first, then encoded as the
activity-lease-renewalshared fixture:attemptStatusfields),lease_renewed: true,server_time,task_idandworker_session: null.task_not_found;attempt_not_found;task_mismatch;lease_owner_mismatchwith the current owner.validation_failedfor missing or non-string fields.lease_renewed: false, withouttask_idorserver_time.attemptContinuationState, including run and execution deadlines (run_timeout/execution_timeout).Also fixed
Closing an attempt now clears its lease, and its task's, as PHP's
closeAttemptdoes. Completed attempts and their tasks used to keep a stalelease_expires_at;/statusand renewal showed it where PHP showsnull.Evidence
rust/tests/execution/activity_lease_renewal.rs, 2 tests): pass on SQLite, PostgreSQL and MySQL. The full SQLite suite passes (406 execution, 230 library).activity-lease-renewal, and the three-way comparison passes.New modules use a
store_methods!macro for the shared backend bounds, the same one #678 adds, so the bound list isn't duplicated again.