assemblyline.sh

Guides

Each guide covers one job, using the factory template and lib-factory. For why the rules are what they are, see the method. For exact signatures, see the lib-factory README.

Build a line

GuideThe job
Write a stationThe handler's folder, its config schema, what execute receives and returns
Write a station that processes workpiecesRun your code on each workpiece, report outcomes, create workpieces at a line head
Connect stations with a conveyorPull workpieces from the previous station, a sub-bin, or several bins
Start stationsRun stations by hand, on a schedule, or when work arrives
Hold a workpiece until someone decidesA waiting station and the lane that releases approved work

Run a factory

GuideThe job
Lay out a factory repo and push its linesLine and station files, and pushing them with al-orc
Run a factory sessionStart, stop and keep a session running; how it finds stations
Give stations their credentialsSecrets in .env, never in a station file; one client per outside system
Where a station keeps its dataWorkpiece files, run files, scratch, and what goes in the run's output

Report

GuideThe job
Report a runAttach the run report and supporting documents, and read them
Write reports from templatesreport.md and other templates next to the station's handler, rendered with renderLocal

When things go wrong

GuideThe job
Throw errors from a stationWhich errors fail a run, how it retries, and why a station must be safe to rerun
Run and test a stationRun it locally, and test it in Jest
Find out why a workpiece failed, and retry itRead the error, group failures, and send work back
Debug a runFrom the run's status to the session log to the usual causes
Redo work through the lineSend finished workpieces back through a fixed station

Recipes

GuideThe job
Call a command-line tool from a stationWrap a tool so its failures land on the right workpiece
Read, render and split PDFsText layer, page images for a model, split and rotate