Nothing leaves silently
Every workpiece that leaves a station's input/ ends up in exactly one of two places: output/, finished, or failed/, with the reason. A workpiece that disappears, or that sits in input/ failing on every run with no error anywhere, is a failure nobody can see.
failed is for work that was tried
failed/ holds work the station tried and couldn't finish: an unreadable file, a rejected request, an answer that doesn't fit its schema. The workpiece goes there with its error, so someone can read why, fix the cause and send it back to input/.
Two things look like failures and aren't:
- Work that is waiting. A workpiece blocked on a person (an approval, a missing document) hasn't failed. It is waiting. Give the waiting its own station, so the state is plain to see and the next station doesn't get it too early.
- A problem the source has to fix. If an invoice comes in without a tax number, tell the sender. Don't leave it in
failed/, where only the line's owner looks.
Skipped work is counted
A station that deliberately leaves a workpiece alone (already processed, out of scope) says so in its run report, with a count and the reasons. A skip that nobody can see looks the same as work that went missing.
One error, two readers
The error comes as two files with different jobs. error.json keeps every field of the error, for tools that group and retry failures. error.txt is the short version a person reads with cat.
Related
- Bins: the five bins and what each one means
- Find out why a workpiece failed, and retry it: reading the error files and sending work back