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

on, and each host of order, must be one of the scenario’s hosts. A rule with on reads only the tasks on that host. When the job has no task there, the rule fails, and a negated one is skipped and passes. A pattern_match rule on a target that reads the whole job (job_resolution, job_plan, gateway_messages, gateway_summary) takes no on. The scenario form edits every rule except turns: a scenario with a turns rule opens as JSON in the Form / JSON toggle.

In the scenario form

The Validation section starts with a locked Job completed row, the check that always runs. It says when the check is off, because a required Job outcome rule accepts Agentic failure, and that a plan that waits for approval counts as a diagnosis. A name that no agent or operational rule of the organization has shows a warning under the field. The Look in menu of a new rule leaves out Agent messages and Operational rules: they show only on a rule that already reads them. Executed only reads Only commands that reached the host. Use task_order to check an order, such as “the backup on db-01 before the change on app-01”. Use turns to check the full shape of the job, such as a batch of four hosts at once.

ticket_state

state takes new, in progress, on hold, resolved, closed, canceled, and open, which accepts the first three. The names are the same on every gateway. The patterns do not care about upper or lower case. A gateway that does not keep a field fails a rule on it, and the details say so: A status that has none of these names, such as an Ecritel on_break, fails only a rule that checks state. When the run ends on a plan that waits for approval, the rule grades the ticket as the plan left it.

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 and no at_most, 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.
  • at_most: the turn has at most this many hosts. With at_least of the same number, it asks for a turn of an exact size, such as the first batch of a change: { "hosts": [], "at_least": 1, "at_most": 1 }.
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, a task-level rule fails, and a negated one is skipped and passes. See Regular expression traps before writing patterns.

How a run is scored

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