Skip to content

Two identical edges between the same ports are refused

Duplicate detection compares what the document literally says, not what it means. Two spellings of the same logical connection are therefore two distinct edges, and both are kept.

The rule

Normative: this is the rule
  1. Two edges are duplicates when their source, target and both handles are identical.
  2. A duplicate MUST be refused with R13_EDGE_PARALLEL_DUPLICATE at edge.{index}, and the error MUST name the position of the earlier edge it duplicates.
  3. The four values MUST be compared verbatim, with no parsing or normalisation of a handle into a port name.
  4. Two edges between the same pair of nodes over different ports therefore stay valid.
  5. Two edges over the same logical port written differently, one with the handle absent and one with it spelled out, are both accepted.
  6. An absent handle and an empty one are different values.
  7. An edge whose source or target is absent or empty MUST take no part in the comparison.

What it means

The comparison reads the four fields as they are written, not as they resolve. Nothing expands an omitted handle to whatever port it defaults to, so two edges over what is otherwise the same logical connection — one spelling both handles out, the other leaving them unset — compare unequal and are both accepted. An absent handle and an empty one compare unequal for the same reason. Only a document that repeats all four values verbatim is a duplicate.

Example

One edge leaves both handles unset; the other spells out the identical connection in full:

One edge with handles omitted, one with them spelled outaccepted
[
  { "id": "e1", "source": "s", "target": "t" },
  {
    "id": "e2",
    "source": "s",
    "sourceHandle": "s-output-result",
    "target": "t",
    "targetHandle": "t-input-value"
  }
]

Why

Recorded under OPEN-7, OPEN-25, OPEN-26.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · R13 · changed in spec 1.0