11.9 Exit status, fail_on and pipelines
By default, [output].fail_on="never". The command can complete with exit code zero even when the scientific verdict is NOT READY. This design allows an analyst to receive the full report for a defective dataset. Automated pipelines need an explicit policy.
Three policies
fail_on |
Nonzero exit when | Suitable use |
|---|---|---|
never |
execution itself fails | Interactive review and report generation |
error |
one or more FAIL checks | Typical blocking data gate |
warning |
any FAIL or WARN check | Strict pipeline with pre-dispositioned warnings |
When triggered, the command returns data error code 7 after writing outputs and names the failure/warning counts and summary path. An execution error such as a missing dataset is different from a QC verdict failure.
Beginner pipeline pattern
- Run QC to a fresh directory.
- Preserve outputs even if the process returns 7.
- Read
qc_summary.jsonfor verdict/counts. - Publish the report as a pipeline artifact.
- Block downstream modeling according to the reviewed policy.
Do not simply delete outputs from failed jobs: those files explain why the gate stopped.
Severity and pipeline interaction
fail_on="warning" makes every warned check operationally blocking, but individual severities can be configured. Review severity before enabling the strict gate; otherwise expected predose times or rare categories may halt the pipeline without a documented governance decision.
Common mistakes
- Assuming exit zero means READY under the default policy.
- Discarding reports when exit code 7 occurs.
- Enabling warning-level failure before reviewing expected warnings.
- Treating missing-file errors and data-verdict failures identically.
Checklist
- Choose and document
fail_onfor each environment. - Preserve output artifacts on data-gate failure.
- Parse the JSON verdict as well as the process status.
- Prevent downstream analysis after the agreed blocking state.
Further reading
See exit codes and errors, statuses and report triage.