Add durable child-orchestration primitives with composable wait semantics#165
Open
Copilot wants to merge 3 commits into
Open
Add durable child-orchestration primitives with composable wait semantics#165Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/microsoft/pg_durable/sessions/67507bc7-fd80-4fa6-a05e-8fae4729c8d1 Co-authored-by: pinodeca <32303022+pinodeca@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/pg_durable/sessions/67507bc7-fd80-4fa6-a05e-8fae4729c8d1 Co-authored-by: pinodeca <32303022+pinodeca@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add missing durable sub-orchestration primitives
Add durable child-orchestration primitives with composable wait semantics
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.
pg_durable had no first-class way to express “start a child orchestration and durably resume when it completes.” This change adds graph-composable child-wait primitives so parent workflows can model sub-orchestration flows without backend-session polling or hand-rolled loop/sleep polling.
New DSL primitives
df.await_instance(instance_id, timeout_seconds)as a durable future node that waits for another instance to reach a terminal state.df.call_child(fut, label, options)as a convenience wrapper that starts a child viadf.start(...)and then waits for it durably.df.call_childcurrently supports:timeout_secondsdatabaseon_failure = 'raise'Runtime / orchestration support
AWAIT_INSTANCEnode type.AWAIT_INSTANCEusing durable timer-based polling plus an activity that reads child instance state.instance_idstatusresultCompatibility / SQL surface
df.ensure_durofutto recognizeAWAIT_INSTANCE.df.grant_usageand the0.2.0 -> 0.2.1upgrade SQL so upgraded installs can grant and call the new functions immediately.Docs
docs/child-orchestration-design.mdExample
This expands to a child
df.start(...)plus a durable wait, and returns the child envelope to the parent graph.