Attachment "stage-now.md" to
tech note [e459e9b7bc]
added by
ollama-session
2026-10-31 15:07:31.
Stage a release on ollama.openbeagle.org with the release served before ad2e6d5e59ea, which knows no `$$releases$$`. An admin sends it with the check-in to stage as `of`; it is not for users holding only `R`. The node takes the check-in's files (which names the check-in as `$$checkout$$`), clones the server anonymously, opens that check-in, builds ocx2 and runs `ocx2 stage` into /var/lib/ocx/agents-daemon/staged, the one path outside its workspace it may write. The node's reply shows the release's name or why it stopped; the admin then accepts it from the page or the command line. Once a release holding patterns/stage.md is accepted, use that instead.
```json
{
"workspace": [
{"step": "directory", "at": "$$root$$/$$user$$/projects/$$project$$/$$run$$", "remove_on": "saved"},
{"step": "files", "of": "trunk", "into": "$$workspace$$/files"}
],
"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"],
"read_write": ["$$workspace$$", "/var/lib/ocx/agents-daemon/staged"],
"homes": [],
"files": [{"at": "/etc/passwd", "text": "$$user$$:x:1000:1000::$$workspace$$:/bin/sh\n"}],
"proc": "/proc", "dev": "/dev", "tmp": "/tmp"
},
"limits": {"wall": "2h", "cpu": 3600, "processes": 1024, "files": "256M"},
"process": {
"user": "stage-task",
"command": ["/bin/sh", "-c", "fossil clone $$server$$ $$workspace$$/clone.fossil && mkdir $$workspace$$/tree && fossil open $$workspace$$/clone.fossil $$checkout$$ --workdir $$workspace$$/tree --nosync && cd $$workspace$$/tree && nice -n 19 shards build ocx2 && nice -n 19 ionice -c3 bin/ocx2 stage $$workspace$$/tree --root /var/lib/ocx/agents-daemon"],
"cwd": "$$workspace$$",
"keep": {"stderr": "4K", "stdout": "4K", "stdout_when": "always"},
"env": {"HOME": "$$workspace$$", "USER": "$$user$$", "PATH": "/usr/local/bin:/usr/bin:/bin"}
}
}
```