A handle encodes the node, the direction and the port
A wire carries no declared type. Everything the system deduces about it, it deduces from the two handles, so how a handle is spelled and split is grammar, not detail.
The rule
- A port handle is spelled
{nodeId}-{input|output}-{portName}. - The port name is everything following the first
-input-or-output-marker in the handle, so a port name may itself contain a direction marker. - Classification by port is an exact suffix match, never a substring match: a handle that merely contains a reserved port suffix is not classified by it unless the handle ends with it.
What it means
A handle is split at the first -input- or -output- marker it contains,
not the last. Everything after that first marker is the port name, verbatim
— including a second direction marker, if the port itself happens to be
named with one. Reading a handle by counting segments from the end, or by
searching for the marker nearest the port name, misparses exactly the cases
where a node identifier or a port name contains one of the reserved words
itself.
Example
A handle whose port name itself repeats the marker that split it:
"a-output-b-output-c""b-output-c"A handle whose node identifier, not its port name, carries the opposite direction's marker:
"weird-input-node-output-text""text"