Skip to content

Exposure names are unique per side

The rule

Normative: this is the rule
  1. Workflow exposure names MUST be unique within a side.
  2. Inputs and outputs are independent: a name MUST NOT be refused for appearing once as an input and once as an output.
  3. A repeat within one side MUST be refused with R4_NAME_DUPLICATE at schema.{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:

Two input exposures both named dupone flagged
[
  { "name": "dup", "node_id": "n1", "port": "a" },
  { "name": "dup", "node_id": "n1", "port": "b" }
]
The error the second entry getsreported
{ "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"
          }
        ]
      }
    }

    fixtures/presence/r4-absent-names-no-duplicate.json

  • 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"
          }
        ]
      }
    }

    fixtures/presence/r4-empty-names-duplicate.json

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