Skip to content

checks

The checks, and the report they add up to.

Each check is one property the platform requires of the artefact: the configuration loads and is complete, the image resolves, the container runs to completion under confinement, the document it wrote is well-formed and consistent with what the configuration declares, two runs agree, and the output matches what the author recorded. A required check that fails makes the report fail; a warning is reported and does not.

The first run's peak memory is reported beside the memory claimed for the fixture, with a warning when it leaves less headroom than the platform wants.

CheckResult dataclass

One property, and whether the artefact has it.

status property

PASS, FAIL or WARN.

Report dataclass

The outcome of a conformance run.

ok property

Every required check passed.

add(name, passed, detail, *, required=True)

Record a check and return whether it passed.

to_dict()

Return a JSON-ready view of the report.

load_config(path)

Read a configuration file and validate it against the model.

verify(*, image, config, runner, duration_seconds=300, seed=0, timeout_seconds=900, expected=None, record=False, pull=False, upstream_events=None, keep=None, config_only=False, tolerance=1e-06)

Check an image against a configuration.

Parameters:

Name Type Description Default
image str

The image reference to run.

required
config str | Path

The configuration file the image is registered with.

required
runner Runner

The container runtime, normally a :class:DockerRunner.

required
duration_seconds int

Length of the synthetic recording.

300
seed int

Makes the recording reproducible.

0
timeout_seconds float

Wall-clock ceiling for one run of the fixture.

900
expected str | Path | None

An events document recorded earlier; the run must match it.

None
record bool

Write the first run's document to expected instead of comparing, so a later run has something to match.

False
pull bool

Pull the image before inspecting it.

False
upstream_events str | Path | None

An events document to hand a downstream analysis, instead of a synthesised one.

None
keep str | Path | None

Keep the fixture in this directory instead of a temporary one.

None
config_only bool

Stop after the configuration check; no container runs.

False
tolerance float

How far a probability or value may drift from the recorded document; labels, times and channels must match exactly.

1e-06

Returns:

Type Description
Report

The report. report.ok is the verdict.