Write down the worker protocol

This commit is contained in:
2026-09-27 03:07:22 +00:00
parent 410a601948
commit c139eec422
+15
View File
@@ -0,0 +1,15 @@
# Runner protocol
The control plane hands a worker a job and reads its results back over one
newline-delimited JSON stream.
| Message | Direction | Meaning |
|-----------|------------------|------------------------------------------|
| `hello` | worker -> server | worker id, browser version, screen size |
| `job` | server -> worker | scenario, site URL, deadline |
| `step` | worker -> server | one action and its outcome |
| `shot` | worker -> server | screenshot reference |
| `done` | worker -> server | verdict and the reason for it |
A worker that sends no message for 90 seconds is considered lost and its job is
handed to another worker.