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
+1 -1
View File
@@ -27,7 +27,7 @@ def _api(root: Path) -> WorkflowApi:
ConnectionConfig(id="demo.personal", server="demo", account="personal")
)
service.register_specs("demo.personal", echo_tool)
return WorkflowApi(context_from_service(service))
return WorkflowApi(context_from_service(service), drafts=True)
def test_workflow_api_composes_domain_services(tmp_path: Path) -> None:
+5
View File
@@ -69,3 +69,8 @@ def test_durable_workflow_api_can_opt_out_of_draft_store(tmp_path) -> None:
api = durable_workflow_api(context, drafts=False)
assert api.drafts_enabled is False
assert api.drafts is None
assert api.draft_authoring is None
assert api.capabilities.drafts is None
assert api.capabilities.draft_authoring is None
assert api.artifacts.drafts is None