Skip to content

An exposed workflow port is named in the permitted alphabet

An exposure name is a caller-facing parameter name. Restricting it to a small alphabet keeps it usable as a key in every context a caller passes it through.

The rule

Normative: this is the rule
  1. A workflow exposure entry's name MUST match ^[a-z0-9_-]+$.
  2. A name that is absent, empty or outside that alphabet MUST be refused with R4_NAME_FORMAT at schema.{side}.{index}, where {side} is input or output and {index} the entry's position in that side's list.
  3. Unlike R4.c, this failure MUST NOT skip the entry's remaining checks: uniqueness, and the node and port checks of a bound entry, MUST still be evaluated.
  4. Two entries whose names are both the empty string therefore yield two R4_NAME_FORMAT errors and one R4_NAME_DUPLICATE.
  5. An absent name takes part in no uniqueness comparison.

Why

Recorded under OPEN-25, OPEN-26.

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.a · changed in spec 1.0