Applies the cardinality and acyclicity rules to a proposed connection and
returns the edge list the new edge should be added onto, or null to
reject the connection.
Output side: a source port holds at most one outgoing edge — drawing
from an already-wired port rewires it, dropping the previous edge.
Cycles: a connection whose target already reaches the source (over the
edges left after the rewire) would close a loop and is rejected, as is a
direct self-loop.
A missing source handle is the success port (loaded edges fold out into
success in policyToEdges); target handles play no role since inputs
accept any number of edges.
Applies the cardinality and acyclicity rules to a proposed connection and returns the edge list the new edge should be added onto, or
nullto reject the connection.A missing source handle is the
successport (loaded edges foldoutintosuccessin policyToEdges); target handles play no role since inputs accept any number of edges.