move subgraph operations to wf_api

ok these are some composition stuff so tgis is probably the right place to live
This commit is contained in:
lda
2026-06-01 21:53:16 +07:00 Verified
parent 963f77fcb2
commit 0d43b15b5c
7 changed files with 309 additions and 239 deletions
@@ -0,0 +1,34 @@
from __future__ import annotations
import wf_api.saved_subgraphs as canonical
import wf_mcp.workflow_surface.saved_subgraphs as shim
def test_canonical_import_exports_expected_symbols() -> None:
assert hasattr(canonical, "SavedSubgraphTree")
assert hasattr(canonical, "resolve_saved_subgraph_tree")
assert hasattr(canonical, "prepare_saved_subgraphs")
assert hasattr(canonical, "validate_saved_subgraph_tree")
assert hasattr(canonical, "saved_subgraph_tree_from_snapshots")
assert hasattr(canonical, "direct_wrapper_interrupt_diagnostic")
def test_shim_import_still_works() -> None:
assert hasattr(shim, "SavedSubgraphTree")
assert hasattr(shim, "resolve_saved_subgraph_tree")
assert hasattr(shim, "prepare_saved_subgraphs")
def test_shim_symbols_are_identical_to_canonical() -> None:
assert shim.SavedSubgraphTree is canonical.SavedSubgraphTree
assert shim.resolve_saved_subgraph_tree is canonical.resolve_saved_subgraph_tree
assert shim.prepare_saved_subgraphs is canonical.prepare_saved_subgraphs
assert shim.validate_saved_subgraph_tree is canonical.validate_saved_subgraph_tree
assert (
shim.saved_subgraph_tree_from_snapshots
is canonical.saved_subgraph_tree_from_snapshots
)
assert (
shim.direct_wrapper_interrupt_diagnostic
is canonical.direct_wrapper_interrupt_diagnostic
)