Documentation

39.2 The first five minutes: a safe triage

39.2 The first five minutes: a safe triage

What you will learn

  • Stop automation safely
  • Preserve the failed folder
  • Classify before changing anything

Prerequisites: Chapter 36 exit-code reference, Chapter 38 output completion, and the Chapter 39 overview.

This page describes nlmx 4.16.2. Troubleshooting must preserve the failed attempt: keep its exact command, working directory, log, resolved settings, input/model identities, partial outputs, and process exit code. Correct one causal condition at a time and compare the new evidence with the failed run. Never convert a nonzero exit into success in a wrapper, and never interpret exit 0 as scientific acceptance without the command-native verdict.

Use a five-step response: stop, preserve, classify, hypothesize, verify. Stop dependent steps so that a failed fit is not consumed by a VPC or report. Preserve the output folder as read-only evidence or copy it with hashes. Record the exit code before another command overwrites the shell variable. Classify the failure by stage and exit class. State one testable hypothesis. Make one controlled change, rerun into a new folder, and compare.

& nlmx fit models/run101.ctl --output results/run101_attempt01 --no-color
$nlmxCode = $LASTEXITCODE
"exit=$nlmxCode" | Write-Host
if ($nlmxCode -ne 0) {
    throw "nlmx failed; preserve results/run101_attempt01 before recovery"
}

Do not immediately add --overwrite, increase tolerances, remove a record, discard a subject, or launch many retries. Those actions can destroy evidence or change the estimand. A syntax error can be corrected directly; a data correction needs source verification; a model change needs scientific review; a numerical change needs a documented rationale and comparison.

Your initial incident note should contain: local date/time and timezone, executable path and version, exact command, working directory, exit code/class, final stage/message/hint, log path, output path, and whether the folder is partial. If PHI may be present, restrict access immediately and follow the site's incident/data-handling procedure.

Recovery is demonstrated when the causal condition is gone and all expected acceptance gates pass. A changed error is progress only if it follows the planned diagnosis. Exit 0 after a broad change is not proof that the original defect was corrected; compare counts, model identity, estimates, convergence/covariance status, warnings, and checksums.

Page checklist

  • Did you retain the exact exit code, stage, message, hint, log, and partial output?
  • Did you identify one causal layer before changing anything?
  • Is the recovery a new, traceable attempt with the same intended estimand?
  • Did you check command-native and scientific acceptance after process completion?

See the previous page, next page, and complete error reference.