Recipe Language 2.0 Reference

This page is generated from the current build’s aggregate JSON Schema. It describes the production recipe language accepted by parsing, execution, and YamVIEW.

Download the JSON Schema.

See Recipe Language 2 Architecture for parsing, semantic rules, YamVIEW, and runtime construction. Maintainers should also read Maintaining the Recipe Language.

Documents

RecipeHeader

The first YAML document, identifying a recipe and its entry sequence.

Fields

Field

Type

Requirement

Description and example

continue_on_error

bool | None

optional; default null

Recipe-wide error policy. Example: false.

description

str

required

Purpose of the recipe. Example: "Acceptance tests.".

globals

object

required

Recipe-wide variables. Example: {}.

main_sequence

str

required

Sequence where execution begins. Example: "Main".

name

str

required

Human-readable recipe name. Example: "Hardware acceptance".

recipe_version

'2.0.0'

required

Version of the recipe language contract. Example: "2.0.0".

report

'overwrite' | 'append'

optional; default "overwrite"

Report file mode. Example: "overwrite".

report_name_include_serial

bool

optional; default false

Include the serial number in the report name. Example: false.

test_package

str | None

optional; default null

Package containing recipe test modules. Example: "acceptance".

version

str

required

Version of this recipe. Example: "1.0".

Sequence

One named executable sequence document.

Fields

Field

Type

Requirement

Description and example

description

str

required

Purpose of the sequence. Example: "Main sequence.".

locals

object

required

Variables local to the sequence. Example: {}.

outputs

object

required

Reserved sequence output metadata. Example: {}.

parameters

object

required

Reserved sequence input metadata. Example: {}.

sequence_name

str

required

Unique sequence name. Example: "Main".

setup_steps

list[StepDefinition]

required

Steps run before the main steps. Example: [].

steps

list[StepDefinition]

required

Ordered main steps. Example: [].

teardown_steps

list[StepDefinition]

required

Steps run during teardown. Example: [].

Nested structures

InternalSequenceReference

Reference to another sequence in this recipe.

Fields

Field

Type

Requirement

Description and example

name

str

required

Target sequence name. Example: "Calibration".

type

'internal'

required

Reference kind. Example: "internal".

FileDestination

Destination used by a file-loading step.

Fields

Field

Type

Requirement

Description and example

type

'local' | 'global'

required

Variable scope. Example: "local".

variable

str

required

Destination variable name. Example: "selected_file".

UploadFile

One local-to-remote SSH upload pair.

Fields

Field

Type

Requirement

Description and example

local

str

required

Local file or package resource. Example: "bin/tool".

remote

str

required

Remote destination path. Example: "/tmp/tool".

Common step fields

Fields

Field

Type

Requirement

Description and example

continue_on_error

bool

optional; default false

Per-step error policy. Example: false.

critical

bool

optional; default false

Stop on error when policy permits continuation. Example: false.

description

str

required

Purpose of the step. Example: "Run a test operation.".

id

str | None

optional; default null

Optional stable step identifier. Example: "test-1".

input_mapping

dict[str, InputMapping]

optional

Named input sources. Example: {}.

output_mapping

dict[str, OutputMapping]

optional

Named verdicts and destinations. Example: {}.

skip

bool

optional; default false

Skip execution. Example: false.

step_name

str

required

Human-readable step name. Example: "Run test".

Step definitions

PythonModuleStep

Calls a method or reads/writes an attribute in a Python module.

Fields

Field

Type

Requirement

Description and example

action_type

'method' | 'read_attribute' | 'write_attribute'

required

Operation performed on the Python module. Example: "method".

method_name

str | None

optional; default null

Method name for method actions. Example: "run".

module

str

required

Python module path. Example: "tests.py".

steptype

'PythonModuleStep'

required

Canonical registered step type. Example: "PythonModuleStep".

SSHCloseStep

Closes the SSH client stored in recipe globals.

Fields

Field

Type

Requirement

Description and example

steptype

'SSHCloseStep'

required

Canonical registered step type. Example: "SSHCloseStep".

SSHConnectStep

Opens the SSH client stored in recipe globals.

Fields

Field

Type

Requirement

Description and example

steptype

'SSHConnectStep'

required

Canonical registered step type. Example: "SSHConnectStep".

SSHUploadStep

Uploads files through an SSH connection.

Fields

Field

Type

Requirement

Description and example

files

list[UploadFile]

required

Local and remote file pairs to upload. Example: [{"local": "bin/tool", "remote": "/tmp/tool"}].

local_package

str | None

optional; default null

Optional package containing local resources. Example: "my_package".

permissions

int | str | None

optional; default null

