wf-core reorg 2 split the Models

This commit is contained in:
lda
2026-05-08 21:39:49 +07:00 Verified
parent 4c860659e4
commit d37756246b
23 changed files with 321 additions and 178 deletions
-1
View File
@@ -11,4 +11,3 @@ __all__ = [
"ValidationReport",
"validate_workflow",
]
-1
View File
@@ -166,4 +166,3 @@ def _validate_reachable_outcomes(
f"nodes[{node_id}]",
f"reachable node is missing edges for outcomes {sorted(missing)!r}",
)
-1
View File
@@ -50,4 +50,3 @@ class ValidationReport:
f"- [{issue.code}] {issue.path}: {issue.message}" for issue in self.errors
)
raise ValueError(f"Workflow validation failed:\n{rendered}")
+3 -2
View File
@@ -19,7 +19,9 @@ def declared_outcomes_for_step(step: Step, node_defs: dict[str, NodeDef]) -> set
return set()
def reachable_node_ids(start: str, edges: list[Edge], nodes_by_id: dict[str, Step]) -> set[str]:
def reachable_node_ids(
start: str, edges: list[Edge], nodes_by_id: dict[str, Step]
) -> set[str]:
if start not in nodes_by_id:
return set()
@@ -38,4 +40,3 @@ def reachable_node_ids(start: str, edges: list[Edge], nodes_by_id: dict[str, Ste
seen.add(node_id)
stack.extend(adjacency.get(node_id, []))
return seen
-1
View File
@@ -220,4 +220,3 @@ def validate_operand(
path,
f"invalid operand path {operand.path!r}",
)