Expand description
Typechecking a node graph: topological order, fan-in composition via
InputExpr, cycle rejection (unless marked repeat_until), and
branch-exclusivity analysis for conditional dispatch.
See docs/superpowers/specs/2026-08-03-dag-core-design.md for the full
design. This module’s check_graph is the graph-shaped analogue of
crate::pipeline::check — same idea (typecheck seams before anything
runs), different shape (a graph of named nodes instead of a Vec).
Structs§
- Branch
Exclusivity - Which branch decision + label a node is exclusive to — a node is only
executed when this decision’s chosen route matches
label. Carryingdecision(not justlabel) is what lets two independentbranchesdecisions that happen to reuse the same label string coexist without being confused for a conflict. - Checked
Graph - A whole graph, typechecked and topologically ordered.
- Checked
Node - One checked node, ready to execute.
Enums§
- DagError
- Why a graph was rejected.
Functions§
- check_
graph - Typecheck a graph.
resolvedmust already contain one entry per node ingraph.nodes, in the same order — building that mapping (viapipeline::resolve_and_load, one call per node) is the caller’s job (a later task), same division of responsibilitypipeline::checkalready has. - fanout_
collection_ ty - What a fan-out node presents to the nodes downstream of it.
- graph_
fingerprint - A stable fingerprint of a checked graph’s shape and contents — every node’s name and declared signature, joined and hashed. Two graphs with the same fingerprint are the same, for resume-safety purposes; this isn’t a security boundary, just a “did the loaded spec actually change” guard, so a simple SHA-256 (already a workspace dependency, same crate the catalog’s own content-hashing uses) is all this needs.