assemblyline.sh

Three verdicts

A checking station gives each workpiece one of three verdicts, not pass or fail:

VerdictMeansWho actsAt acme's IN1
verifiedEvery check passed, or every failure is explainedNobody: the work goes onThe invoice is complete and adds up
needs_correctionWhat's wrong is known, and so is the fixWhoever owns the fixThe total is 1,000 but the lines add up to 1,180: the vendor has to reissue the invoice
needs_investigationSomething is off, and nobody can say what yetA person looksThe vendor's tax number fails its check digit: misread from the page, or wrong on the invoice?

Why not pass and fail

"Fail" puts two different situations under one word: "we know the fix" and "someone has to look". Splitting them lets you:

  • send each to the right place. A correction goes to whoever owns the fix; an investigation goes to a person with time to look.
  • spend people's time where it's needed. Nobody has to re-diagnose a correction.
  • measure the line. A rising correction rate points at a source; a rising investigation rate points at checks that can't explain what they see.

Can't tell is not a pass

A check that can't run, because the input it needs is missing, hasn't passed. The missing input is a finding of its own, raised by the check that asks whether it's there. When nobody can say what a finding means, the verdict is needs_investigation.

From findings to a verdict

Each check that fires gives a finding, and each finding has a weight:

WeightMeans
holdThe work shouldn't go on as it is. Each hold names the verdict it calls for.
warnGo on, but someone should know
infoWorth recording; nothing to do
  1. No holds: verified. Warnings go into the report.
  2. Any hold that calls for investigation: needs_investigation. It outranks correction: find out whether it's a misread before you ask the sender to reissue.
  3. Otherwise: needs_correction.

When the rules settle it, code computes the verdict. When failures need interpreting, the judgment gives the verdict from the facts (see Code first, the model for judgment). A failure the judgment explains, such as a rounding difference, leaves the verdict verified: explained is not the same as fixable.

A verdict is a finished check, not a failure

A workpiece with any verdict goes to output/. failed/ is for a check that couldn't finish: the source system didn't answer, or the input couldn't be read. See Nothing leaves silently.

The verdict decides where the work goes next:

  • verified goes on down the line. Only a verified item is marked as reviewed in the source system.
  • needs_correction and needs_investigation go to a sub-bin of their own in output/, so each next station or person takes only its own kind. See Bins. Work that waits on a person gets its own station.

Let a new check report before it routes

When a check is new, record its verdict, send every workpiece on as before, and read the reports. Route on the verdict once its holds prove right. A check that holds work by mistake costs more than one that only reports for a few weeks.