Optional remote permissions. Example: "0755".

skip_if_sha256_match

bool

optional; default false

Skip files whose remote checksum matches. Example: false.

steptype

'SSHUploadStep'

required

Canonical registered step type. Example: "SSHUploadStep".

SequenceStep

Runs another sequence as a step.

Fields

Field

Type

Requirement

Description and example

sequence

InternalSequenceReference

required

Internal sequence reference. Example: {"name": "Calibration", "type": "internal"}.

steptype

'SequenceStep'

required

Canonical registered step type. Example: "SequenceStep".

SerialNumberStep

Captures the device serial number.

Fields

Field

Type

Requirement

Description and example

steptype

'SerialNumberStep'

required

Canonical registered step type. Example: "SerialNumberStep".

UserInteractionStep

Displays an operator interaction prompt.

Fields

Field

Type

Requirement

Description and example

steptype

'UserInteractionStep'

required

Canonical registered step type. Example: "UserInteractionStep".

UserLoadingStep

Prompts the operator to select a file.

Fields

Field

Type

Requirement

Description and example

file_save_location

FileDestination | None

optional; default null

Local or global destination for the selected file. Example: {"type": "local", "variable": "selected_file"}.

steptype

'UserLoadingStep'

required

Canonical registered step type. Example: "UserLoadingStep".

UserRunMethodStep

Optionally runs a Python method after an operator response.

Fields

Field

Type

Requirement

Description and example

action_type

str | None

optional; default null

Optional Python action type. Example: "method".

method_name

str | None

optional; default null

Optional Python method name. Example: "run".

module

str | None

optional; default null

Optional Python module path. Example: "tests.py".

steptype

'UserRunMethodStep'

required

Canonical registered step type. Example: "UserRunMethodStep".

trigger_response

str | list[any] | object | None

optional; default null

Operator response that triggers execution. Example: "run".

UserWriteStep

Writes an operator-provided value to a configured destination.

Fields

Field

Type

Requirement

Description and example

steptype

'UserWriteStep'

required

Canonical registered step type. Example: "UserWriteStep".

WaitStep

Waits for a non-negative duration in seconds.

Fields

Field

Type

Requirement

Description and example

steptype

'WaitStep'

required

Canonical registered step type. Example: "WaitStep".

Input mappings

DirectInput

Provides a literal value.

Fields

Field

Type

Requirement

Description and example

indexed

bool

optional; default false

Expand a list into indexed steps. Example: false.

type

'direct'

required

Input source type. Example: "direct".

value

any

required

Literal input value. Example: 1.

GlobalInput

Reads a recipe-global variable.

Fields

Field

Type

Requirement

Description and example

global_name

str

required

Global variable name. Example: "global_value".

type

'global'

required

Input source type. Example: "global".

LocalInput

Reads a sequence-local variable.

Fields

Field

Type

Requirement

Description and example

local_name

str

required

Local variable name. Example: "local_value".

type

'local'

required

Input source type. Example: "local".

MethodInput

Resolves a method reference for the step.

Fields

Field

Type

Requirement

Description and example

type

'method'

required

Input source type. Example: "method".

value

any

required

Method reference. Example: "helper".

Output mappings

EqualsOutput

Passes when the output equals the configured value.

Fields

Field

Type

Requirement

Description and example

type

'equals'

required

Output mapping type. Example: "equals".

value

any

required

Expected value. Example: 3.

GlobalOutput

Stores the output in a recipe-global variable.

Fields

Field

Type

Requirement

Description and example

global_name

str

required

Global destination variable. Example: "saved".

type

'global'

required

Output mapping type. Example: "global".

ImageOutput

Publishes an image output for presentation.

Fields

Field

Type

Requirement

Description and example

type

'image'

required

Output mapping type. Example: "image".

LocalOutput

Stores the output in a sequence-local variable.

Fields

Field

Type

Requirement

Description and example

local_name

str

required

Local destination variable. Example: "saved".

type

'local'

required

Output mapping type. Example: "local".

PassFailOutput

Interprets the output as a pass/fail verdict.

Fields

Field

Type

Requirement

Description and example

type

'passfail'

required

Output mapping type. Example: "passfail".

PassthroughOutput

Uses the nested result without adding a verdict.

Fields

Field

Type

Requirement

Description and example

type

'passthrough'

required

Output mapping type. Example: "passthrough".

RangeOutput

Passes when the output is within an inclusive range.

Fields

Field

Type

Requirement

Description and example

max

any

required

Maximum accepted value. Example: 4.

min

any

required

Minimum accepted value. Example: 1.

type

'range'

required

Output mapping type. Example: "range".