fix: make workflow drafts explicitly opt in

This commit is contained in:
lda
2026-08-31 03:08:47 +07:00 Verified
parent 5315d4b66e
commit ce7e3ed761
15 changed files with 256 additions and 108 deletions
+3 -2
View File
@@ -295,8 +295,9 @@ def build_local_static_workflow_server(
root: str | Path,
*,
extra_sources: Mapping[str, CapabilitySource] | None = None,
drafts: bool = False,
) -> WorkflowServer:
"""Build a durable local/static workflow server composition."""
"""Build a durable local/static server, with drafts as an explicit opt-in."""
config = WorkflowServerConfig(store_root=Path(root))
stores = file_workflow_stores(config.store_root)
events = InMemoryWorkflowEventRecorder()
@@ -320,7 +321,7 @@ def build_local_static_workflow_server(
runtime=runtime,
live_sources=None,
)
api = durable_workflow_api(context)
api = durable_workflow_api(context, drafts=drafts)
source_admin = WorkflowSourceAdminApi(context)
admin = WorkflowAdminApi(
connections=EmptyWorkflowConnectionProvider(),