Skip to content

Repeat the final local-activity backoff entry - #296

Merged
rmcdaniel merged 2 commits into
mainfrom
fix/general-219-local-backoff
Nov 11, 2026
Merged

rmcdaniel merged 2 commits into
mainfrom
fix/general-219-local-backoff

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Local activities retried with zero delay once attempts outnumbered the backoff list, so a retry policy that backs off for remote activities spun in a tight loop locally. Each later retry now repeats the final backoff entry, the same rule Server-scheduled activities follow (durable-workflow/.github#219, decided 2026-11-11; PHP shipped the same fix in 3.13.0).

  • worker.py: one-line change in _execute_local_activity. The backoff list already carries the policy's maximum-interval cap.
  • New tests/test_local_activity_backoff.py: list [1, 2] with 5 attempts sleeps [1, 2, 2, 2] (it slept [1, 2] before), and a policy with no list still doesn't wait.
  • Local run: 46 passed (new tests plus the existing local-activity suites).

🤖 Generated with Claude Code

Local activity retries used a zero delay once attempts outnumbered the
backoff list, so a policy that backs off remotely retried in a tight loop
locally. Repeat the final entry instead, matching Server-scheduled
activities (durable-workflow/.github#219).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The corpus fixture runs the real local-activity executor and fails on the
previous zero-delay tail. Also fix a test line over the length limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit 35c6fea into main Nov 11, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant