Skip to content
Unsnag

Statuses and exit codes

Unsnag exits 0 on success and 1 otherwise. A command that completes puts the reason in its result's status; one that fails puts it in error.code (see errors).

Report

A Report's status in report.json, and the result of unsnag run, unsnag wait, unsnag analyze and unsnag report. Once the Runs finish, the gate decides it; incomplete and error are never overwritten by the gate.

StatusExitMeaning
running1The Runs haven't finished: unsnag wait gave up at its --timeout, or the Report is still being run.
incomplete1The Report budget ran out before every Run started; the Runs that finished are kept.
error1Unsnag couldn't complete the Report, such as a Scenario failing verify; error in report.json says why.
ok0The Runs finished and no gate tripped.
inconclusive1More than 20% of the Runs errored, so the results can't be trusted.
regressed1A row or headline rate regressed against the Baseline (gate: { regressed: true }, the default).
new_finding1A new Finding with impact blocks appeared (gate: { new_finding: true }).
success_below1The success rate is below gate: { success_below: <fraction> }.

Run

A Run's outcome in its run.json and in the Report's index, with its reason.

OutcomeMeaning
passEvery Check passed.
failA Check failed, or the Run hit its time limit or budget after the Agent called the Target CLI; reason says which.
errorSomething outside the Target CLI and the Agent broke (infrastructure, a broken Check, a Mock gap, contamination, a limit hit before the first Target CLI call); errored Runs aren't counted.

Verify

Each Scenario's status from unsnag scenarios verify (which exits 1 when one failed) and in unsnag scenarios.

StatusMeaning
verifiedThe Checks fail on an untouched environment, pass after the Reference Solution, and reject every wrong answer.
failedThe leak lint, the vacuity pass, the solvability pass (its Checks, or a Reference Solution that never uses the Target CLI) or a wrong answer failed; the reason says which.
no_solutionThe Scenario has no solution, so it can't be verified; unsnag run runs it with a warning.

Draft

The status of unsnag draft.

StatusExitMeaning
ok0The drafter finished its rounds and at least one draft was written.
incomplete1The draft budget ran out; the drafts that already passed are kept.
no_drafts1No draft passed, so nothing was written.
cancelled1Drafting was interrupted (Ctrl-C, SIGINT or SIGTERM); the drafts that had already passed are kept.

Comparison

Each row of the comparison with the Baseline (Scenario × Context Condition, and the headline rates).

StatusMeaning
regressedThe pass rate dropped, and the drop passes Fisher's exact test after Benjamini–Hochberg correction at q = 0.10.
fixedThe pass rate rose, and the rise passes the same test.
no clear changeThe difference doesn't pass the test; the row shows the smallest drop it could have detected.
editedThe Scenario's content changed since the Baseline, so it isn't compared.

Each Finding, and each Baseline Finding no longer found, against the Baseline.

StatusMeaning
newNo Baseline Finding shares a group key with it (or was linked to it).
openIt matches a Baseline Finding, and is shown as open since the Target CLI version (else the Report) where it was first seen.
resolvedA Baseline Finding no longer found: every Cell it hit was rerun and it fired 0 times.
not retestedA Baseline Finding no longer found, but not every Cell it hit was rerun.

Validate

unsnag validate completes with status: invalid_config and every error (exit 1) when the Benchmark or a Scenario is invalid.