Add declarative resilience primitives to DSL: retry/backoff/on_error, timeout, sub-second sleep, and set-style fan-out#166
Open
Copilot wants to merge 2 commits into
Open
Conversation
Agent-Logs-Url: https://github.com/microsoft/pg_durable/sessions/431bfefe-5a7f-4e93-b68d-29151ec2fa50 Co-authored-by: pinodeca <32303022+pinodeca@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add declarative retry and backoff support to DSL
Add declarative resilience primitives to DSL: retry/backoff/on_error, timeout, sub-second sleep, and set-style fan-out
May 23, 2026
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.
The DSL lacked first-class resilience and fan-out constructs, forcing users to hand-build retry/backoff/error flows with
loop/if/sleepand manual coordination. This change adds declarative primitives for retry, timeout, error handling, sub-second timers, and array-based parallel composition.DSL resilience primitives
df.retry(...)with policy, max attempts, exponential backoff controls, jitter, and optionalon_errorhandler.df.catch(fut, handler)anddf.on_error(fut, handler)as explicit failure-branch combinators.df.timeout(fut, seconds)for first-class deadline wrapping.Sub-second durable sleep
df.sleep(double precision)and updateddf.sleep(bigint)encoding to milliseconds.Set-style fan-out
df.parallel(text[])anddf.join_all(text[])to compose N-way joins without pairwisejoin/join3chaining.Runtime orchestration behavior
on_error_node.Graph/config handling + grants/docs
on_error_nodeso nested handler nodes are validated and materialized correctly.