validation object of scenario.json and evaluated after the agent finishes executing.
Structure
For
tasks rules, each rule is checked against every task. A rule passes if it matches on at least one task.
Rule Structure
Every rule shares a common set of fields:Validators
pattern_match
Checks whether a regex pattern matches in a specific field of the job or task data.
where targets:
job_resolution_status
Checks the job’s final resolution status.
success, agentic_failure, hard_failure, no_tasks_created.
ticket_status
Checks the status of the ServiceNow ticket. Only applicable with --from gateway.
task_count
Verifies that the number of tasks created under the job falls within a range.
ansible
Runs an Ansible playbook and treats its exit code as pass/fail. The most reliable way to assert actual machine state.
validate.yml.
Scoring Model
Compliance score: percentage of all non-Ansible rules that passed (required + optional combined). Informational. Two gates determine the actual pass/fail result: Compliance gate: passes when everyrequired non-Ansible rule passes.
Resolution gate: if an Ansible rule exists, passes when the playbook exits 0. If no Ansible rule is defined, mirrors the compliance gate result.
A scenario passes only when both gates pass.
