Login
Documentation
Login

OCX message. A JSON block in a forum post or a ticket change, fenced in Markdown: write it with a line

```json
, the JSON, and a line
```
; a reader also takes a bare
```
fence. Other text may come before or after it, and nodes ignore it; keep it short. An artifact holds one OCX message: a reader takes the first fenced block whose JSON has an ocx key, and ignores any other. Every message has "ocx": 1, a kind, and node: the one node it is for, named by its repository's server-code (40 hex digits, matched exactly). There are four kinds:

Every message but a run names the run it is about in its field run: the run's Fossil hash, in full, in hex. It is written where that run is, as a reply in its thread or as a change to its ticket. Several runs may share a thread or a ticket; each is answered on its own. A message never changes: an edit of one is ignored, so to change a request, stop it and send another.

Run. The OCX message of kind run: a request that a node run one program. Its fields, besides ocx, kind and node, are these, and those that Runner, Subscription and Limits add:

{"ocx": 1, "kind": "run", "node": "6cbe285e95a3a124176569ee9243f2a4e9ecdc20",
 "objective": "Build check-in abc123 for the board; it passes when the build succeeds.",
 "runner": "command", "command": ["make", "board"], "checkout": "abc123",
 "user": "builder", "session": false, "limits": {"wall": "30m"}}

Started and ended. The node's reports on a run, written where the run is.

{"ocx": 1, "kind": "ended", "node": "6cbe…", "run": "FULL-HASH-OF-THE-RUN", "outcome": "exited", "exit": 0}

A stop for a run that is already over does nothing. A run with a started and no ended is running; a run with an ended is over. So a run's OCX messages come in one of these orders, and no other: