Skip to content

Conventions

Vocabulary and references shared by every rule, stated once.

Vocabulary and references shared by every rule, stated once here so no rule has to repeat them.

Requirement levels

The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY in this specification are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals, as shown here. This specification uses no other BCP 14 key words.

In plain terms:

The same words in lower case are ordinary English and bind nothing.

Normative and informative text

A rule's normative text, these conventions, and the decision of a ruling are normative. Everything else is informative: a rule's title and summary, narrative pages, examples, notes, the glossary's explanations, and a ruling's question. Informative text explains; it never adds a requirement. Where the two disagree, the normative text wins and the disagreement is a defect to report.

Conformance

An implementation declares the profiles it implements and the level it claims. It conforms when it meets every requirement of every rule that belongs to one of those profiles, at the claimed level and every level below it. A rule that is withdrawn does not bind.

Refusals

Where a rule says a request is refused with 400, 409, 422 and so on, the number is an HTTP status code with the meaning given in RFC 9110, HTTP Semantics. A refusal never partially applies: if a request is refused, nothing it asked for has taken effect.

Which status a refusal gets. One test decides it, for every rule:

What is wrongStatusCode, where no rule names a more specific one
A request body was sent to an endpoint that takes JSON, with no Content-Type or one the endpoint does not support415UNSUPPORTED_MEDIA_TYPE
The body exceeds the size limit413REQUEST_BODY_TOO_LARGE
No JSON value could be read from the body within the limits: it is empty, not well-formed, or nested at or beyond the depth limit400INVALID_REQUEST_BODY
A JSON value was read, and is refused: its shape, a missing or empty member, inputs, validation422INVALID_REQUEST_BODY
A query parameter is malformed400INVALID_QUERY_PARAMETER
A request header a rule defines is malformed400INVALID_REQUEST_HEADER

The test covers what is wrong with the request itself: its body, its query and its headers. A rule that names a status for such a refusal names the one this test gives. Refusals about the caller or about stored state (401 for a request without accepted credentials, 403 for a caller who may not act, 404 for something that does not exist, 409 for a conflict with the state of what is addressed) take the status their own rules give. Where such a rule names no code, a 403 carries ACCESS_DENIED and a 404 carries NOT_FOUND. A failure an implementation cannot attribute to a cause (API-7) carries INTERNAL_ERROR.

Three codes for a 422 recur across rules: INVALID_REQUEST_BODY for a value whose shape or members are refused, INVALID_INPUTS for refused launch or turn inputs (MAN-15, API-2), and VALIDATION_FAILED for a workflow refused by validation (STORE-5, VAL-LAUNCH). Every refusal carries a code (API-8): the one its rule names, or else the one this section gives.

Blanket authority. A caller holds blanket authority over a kind of record (runs, jobs, workflows, snapshots) when it holds, for every record of that kind whoever owns it, the authority the request needs: to view it for a read, to cancel it for a cancel, to signal it for a pause or a resume. Authority over runs is not authority over jobs (PIPE-5). An interrupt counts as a record of the run it belongs to (INT-24). Whether a record exists is no secret from such a caller.

Hiding whether a record exists. A request naming a record by its identifier that does not exist MUST be answered 404 with the code NOT_FOUND only to a caller holding blanket authority over that kind of record. Every other identified caller MUST get the 403 with the code ACCESS_DENIED that a record it may not act on gets, so that no route can be used to learn which records exist. This holds on every route that names a record, unless the route's own rule gives another answer; PIPE-1, PIPE-6, INT-16, INT-24, STORE-14, META-5, SNAP-2 and API-12 state it for their routes. The callback route (INT-19) answers an unknown interrupt 404 to every caller it admits, because the authority it checks first covers every interrupt a callback may answer. A create that supplies an identifier already in use is refused with 409 and the code WORKFLOW_ID_TAKEN (STORE-3, STORE-9): the client chose the identifier, so the refusal cannot be made without saying that it is taken, and an implementation that must not reveal it issues identifiers itself.

Unauthenticated requests. A request to a route that needs an identified caller, made without credentials or with credentials the implementation does not accept, MUST be refused with 401 and the code UNAUTHENTICATED, with the WWW-Authenticate header RFC 9110 requires, before any record is looked up, so the answer says nothing about any record. The 403 that hides a record's existence is for a caller the implementation has identified. A route an implementation serves to callers it does not identify, such as the discovery document (API-9), MUST NOT answer 401 to a request that carries no credentials. It MUST still answer 401 to a request that carries credentials it does not accept, rather than serve it as an unidentified caller, so that a client with an expired credential is told to renew it.

