Run log
A log of factory runs with a contour: what was run, who woke it, the start and the end, the proof or the reason; the actions start and finish write a run, the checks verify that a run is recorded whole and its end is explained.
About the package
The collection Runs and its contour: running → waiting for a person → done, failed or cancelled. One page is one run: what was run (action, automation, agent), who woke it (woke), when it started and ended, the proof (evidence) or the reason (message).
The page keys are the same ones the Shtukbase node writes into its own folder runs/: started, ended, status, ending, message, answer.said, wrote, retryOf. So there is one log, for the runs of the node and for the runs of agents and scripts without a node.
Actions: shtuk run runs start --title "..." --action /actions/<name> writes a run and prints its address; shtuk run runs finish <address> --status done --evidence "..." adds the end. With --status, start writes a run whole at once.
Norms: RUN-R01 says a run is recorded whole and does not hang (check run); RUN-R02 says the end of a run is explained (check evidence).
Boundary: measurements over the log (how many runs, how many failed, how many minutes) are not here; the runs lie in one folder, with no per-day folders.
Norms 2
| ID | Norm | Level | Mode | Enforcer |
|---|---|---|---|---|
| RUN-R01 | A run has a start, what was run and a state; a finished one has an end not earlier than the start; a run does not hang |
SHOULD | blocks | check |
| RUN-R02 | A done run has proof, a failed and a cancelled one have a reason |
SHOULD | blocks | check |
"Blocks": the enforcer stops a violation. "Observes": it only notes it. Level MUST means required; SHOULD means yes by default.
Actions 5
| Name | What it does | File | When |
|---|---|---|---|
| place | Add the Run kind to the placement map | bin/place.ts | after install after update |
| start | Record a new run (or a whole one at once) | actions/start.ts | shtuk run |
| finish | Add the end of a run: the state, the time, the proof or the reason | actions/finish.ts | shtuk run |
| run | A run is recorded whole and does not hang norm RUN-R01 | checks/r01_run.ts | check |
| evidence | A done run has proof, a failed one has a reason norm RUN-R02 | checks/r02_evidence.ts | check |
shtuk check runs the checks; shtuk run runs <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.
Pages 9
They go into the project at these paths.
- /
- Runs collection
- /norms/rules/runs/
- A run is recorded whole RUN-R01
- The end of a run is explained RUN-R02
- /runs/contours/
- Runs contour contour
- /runs/contours/runs/
- Cancelled contour phase
- Done contour phase
- Failed contour phase
- Running contour phase
- Waiting for a person contour phase
Package files 6
They go into .shtukbase/packages/runs/; actions run from there.