Skip to content

Preserve pending workflow state during generator disposal - #217

Draft
rmcdaniel wants to merge 1 commit into
mainfrom
fix/178-query-generator-lifecycle
Draft

rmcdaniel wants to merge 1 commit into
mainfrom
fix/178-query-generator-lifecycle

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

A pending workflow's generator currently finalizes before a query observes its state. finally and nested context exits change values from waiting to cleanup, and disposal can emit workflow logs. This is the accepted lifecycle defect in #178.

This tests-first draft adds 20 failing controls across activity, timer, condition and child suspensions: public/prepared queries, asynchronous query consumption, mutable result aliases, nested context managers, cancellation shields and discarded-replay logging. They reproduce on current main without product changes.

Implementation will give each replay bounded ownership through query/update consumption, detach observable results before disposal, and distinguish discarded SDK effects from actual workflow exit. Yielded-finally disposal, real success/failure/cancellation cleanup, cold replay and affected worker paths remain required. No frame mutation, global unraisable hook, unbounded generator cache, version change or release is included in this checkpoint. The independently qualified #175 and #225 candidates are unchanged.

This branch has not been deployed

No deployments
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