Exposure names are unique per side
The rule
- Workflow exposure names MUST be unique within a side.
- Inputs and outputs are independent: a name MUST NOT be refused for appearing once as an input and once as an output.
- A repeat within one side MUST be refused with
R4_NAME_DUPLICATEatschema.{side}.{index}.
What it means
The rule fixes what counts as a collision but not which of the colliding entries is at fault: it takes the second entry to use a name, not the first, so the entry a reader reaches first in the list is never the one carrying the error.
Example
Two input exposure entries claiming the same name:
[
{ "name": "dup", "node_id": "n1", "port": "a" },
{ "name": "dup", "node_id": "n1", "port": "b" }
]{ "code": "R4_NAME_DUPLICATE", "locator": "schema.input.1" }The first entry, at schema.input.0, is not named in any error — the name it
introduced was fine until the second entry repeated it.
Why
Recorded under OPEN-25.
Fixtures
Test cases whose outcome this rule decides. A case compares absent, null and empty members exactly; the fixtures README defines each operation. Where a case and the rule disagree, the rule is right.
Two absent names are two format errors and no duplicate validate-exposure
An absent name takes part in no uniqueness comparison. Both entries are unbound, so no node or port check runs.
{ "given": { "inputs": [ {}, {} ] }, "expect": { "errors": [ { "code": "R4_NAME_FORMAT", "at": "schema.input.0" }, { "code": "R4_NAME_FORMAT", "at": "schema.input.1" } ] } }Two empty names are two format errors and one duplicate validate-exposure
The empty string is a name like any other, so two of them repeat.
{ "given": { "inputs": [ { "name": "" }, { "name": "" } ] }, "expect": { "errors": [ { "code": "R4_NAME_FORMAT", "at": "schema.input.0" }, { "code": "R4_NAME_FORMAT", "at": "schema.input.1" }, { "code": "R4_NAME_DUPLICATE", "at": "schema.input.1" } ] } }