--- id: CMP-8 family: RT-CMP level: core profiles: [runtime] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/rt-cmp/cmp-8 specification: FlowDrop Workflow Specification 1.0-draft licence: CC BY 4.0 --- # CMP-8 — Execution order is a topological order, and no more than that *RT-CMP (Part II) · level: core · profiles: runtime · added in 1.0* Two nodes with no dependency between them may run in either relative order. An author who needs one before the other must say so with an edge. ## The rule > **Normative.** This is the rule. > > 1. The execution order is a topological order of the execution dependencies: a node never precedes a node it depends on. > > 2. The relative order of nodes with no dependency relation between them is not specified, and an author must not rely on it. ## What it means The order that comes out of compilation is a topological order and nothing more: a node runs only after everything it depends on, but two nodes with no dependency between them can come out in either relative order. An implementation may even produce the same order on every run without that constancy being anything an author may depend on — nothing about a node's identifier or its position in the stored workflow decides the order; only a wire does. Forcing one node to run before another that it does not otherwise need means adding an edge between them. ## Example One node, `root`, feeds two others, `zulu` and `alpha`, which share no dependency between themselves. One order the implementation produced: ```json title="One legal execution order" verdict="topological" ["root", "zulu", "alpha"] ``` `root` precedes both, as it must. The relative order of `zulu` and `alpha` is not guaranteed by this run or any other — only an edge between them, which this workflow does not draw, would fix it. ## Related rules - Names: CMP-7 - Referenced by: CMP-7 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.