-
Notifications
You must be signed in to change notification settings - Fork 21.2k
[Refactor/Chore] Make workflow runtime-state initialization explicit #34522
Description
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for refactors or chores; if you would like to ask a question, please head to Discussions.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- Please do not modify this template :) and fill in all the required fields.
Description
Dify should stop depending on GraphOn's implicit construction of workflow runtime-state collaborators. Runtime-state requirements should be explicit before graph execution begins so the engine contract is predictable and missing collaborators fail fast instead of being materialized on demand.
Motivation
The current lazy-initialization behavior hides initialization requirements and creates coupling between Dify and GraphOn internals. That makes runtime-state lifecycle harder to reason about, especially across resume and restoration flows, and blocks a future GraphOn change that would raise an error when a required collaborator is missing.
Additional Context
This proposal should cover the full set of runtime-state collaborators that currently behave this way, not only the ready queue.