feat: expose workflow execution modes in editor

This commit is contained in:
2026-04-07 11:10:58 +02:00
parent f9d4da52b9
commit 26046fb2d6
7 changed files with 147 additions and 16 deletions
@@ -13,6 +13,7 @@ def test_build_preset_workflow_config_creates_canonical_dag():
assert config["version"] == 1
assert config["ui"]["preset"] == "still"
assert config["ui"]["execution_mode"] == "legacy"
assert [node["step"] for node in config["nodes"]] == [
"order_line_setup",
"resolve_template",
@@ -34,6 +35,7 @@ def test_canonicalize_workflow_config_migrates_legacy_preset():
assert canonical["version"] == 1
assert canonical["ui"]["preset"] == "turntable"
assert canonical["ui"]["execution_mode"] == "legacy"
assert any(node["step"] == "blender_turntable" for node in canonical["nodes"])
@@ -76,6 +78,7 @@ def test_canonicalize_legacy_custom_config_preserves_edges():
canonical = canonicalize_workflow_config(legacy)
assert canonical["ui"]["preset"] == "custom"
assert canonical["ui"]["execution_mode"] == "legacy"
assert canonical["edges"] == [{"id": "e1", "from": "input", "to": "render"}]
@@ -91,3 +94,19 @@ def test_extract_runtime_workflow_converts_resolution_to_dimensions():
assert params["width"] == 1920
assert params["height"] == 1080
assert "resolution" not in params
def test_canonicalize_workflow_config_defaults_execution_mode_for_canonical_configs():
canonical = canonicalize_workflow_config(
{
"version": 1,
"nodes": [
{"id": "setup", "step": "order_line_setup", "params": {}},
],
"edges": [],
"ui": {"preset": "custom"},
}
)
assert canonical["ui"]["preset"] == "custom"
assert canonical["ui"]["execution_mode"] == "legacy"