Skip to main content

Workflow Spec Reference

This page is the complete manifest reference for the Kerrigan workflow schema currently accepted by kerrigan-runner-bridge and Fleet Manager.

Top-Level Shape​

metadata: {}
source: {}
setup: {}
teardown: {}
scheduling: {}
tasks: []

Only tasks is required. It must be a non-empty list.

metadata​

metadata:
name: core-ctest-smoke
labels:
suite: core
priority: nightly
FieldTypeRequiredDescription
namestringnoHuman-readable session name. Defaults to kerrigan-job.
labelsmapnoMetadata labels for reporting. These do not select devices.

source​

source:
repository: sima-neat/core
ref: refs/heads/develop
github:
run_url: https://github.com/sima-neat/core/actions/runs/123
bundle:
include:
- tests/**/*.py
exclude:
- tests/experimental/**
artifacts:
- name: ctest-runtime
url: https://example.com/ctest-runtime.tar.gz
sha256: "<sha256>"
extract: true
destination: .
vulcan_artifacts:
- env: stg
name: core
branch: develop
tag: latest
type: minimal
install_dir: /tmp/kerrigan-core
base_url: https://artifacts.example.com
force: false
skip_devkit_sync: true
timeout_sec: 900
FieldTypeRequiredDescription
repositorystringnoSource repository. Runner bridge fills this from GitHub Actions when available.
refstringnoSource ref or SHA. Runner bridge fills this from GitHub Actions when available.
githubmapnoGitHub Actions metadata such as run_url, run_id, run_attempt, workflow, and sha. Runner bridge fills these automatically in Actions.
bundle.includelist of stringsnoGlob patterns, relative to the repository root, for small files to inline into the session.
bundle.excludelist of stringsnoGlob patterns to exclude from bundled files.
artifactslistnoURL/file artifacts downloaded by the device agent before command execution.
vulcan_artifactslistnoNeat CICD Infrastructure (Vulcan) packages installed by the device agent before command execution.

source.artifacts[]​

FieldTypeRequiredDefaultDescription
namestringnoartifactLocal artifact name.
urlstringyesHTTP(S) or file:// URL.
sha256stringnoExpected SHA-256 checksum.
extractbooleannotrueExtract as a tarball when true.
destinationstringno.Workspace-relative destination. Absolute paths and .. are rejected.

source.vulcan_artifacts[]​

FieldTypeRequiredDefaultDescription
envstringyesNeat CICD Infrastructure environment, such as stg.
namestringyesNeat CICD Infrastructure package name.
branchstringyesPackage branch.
tagstringyesPackage tag, often latest or a git SHA.
typestringnoPassed to sima-cli neat install --type.
install_dirstringnoPassed to --install-dir.
base_urlstringnoPassed to --base-url.
forcebooleannofalseAdds --force.
skip_devkit_syncbooleannofalseSets NEAT_INSTALLER_SKIP_DEVKIT_SYNC=ON.
timeout_secintegerno900Install timeout.

Required Neat CICD Infrastructure package fields must be present and non-empty. force and skip_devkit_sync accept booleans or strings such as true, false, 1, and 0.

setup​

setup:
per_devkit:
- id: prepare-runtime
commands:
- export PATH="/opt/runtime/bin:$PATH"
- ./scripts/check-ready.sh
timeout_sec: 300
output_idle_timeout_sec: 60
failure_policy: fail_session

setup.per_devkit runs once on each selected DevKit before normal tasks run.

Each item supports the same command forms as task command:

  • argv
  • shell
  • commands
FieldTypeRequiredDefaultDescription
idstringyesSetup step ID.
argv / shell / commandscommandyesCommand to run.
envmapno{}Environment overrides.
cwdstringnotask workspaceCommand working directory.
timeout_secintegerno300Command timeout.
output_idle_timeout_secintegernoFail if no output appears for this many seconds. Must be >= 0.
failure_policystringnofail_sessionCurrently documented policy is fail_session.

teardown​

teardown:
per_devkit:
- id: cleanup-runtime
shell: rm -rf /tmp/kerrigan-*
timeout_sec: 120

teardown.per_devkit has the same item shape as setup.per_devkit. It runs after normal tasks reach terminal state and targets the DevKits used by the session.

scheduling​

scheduling:
strategy: spread
min_devkits: 0
max_devkits: 4
max_parallel: 4
fail_fast: false
pools:
- sdk-2-2-som
capabilities:
board: modalix
os_type: elxr
labels:
sdk: "2.2.0"
kerrigan.board: modalix
tags:
- 2.2.0-som-devkits
FieldTypeRequiredDefaultDescription
strategyenumnospreadOne of spread, pack, or serial.
min_devkitsintegerno0Minimum eligible DevKits before dispatch starts.
max_devkitsintegernoMaximum distinct DevKits the session may use. Must be >= 1 when set.
max_parallelintegernomax_devkits or 1Maximum concurrent task assignments. Coerced to at least 1.
fail_fastbooleannofalseCancel queued work after a test failure.
poolslist of stringsno[]Eligible pool IDs.
capabilitiesmapno{}Legacy exact-match device capabilities.
labelsmapno{}Exact-match resource labels.
tagslist of stringsno[]Shorthand tags; each tag also becomes tag.<name>: true.

strategy values:

  • spread: balance assignments across eligible DevKits.
  • pack: reuse already-selected DevKits before expanding.
  • serial: run at most one task at a time.

tasks[]​

Every task requires id. The default task type is command.

Common fields:

FieldTypeRequiredDefaultDescription
idstringyesUnique task ID.
typestringnocommandcommand, ctest, or pytest.
requirementsmapno{}Task-specific device requirements.
timeout_secintegerno900Task command timeout.
output_idle_timeout_secintegernoFail if no output appears for this many seconds. Must be >= 0.
retries.test_failureintegerno0Retries for task result failed.
retries.infra_failureintegerno0Retries for task result infra_failed.
artifacts.junitstringnoJUnit artifact pattern reserved for collection/reporting.
artifacts.includelist of stringsno[]Extra artifact include patterns reserved for collection/reporting.
dependencieslist of stringsno[]Task IDs that must pass first.
estimated_runtime_secintegernoScheduling hint and UI metadata.

Task IDs must be unique. Dependencies must refer to known task IDs. Cycles are rejected.

Command Tasks​

tasks:
- id: smoke-shell
type: command
command:
shell: ./scripts/smoke.sh
env:
MODE: smoke
cwd: runtime

Command payload forms:

command:
argv: ["python3", "-m", "pytest", "-q"]
command:
shell: ./run-tests.sh --quick
command:
commands:
- ./configure.sh
- ./run-tests.sh

commands are joined with && and executed through sh -c.

CTest Tasks​

tasks:
- id: ctest-core
type: ctest
test_dir: ctest-runtime/build/tests
selector: core_graph_smoke
args: ["--timeout", "120"]
env:
CTEST_OUTPUT_ON_FAILURE: "1"
cwd: .
FieldTypeRequiredDefaultDescription
test_dirstringnobuild/testsDirectory passed to ctest --test-dir.
selectorstringnoTest regex passed to ctest -R.
selectorslist of stringsnoExpands one manifest task into one task per selector.
argslist of stringsno[]Extra args appended to ctest.
envmapno{}Environment overrides.
cwdstringnotask workspaceCommand working directory.

When selectors is used, Kerrigan creates generated task IDs by appending a slugified selector to the original task ID, and each selector is wrapped as an exact CTest regex: ^selector$.

Pytest Tasks​

tasks:
- id: pytest-runtime
type: pytest
selector: tests/test_runtime.py::test_smoke
FieldTypeRequiredDescription
selectorstringyesPytest file, class, function, or node ID.

Pytest tasks run as:

pytest -q -s <selector>

requirements​

requirements:
pools:
- default
labels:
form_factor: som
tags:
- uart-debug
exclusive_target: true
board: modalix
os_type: elxr
FieldTypeDefaultDescription
poolslist of stringsscheduling.poolsTask-specific pool filter.
labelsmapinherited from schedulingTask-specific exact-match labels.
tagslist of stringsinherited from schedulingTask-specific tags.
exclusive_targetbooleantrueWhether this task requires an exclusive target lease.
any other keyscalarTreated as a legacy capability requirement.

Task labels and tags refine session-level labels and tags. For labels, task values override session values for the same key.

Assignment Environment​

Device-agent commands run with:

  • CI=true
  • SIMA_CLI_CHECK_FOR_UPDATE=0
  • KERRIGAN_SESSION_ID
  • KERRIGAN_TASK_ID
  • KERRIGAN_ATTEMPT
  • KERRIGAN_TARGET_ID

The agent closes stdin for commands, so workflow commands must not depend on interactive prompts.

Session Status Values​

Session status can be:

  • running
  • passed
  • failed
  • infra_failed
  • scheduler_failed
  • cancelled

See Session Dashboard for how these states appear in the operator UI.