assemblyline.sh

Check apart from fix

A station that checks records never changes them. Changing them is the job of a different station, which acts only on what the check found. Between the two there is a record of what was wrong and a decision about what to change.

Checking stationFixing station
AsksIs this right?Given the findings, what should change?
WritesFindings and a verdict, in the workpiece and the run reportThe change, and a record of what it changed
Changes the records it readsNeverOnly what a finding names
Safe to rerunAlwaysOnly because it looks before it writes

Why keep them apart

  • Checking is always safe. Run it on anything, at any time, as often as you like. A line that rechecks every vendor balance on every run costs reads, nothing more.
  • Every change is decided. A person, or a rule someone wrote down, chooses which findings get fixed.
  • Each side leaves its own record. The check's report shows what was found; the fix's report shows what changed and what the record was before.
  • The loop closes itself. Check, fix, check again: the second check shows whether the fix worked.

The station that does both

IN3  check and fix vendor balances
  1. compare the opening balance with last month's closing balance
  2. if different, overwrite the opening balance      ← the problem
  3. compare the closing balance with the bank
  4. if different, overwrite the closing balance      ← the problem
  • The balance as it was before is gone, so nobody can see what was wrong.
  • Running the check again fixes again.
  • Nobody gets a chance to say "not that one".
  • The check is no longer safe to run, so people stop running it.

Who decides a fix

Decided byHow the line does it
A personThe checking station files each proposal in a sub-bin such as output/needs_approval/. A person approves one by moving it to output/approved/. The fixing station pulls only from approved/.
A written ruleA note lists the kinds of change that may be made without asking. The fixing station applies those and raises every other finding for a person.
A person, in another systemThe checking line files one issue per finding. The fixing line takes the open issues, makes the change, and marks the ones it can't do as needing a person.

Start with a person. A new checking station reports and proposes; it is given the right to change things once its findings have proved right. See Three verdicts for letting a new check report before it routes.

A fixing station

  • Acts only on named findings, and its record points back to the check that raised them.
  • Reads before it writes. If the record changed since the check read it, it skips it and says so.
  • Reads back after it writes, to confirm the change landed.
  • Hands the work back to the check. The next check confirms the fix.

This rule is about records that already exist. A station checking its own work before it finishes, such as confirming the page ranges it found before it cuts a PDF, is part of doing its one job.