Skip to content

feat: defer actor restarts with exponential backoff#80

Merged
joshua-temple merged 1 commit into
mainfrom
feat/cluster-backoff
May 31, 2026
Merged

feat: defer actor restarts with exponential backoff#80
joshua-temple merged 1 commit into
mainfrom
feat/cluster-backoff

Conversation

@joshua-temple
Copy link
Copy Markdown
Collaborator

Adds the Backoff supervision decision: instead of restarting a failed actor immediately, the supervisor schedules the re-spawn after an exponentially growing delay (initial * factor^n, capped, per the per-src budget set with WithBackoff) and the host applies due restarts by calling Supervisor.Tick. Time is read through an injected state.Clock (WithClock, default the system clock), so backoff is fully deterministic under a FakeClock and never blocks the escalation handler. When the budget is spent the failure escalates. This completes the supervision strategy set — Stop, Escalate, Restart, Backoff — over the kernel's escalation seam. Coverage: cluster 96 percent. Additive; stdlib-only.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple joshua-temple merged commit 8c24dc9 into main May 31, 2026
10 checks passed
@joshua-temple joshua-temple deleted the feat/cluster-backoff branch May 31, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant