Docs / Concepts

Core concepts

Seven nouns cover almost everything in Invariant: system, scenario, suite, run, metric, baseline and verdict.

Design preview. These docs describe how Invariant is being built. Commands, output and limits are illustrative until release, and stage tags mark what ships first. See the roadmap.

System

The software under test: an autonomy stack, a perception model, a manipulation policy, or all three. Invariant sees it as a container image plus an adapter that knows how to start it, feed it inputs and collect outputs. Each commit you test resolves to an image digest, so a run always points at exactly the code that ran.

Scenario

One repeatable situation to test. There are three kinds:

KindWhat it isGood forStatus
replayA time slice of a recorded log, played into your stackLocalization, perception, regression tests from field failuresMVP
simA world in a simulator, plus parameters such as poses, lighting, sensor noise and seedClosed-loop navigation, manipulation, rare and dangerous casesNext
rigA procedure on a hardware-in-the-loop bench or test robotTiming, drivers, compute load, release sign-offLater

Scenarios are versioned. Changing a world file, a log slice or a parameter range creates a new scenario version, and results are only compared across the same version.

Suite

A named set of scenarios, metrics, run counts and a gate. Most teams have four that share one spec:

SuiteWhen it runsTypical sizeGoal
laptopBefore you push3–5 scenarios, minutesCatch obvious breaks fast
prEvery pull request10–30 scenarios, under 15 minBlock real regressions
nightlyEvery night on main50–200 scenariosFind slow drift, find the first bad commit
releaseBefore shippingEverything, plus rigsEvidence for a release decision

Run

One execution of one system version on one scenario with one seed. A run produces an MCAP file, metric values, logs and a run record: image digest, scenario version, seed, simulator version, adapter version, runner type, hardware, start and end time. The run record is what makes a result reproducible and auditable.

Every run ends in exactly one state: completed, failed (your software crashed or timed out) or error (the infrastructure failed: no GPU, image pull failed, simulator didn't start). Infrastructure errors are retried. They don't count as a regression, and a suite with unresolved errors is reported as incomplete rather than passed.

Metric

A number computed from a run, with a unit, a direction (lower or higher is better) and a tolerance: the smallest change you care about. Invariant ships metric packs for localization, navigation, perception and manipulation, and you can write your own in Python. See metrics in the spec.

Baseline

The version you compare against, usually main or the last release. If the baseline was already run on the same scenarios and seeds (for example by last night's suite), those runs are reused instead of re-run.

Verdict

The answer for one scenario and metric, from paired runs of the candidate and the baseline:

VerdictMeaning
worseThe whole confidence interval is past the tolerance on the bad side
betterThe whole interval is past the tolerance on the good side
unchangedThe whole interval is inside the tolerance
inconclusiveThe interval crosses a tolerance edge: not enough evidence yet

A scenario can also be marked flaky if the same version disagrees with itself too often. A suite's gate decides which verdicts block a merge. Details: Verdicts and statistics.