Documentation

12.26 fail-on, exit status and automation

--fail-on LEVEL controls which result makes qc-nm return a failing process status for automation. The documented levels are never, error, and warning. This policy is distinct from the report verdict and from whether corrections are generated.

Choose a gate deliberately

error is the usual strict defect gate: a FAIL causes the process to fail. warning is stricter because WARN and FAIL results can stop the pipeline. never records findings without using them to fail the command; it is useful while establishing a baseline or generating teaching evidence. The Chapter 12 example uses fail_on = "never" so the intentionally flawed input still produces a complete bundle.

nlmx qc-nm model.ctl --fail-on error -o qc_gate

Be explicit about whether the gate evaluates the original or effective after-correction state in the nlmx version being validated. Store the summary and checklist even when the command exits nonzero so reviewers can diagnose the cause.

Automation should retain evidence and route findings by severity

A useful pipeline pattern

Run a pinned executable with a version-controlled .qcn, write to a fresh output directory, archive the evidence regardless of exit status, and only then allow later stages. Use --overwrite only when the pipeline deliberately replaces a disposable directory; immutable run-specific directories are safer for audit.

Do not make qc-nm the sole release gate. Add compilation, target NONMEM execution, numerical acceptance tests, dataset checks, and independent scientific review. A static source checker is one layer in a defense-in-depth workflow.

Common mistakes

  • Using never in production and assuming failures will stop the pipeline.
  • Using warning before a team has agreed which warnings are actionable.
  • Discarding output when the process status is nonzero.
  • Allowing a corrected READY state to bypass numerical validation.

Checklist

  • Document the chosen failure level and rationale.
  • Pin nlmx, configuration, and NONMEM target version.
  • Preserve artifacts on success and failure.
  • Test the pipeline with deliberate WARN and FAIL fixtures.
  • Combine static QC with execution and numerical tests.

Further reading

See complete command index, output bundle, and validation boundary.