Skip to main content
Validation rules grade a scenario run once the agent is done. Edit them in the Validation section of the scenario form, or as the validation array of the scenario through the API. The engine first checks that the job completed, even when the array is empty. A scenario whose required job_resolution_status rule accepts agentic_failure skips that check, so it can expect a job that fails.
Every rule needs a human-readable label, shown in the results. required defaults to true; an optional rule counts in the compliance score but never fails the run.

Validators

host_state

Runs with the same shell and rules as setup steps - see How commands run. on picks a host from the scenario’s hosts, default the first one. If the host does not answer at all, the run ends in Error instead of failing the rule: an unreachable host says nothing about the agent.

turns

A turn is the tasks that a job starts together. The job starts the next turn when all of them end. Each item of turns is one turn of the job, in order:
  • hosts: every host in the list has a task in that turn. With no at_least, the turn has no other hosts.
  • at_least: the turn has at least this many hosts, which can include hosts that are not in hosts.
A turn has at most one task on a host, and the tasks of each listed turn must have started, ended and run at the same time. The job can have more turns after the listed ones. The scenario form has no field for this rule: edit the scenario as JSON.

pattern_match

The pattern is tested against each value separately - each command, each message - never against a joined blob.
  • A positive rule passes if any value matches.
  • A negated rule passes only if no value matches.
For task-level targets, the values of every task in the job are tested. If the job created no tasks, task-level rules fail with “No tasks to check” - negated ones included. task_plan is still accepted for older scenarios, but no longer has evidence on current versions. Do not use it in new scenarios. See Regular expression traps before writing patterns.

How a run is scored

The verdict, compliance, and remediation are computed from these rules - see How a run is graded.