ShtukbaseStandard
package page→ /runs.md

pages/runs.md

76 lines, 3.1 KB. As a page.

  1. ---
  2. type: Collection
  3. title: "Runs"
  4. icon: "🏃"
  5. description: "The run log: what was run, who or what woke it, when it started and ended, how it ended and what confirms it."
  6. itemType: Run
  7. items: {mode: path, path: /runs, recursive: false}
  8. writeTo: /runs
  9. staleAfterHours: 24
  10. properties:
  11. status: {kind: phase, contour: /runs/contours/runs, label: "State"}
  12. action: {kind: relation, collection: /actions, label: "Action"}
  13. automation: {kind: relation, collection: /automations, label: "Automation"}
  14. agent: {kind: relation, collection: /agents, label: "Agent"}
  15. about: {kind: text, label: "About what (record, task)"}
  16. woke: {kind: text, label: "Who woke it (hand, clock, change ...)"}
  17. started: {kind: text, label: "Started (ISO)"}
  18. ended: {kind: text, label: "Ended (ISO)"}
  19. ending: {kind: text, label: "Ending word (finished, refused, stopped ...)"}
  20. evidence: {kind: text, label: "Confirmed by (commit, path, link)"}
  21. message: {kind: text, label: "Why it failed"}
  22. wrote: {kind: number, label: "How many pages it changed"}
  23. retryOf: {kind: text, label: "Retry of run"}
  24. views:
  25. - id: runs--table
  26. name: All runs
  27. layout: table
  28. fields: {}
  29. sorting:
  30. - {propertyId: started, direction: descending}
  31. properties:
  32. - {name: title, visible: true, width: 320}
  33. - {name: status, visible: true}
  34. - {name: action, visible: true}
  35. - {name: automation, visible: true}
  36. - {name: started, visible: true}
  37. - {name: evidence, visible: true}
  38. - id: runs--board
  39. name: By state
  40. layout: board
  41. fields: {}
  42. board:
  43. preview: page-content
  44. cardSize: small
  45. wrap: true
  46. grouping:
  47. by: status
  48. colorBy: status
  49. properties:
  50. - {name: title, visible: true}
  51. - {name: started, visible: true}
  52. ---
  53. One run is one page. It is written when the run starts and completed once when it ends. It is written by whoever started the run: an agent, a script, an automation or the Shtukbase node (it writes such pages itself).
  54. The run header:
  55. ```yaml
  56. type: Run
  57. title: "Nightly check"
  58. action: /actions/nightly-check # what was run (or automation, or agent)
  59. automation: /automations/nightly # who woke it, if an automation
  60. woke: clock # hand, clock, change, phase, sensor ...
  61. started: 2026-11-28T03:00:00Z
  62. status: done # running, waiting, done, failed, cancelled
  63. ended: 2026-11-28T03:04:12Z
  64. evidence: ["commit 1a2b3c4", /work/tasks/t-12.md]
  65. ```
  66. A finished run carries proof: a commit, a file path, a link, an output line. A failed and a cancelled one carry the reason in `message`. The states are in the [runs contour](/runs/contours/runs.md).
  67. To record a run: `shtuk run runs start --title "..." --action /actions/<name>` (prints the page address), then `shtuk run runs finish <address> --status done --evidence "..."`.
  68. `staleAfterHours` in the header of this page is the number of hours after which a run in the state "Running" counts as hung.
  69. Norms: [RUN-R01](/norms/rules/runs/RUN-R01.md) says a run is recorded whole; [RUN-R02](/norms/rules/runs/RUN-R02.md) says the end of a run is explained.