Checks of the request alone MAY run before the caller is authorised. A check that reads stored state (a workflow's declared inputs, its validation) MUST run after the caller is authorised, whatever status it would give, so that no refusal tells a caller who may not see something anything about it.

Codes

Every machine-readable code this specification defines is written in UPPER_SNAKE_CASE: it starts with an upper-case ASCII letter and holds only upper-case ASCII letters, digits and underscores (ASYNC_DECLARED, R4_NAME_FORMAT). That covers a refusal's error_code (API-8), a validation error's code, the code of an error output, a diagnostic code in a report, and every value of a reason vocabulary: a fixed value a rule names to say why something happened, such as a skip reason (BRANCH_NOT_ACTIVE), the reason a node is left out of the execution graph, a decline's reason, or a run's terminalReason (PIPE-1). A reason a person writes in their own words is text, not a code. A code an implementation or a node type adds SHOULD take the same form. Codes are compared as strings (Equal values), so CONFIRMATION_DECLINED and confirmation_declined are two different codes, and an implementation MUST NOT emit a code this specification defines in any other case.

Validation results

A validation result's errors carry no defined order. Two implementations refusing the same workflow may report the same errors in different sequences, and one implementation may change its own order without notice, so a consumer MUST NOT depend on it. Where a rule needs an error to be identifiable, it says so by naming the code and the locator, never the position.

Authoring surfaces

Some rules address what an authoring surface does. They constrain the data such a surface may produce (what it may record, and what it must not) and never how it presents controls. Widget shape, layout, enablement and the order things appear in are an implementation's own affair, and a rule that could only be satisfied by building a particular control is a defect in the rule.

Payloads

Request and response bodies are JSON, as defined in RFC 8259.

Member order. A JSON object's members have no order (RFC 8259 §4). Where a rule lists the members of an object, it states which members are present, never the order they appear in. A consumer MUST NOT depend on member order. The order of an array's elements is significant only where the rule says what it means.

Absent, null and empty. A member of an object is in one of four states. The definitions bind every payload in this specification: requests, responses, stored workflows and run results.

StateJSONMeaning
Not providedthe member is absentA fallback a rule gives for it applies: a lower priority, a default.
Provided, no valuenullA choice. It takes the place of any fallback. In a partial update it clears the stored value.
Provided, empty"", [], {}, false, 0A value, like any other.
Provided, with contentanything elseA value.

No rule reads an empty value as absent or as null. A member moves from one state to another only where a rule says so, as when a default fills an absent member. An implementation MUST NOT otherwise drop a null or empty member, or fill an absent one, when it reads, stores or writes a payload.

Where these states meet JSON Schema, they agree with it: required is met by a member that is present, and null is a value of its own type, which passes type only where the type admits it. There are no exceptions. A node parameter reads the states the same way: one that nothing supplies is absent (CFG-14), required is met by a present null (CFG-9), and the parameter's schema decides whether that null is acceptable (CFG-10, R6.i). A rule that needs "a value, not null" says so with a type that does not admit null.

Equal values. Where a rule compares two JSON values, they are equal as JSON Schema's const and enum compare them: they are of the same JSON type, and two strings are equal code point by code point, two numbers are equal by numeric value (1 and 1.0 are equal), two arrays hold equal items in the same order, and two objects have the same member names with equal values, whatever their order. There is no conversion between types, so "1" is not equal to 1, and true is not equal to 1. A host language's own equality operator gives this answer only in some of these cases, so an implementation compares by this definition, not by its operator.

Extensibility

Lists are open unless a rule says they are closed. Where a rule lists the members of an object, or the values a field may take, an implementation MAY add members or values of its own. An addition MUST NOT change the meaning of anything the specification defines. A consumer MUST ignore a member it does not recognise, and MUST NOT fail solely because it meets a value it does not recognise in an open list.

Added names are registered. A member or value that an implementation adds SHOULD be listed in extensions.md, with what it means and which implementation adds it. The specification never gives a listed name another meaning, and two implementations adding the same name learn of the clash from the register rather than from each other's payloads.

A closed list is exhaustive. Where a rule says a list is closed, an implementation MUST NOT add to it, and a consumer MAY treat anything outside it as an error. A rule closes a list only where an addition would break a consumer that relies on the list being complete, and says why.

Limits

Where a rule says an implementation MUST accept at least some amount (a length, a count, a size), the amount is a floor. An implementation MAY accept more. Beyond its own limit it refuses as the rule says. A caller that stays within the floor can rely on every conforming implementation accepting the request.

Counting text

Where a rule bounds the length of a string, it counts Unicode code points unless it says otherwise. Not bytes, which would make a limit depend on the alphabet the text is written in; and not grapheme clusters, which are closer to what a person calls a character but much harder for two implementations to agree on.

Identifiers

Rules are cited by identifier (STORE-2, SCH-41), grouped by family prefix. An identifier is permanent: never renumbered, never reused, still citable after the rule is withdrawn.

Rulings

A change to what implementations must do is recorded as a ruling: what was decided, and why. Rules affected by a ruling reference it. A ruling is history and is never rewritten; where it turns out to be wrong, a later ruling supersedes it and says so.

Rulings are carried here, in this specification, and each one has a page of its own. A rule citing a ruling that is not written down states a requirement whose reasoning the reader cannot check, which is the situation this convention exists to prevent.

A ruling identifier is permanent on the same terms as a rule identifier: never renumbered, never reused, still citable after the ruling is superseded. The two live in separate namespaces, so no identifier is ever both.

A ruling settles what is required. It does not say who has implemented it, or when: that is each implementation's own to publish, and appears nowhere here.

Profiles

Not every rule binds every kind of implementation. A rule declares the profiles it applies to:

Levels

Posture

A rule declares how it is meant to be read.

Posture is about the rule's standing in this document, and never about any implementation's progress against it.