fix: opt draft storage into real callers

This commit is contained in:
lda
2026-08-31 14:07:53 +07:00 Verified
parent ce7e3ed761
commit b377311a6e
21 changed files with 194 additions and 50 deletions
+23 -3
View File
@@ -107,9 +107,7 @@ async def test_local_static_server_runs_deployment_and_persists_run(tmp_path) ->
assert output["result"] == "hello from server"
run_id = run_result["run_id"]
assert isinstance(run_id, str)
assert (
server.stores.run_store.get_run(run_id).id == run_id
)
assert server.stores.run_store.get_run(run_id).id == run_id
async def test_local_static_server_inspects_and_reads_bounded_trace(tmp_path) -> None:
@@ -193,6 +191,28 @@ def test_local_static_server_has_no_source_registry_admin(tmp_path) -> None:
assert server.source_registry_admin is None
def test_local_static_server_default_composition_has_no_draft_store(tmp_path) -> None:
root = tmp_path / "store"
server = build_local_static_workflow_server(root)
assert server.stores.draft_workspace_store is None
assert server.context.draft_workspace_store is None
assert server.api.drafts_enabled is False
assert not (root / "draft_workspaces").exists()
def test_local_static_server_explicit_draft_composition_has_draft_store(
tmp_path,
) -> None:
root = tmp_path / "store"
server = build_local_static_workflow_server(root, drafts=True)
assert server.stores.draft_workspace_store is not None
assert server.context.draft_workspace_store is server.stores.draft_workspace_store
assert server.api.drafts_enabled is True
assert (root / "draft_workspaces").is_dir()
def test_local_static_builtins_are_platform_sources(tmp_path) -> None:
server = build_local_static_workflow_server(tmp_path)