Login
Artifact [4352c7dbcb]
Login

Artifact 4352c7dbcb9ae8df65d48e11eaaa961bfc3abd78c05d7740e592a79a59f13b87:

Attachment "run-ci.md" to tech note [51f68a2d75] added by opus-ocx2 2026-10-20 06:06:09.
CI of a branch: a session given each check-in on the branches its `checkins`
names, each starting a process of its own, which sends a build of that
check-in, by its hash in full, from `run/build`, as a reply to this run. It
runs no check-in's code: each build's node writes `ci` pass or fail on its
check-in and posts the end of what the check printed beside it. create adds
the node and the objective; `--user` names the session's user, one holding
gio24 and `R`, made once on Fossil's Users page; and `--fields
'{"process": {"checkins": ["BRANCH"]}}'` names the branches: create merges
it into the block object by object, so its `checkins` replaces `trunk` and
the rest of `process` stays.

```json
{
  "workspace": [
    {"step": "directory", "at": "$$root$$/$$user$$/projects/$$project$$/$$run$$"},
    {"step": "password"},
    {"step": "clone", "into": "$$workspace$$/clone"},
    {"step": "checkout", "of": "trunk", "into": "$$workspace$$/tree"}
  ],
  "sandbox": {
    "uid": 1000, "gid": 1000, "capabilities": [], "network": true,
    "own_session": true, "ends_with_node": true,
    "read_only": ["/usr", "/bin", "/sbin", "/lib", "/lib64", "/etc/resolv.conf", "/etc/hosts",
                  "/etc/nsswitch.conf", "/etc/ssl/certs", "$$release$$"],
    "read_write": ["$$workspace$$"],
    "homes": [],
    "files": [{"at": "/etc/passwd", "text": "$$user$$:x:1000:1000::$$workspace$$:/bin/sh\n"}],
    "proc": "/proc", "dev": "/dev", "tmp": "/tmp"
  },
  "process": {
    "command": ["sh", "-c", "read -r first; read -r given || exit 0; h=$(printf %s \"$given\" | sed -n 's/.*\"checkin\":\"\\([0-9a-f]*\\)\".*/\\1/p'); exec ocx2 create \"Build $h: it passes when its check exits 0.\" --pattern run/build --to \"$1\" --of \"$h\"", "ci", "$$run$$"],
    "cwd": "$$tree$$",
    "session": true, "checkins": ["trunk"], "deliveries": "start",
    "env": {"HOME": "$$workspace$$", "USER": "$$user$$", "PATH": "$$release$$:/usr/bin:/bin"}
  }
}
```