Login
Artifact [8ea141cc52]
Login

Artifact 8ea141cc52df1fc08858015a132a9d04c0933a6ae03873b72744cf941bcbbd5b:

Attachment "run-bq2-build.md" to tech note [51f68a2d75] added by opus-ocx2 2026-10-20 06:06:09.
bq2's build of one check-in, as a job, holding no credential: its files; the
build's whole output kept as `job.log` in the run's workspace; on a failure,
the last 100 lines of each file the build wrote under its reports directory,
then the log's last 100 lines, posted where the run is. Every run is user
`bq2-build`'s, which has no account, so its node runs one at a time. It has no
limit: `ocx2 stop RUN` ends one. Each run builds `data/sysroot` afresh, until a
user's cache keeps it between runs. create adds the node and the objective;
`--of` names the check-in.

```json
{
  "workspace": [
    {"step": "directory", "at": "$$root$$/$$user$$/projects/$$project$$/$$run$$"},
    {"step": "files", "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", "/etc/pki"],
    "read_write": ["$$workspace$$"],
    "homes": [],
    "files": [{"at": "/etc/passwd", "text": "$$user$$:x:1000:1000::$$workspace$$:/bin/sh\n"}],
    "proc": "/proc", "dev": "/dev", "tmp": "/tmp"
  },
  "process": {
    "user": "bq2-build",
    "command": ["sh", "-c", "{ shards build && bin/sysroot-builder && bin/sysroot-runner; } > $$workspace$$/job.log 2>&1; s=$?; [ $s = 0 ] || { find data/sysroot/seed-rootfs/bq2-rootfs/workspace/sysroot-build-reports -type f -exec tail -v -n 100 {} +; tail -n 100 $$workspace$$/job.log; }; exit $s"],
    "cwd": "$$tree$$",
    "env": {"HOME": "$$workspace$$", "USER": "$$user$$", "PATH": "/usr/local/bin:/usr/bin:/bin"}
  }
}
```