Skip to content

The value check enforces type and enum, and declares the rest

A published contract says more than the launch boundary enforces. That is a real distinction and worth stating, so a caller does not read an unenforced keyword as a guarantee.

The rule

Normative: this is the rule
  1. The per-value stage of the launch check MUST enforce type and enum from a contract fragment and no other key.
  2. The set is closed, so that a caller can tell from the contract which published keys can refuse a launch.
  3. Every other published key (format, default, minimum, maximum, minLength, maxLength, pattern, and nested properties or items) is declared in the contract and MUST NOT be enforced here.
  4. A type that is not a single string MUST NOT be enforced here either.
  5. The top-level array of required names is the one other declared key that is enforced, and the earlier missing-input stage MUST enforce it.
  6. Values MUST NOT be coerced.
  7. For every structured type, the check MUST be only that the value is a collection.
  8. A type meaning "any value" MUST waive the type check entirely, and MUST match every value, including null and a collection.
  9. enum MUST still be honoured for such a type.
  10. Such types are declared no-constraint types, and a boundary that refused what the runtime accepts would give a port's declared type two meanings.
  11. enum MUST compare by identity, so a number and its string spelling are different values.
  12. Violations across several inputs MUST be aggregated into one refusal.
  13. An input with no contract fragment MUST skip the value check.

What it means

A published contract fragment says more than the boundary checks. Past the required array — enforced earlier, by the stage that checks presence — the value stage reads type and enum and no other key. minLength, maxLength, pattern, minimum, nested properties and items are all published, all declared, and none of them is enforced here. A caller who violates every one of them at once still gets through this stage.

A type meaning "any value" is not a stricter case of type — it waives the type check entirely, matching a collection, a scalar or null alike, while still honouring enum if one is published. Every structured type collapses to one check: is the value a collection at all. Nothing is coerced, and enum compares by identity, so a number and its string spelling are different values. An input with no contract fragment skips the value check outright, and violations across several inputs are aggregated into one refusal rather than answered one at a time.

Example

The workflow declares three inputs against three fragments: count against {"type": "integer"}, direction against {"type": "string", "enum": ["asc", "desc"]}, and variables against no type at all.

A string where the fragment declares an integerrefused
{ "count": "five" }
A value outside the fragment's enumrefused
{ "direction": "up" }
A structured value sent to a port with no declared typeaccepted
{ "variables": { "live_state": "{\"a\":1}" } }

A fourth input, code, is published against {"type": "string", "minLength": 8, "maxLength": 3, "pattern": "^\\d+$", "minimum": 5} — a fragment no single value could satisfy. It still launches:

A value violating every other declared constraint at onceaccepted
{ "code": "abcdef" }

Why

Recorded under OPEN-16, OPEN-22, 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.

  • A null meets required at launch, then fails a string type resolve-launch-inputs
    {
      "given": {
        "inputs": [
          {
            "name": "topic",
            "node_id": "n1",
            "port": "text",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "supplied": {
          "topic": null
        }
      },
      "expect": {
        "refused": {
          "stage": "value",
          "inputs": [
            "topic"
          ]
        }
      }
    }

    fixtures/presence/in-null-meets-required-fails-type.json

  • A value for an unbound input is checked against its schema resolve-launch-inputs
    {
      "given": {
        "inputs": [
          {
            "name": "topic",
            "schema": {
              "type": "string"
            }
          }
        ],
        "supplied": {
          "topic": 5
        }
      },
      "expect": {
        "refused": {
          "stage": "value",
          "inputs": [
            "topic"
          ]
        }
      }
    }

    fixtures/presence/in-unbound-value-checked.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 · MAN-16 · changed in spec 1.0