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.
| Status | Exit | Meaning |
|---|---|---|
running | 1 | The Runs haven't finished: unsnag wait gave up at its --timeout, or the Report is still being run. |
incomplete | 1 | The Report budget ran out before every Run started; the Runs that finished are kept. |
error | 1 | Unsnag couldn't complete the Report, such as a Scenario failing verify; error in report.json says why. |
ok | 0 | The Runs finished and no gate tripped. |
inconclusive | 1 | More than 20% of the Runs errored, so the results can't be trusted. |
regressed | 1 | A row or headline rate regressed against the Baseline (gate: { regressed: true }, the default). |
new_finding | 1 | A new Finding with impact blocks appeared (gate: { new_finding: true }). |
success_below | 1 | The 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.
| Outcome | Meaning |
|---|---|
pass | Every Check passed. |
fail | A Check failed, or the Run hit its time limit or budget after the Agent called the Target CLI; reason says which. |
error | Something 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.
| Status | Meaning |
|---|---|
verified | The Checks fail on an untouched environment, pass after the Reference Solution, and reject every wrong answer. |
failed | The 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_solution | The Scenario has no solution, so it can't be verified; unsnag run runs it with a warning. |
Draft
The status of unsnag draft.
| Status | Exit | Meaning |
|---|---|---|
ok | 0 | The drafter finished its rounds and at least one draft was written. |
incomplete | 1 | The draft budget ran out; the drafts that already passed are kept. |
no_drafts | 1 | No draft passed, so nothing was written. |
cancelled | 1 | Drafting 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).
| Status | Meaning |
|---|---|
regressed | The pass rate dropped, and the drop passes Fisher's exact test after Benjamini–Hochberg correction at q = 0.10. |
fixed | The pass rate rose, and the rise passes the same test. |
no clear change | The difference doesn't pass the test; the row shows the smallest drop it could have detected. |
edited | The Scenario's content changed since the Baseline, so it isn't compared. |
Each Finding, and each Baseline Finding no longer found, against the Baseline.
| Status | Meaning |
|---|---|
new | No Baseline Finding shares a group key with it (or was linked to it). |
open | It matches a Baseline Finding, and is shown as open since the Target CLI version (else the Report) where it was first seen. |
resolved | A Baseline Finding no longer found: every Cell it hit was rerun and it fired 0 times. |
not retested | A 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.