Step Paths
Every step has a path: the names of its enclosing pipelines followed by its
own name, joined with /. In
(
Node { name: "split", .. },
Pipeline {
name: "north",
steps: (Node { name: "compute", .. },),
..
},
Pipeline {
name: "south",
steps: (Node { name: "compute", .. },),
..
},
)
the two compute nodes share a name but not a path: they are
north/compute and south/compute. Top-level stepsβ paths are just their
names (split). A flat tuple of steps adds no segment; only Pipelines (and
other groups, such as the one a RecurrentNode unrolls into)
do.
Paths are unique
check enforces two rules on names:
- Siblings have distinct names. Two steps in the same pipeline, or two
top-level steps, may not share a name (
CheckError::DuplicateStepName). - No
/in a name (CheckError::InvalidStepName), since/separates path segments.
Together these make every path in a pipeline unique, so a path identifies one step. When you build steps in a loop, give each a distinct name or, as the fan-out example does, put each in a pipeline named after its item.
Where paths are used
- Hooks receive each node and pipeline under its full path: inside a hook,
n.name()isnorth/compute, notcompute. This is what keeps per-node hook state apart βCacheHookβs cache entries,LoggingHookβs lines,VizHookβs live status. Callingname()on a step yourself still gives its local name. - Node filters (
run --nodes,--from-nodes,--to-nodes) match a path or any suffix of it that starts at a/:--nodes north/computeselects one node,--nodes computeselects both.orth/computematches nothing. - Viz shows full paths on the canvas and in the detail panel, and the last segment in the node tree, whose indentation shows the rest.
no_std: without an allocator there is nowhere to build a path, so onno_stdhooks receive the local name. Thecheckrules still apply.