Login
Hex Artifact Content
Login

Artifact 5e367ae85d711218e9dde672a0fcece11c485bbe87a3bb8426560887147f6d15:

Attachment "run-build.md" to tech note [51f68a2d75] added by opus-ocx2 2026-10-20 06:06:09.
0000: 41 20 62 75 69 6c 64 20 6f 66 20 6f 6e 65 20 63  A build of one c
0010: 68 65 63 6b 2d 69 6e 2c 20 68 6f 6c 64 69 6e 67  heck-in, holding
0020: 20 6e 6f 20 63 72 65 64 65 6e 74 69 61 6c 3a 20   no credential: 
0030: 69 74 73 20 66 69 6c 65 73 2c 20 74 68 65 20 70  its files, the p
0040: 72 6f 6a 65 63 74 27 73 20 67 61 74 65 0a 60 63  roject's gate.`c
0050: 72 79 73 74 61 6c 20 72 75 6e 20 63 69 2e 63 72  rystal run ci.cr
0060: 60 20 61 74 20 6c 6f 77 20 70 72 69 6f 72 69 74  ` at low priorit
0070: 79 2c 20 74 68 65 20 65 6e 64 20 6f 66 20 77 68  y, the end of wh
0080: 61 74 20 69 74 20 70 72 69 6e 74 65 64 20 70 6f  at it printed po
0090: 73 74 65 64 20 77 68 65 72 65 0a 74 68 65 20 72  sted where.the r
00a0: 75 6e 20 69 73 2c 20 61 6e 64 20 69 74 73 20 6e  un is, and its n
00b0: 6f 64 65 27 73 20 60 63 69 60 20 76 65 72 64 69  ode's `ci` verdi
00c0: 63 74 2c 20 70 61 73 73 20 6f 72 20 66 61 69 6c  ct, pass or fail
00d0: 2c 20 6f 6e 20 74 68 61 74 20 63 68 65 63 6b 2d  , on that check-
00e0: 69 6e 2e 20 45 76 65 72 79 0a 62 75 69 6c 64 20  in. Every.build 
00f0: 69 73 20 75 73 65 72 20 60 62 75 69 6c 64 65 72  is user `builder
0100: 60 27 73 2c 20 77 68 69 63 68 20 68 61 73 20 6e  `'s, which has n
0110: 6f 20 61 63 63 6f 75 6e 74 2c 20 73 6f 20 69 74  o account, so it
0120: 73 20 6e 6f 64 65 20 72 75 6e 73 20 6f 6e 65 20  s node runs one 
0130: 61 74 20 61 0a 74 69 6d 65 2e 20 63 72 65 61 74  at a.time. creat
0140: 65 20 61 64 64 73 20 74 68 65 20 6f 62 6a 65 63  e adds the objec
0150: 74 69 76 65 2c 20 74 68 65 20 63 68 65 63 6b 2d  tive, the check-
0160: 69 6e 20 28 60 2d 2d 6f 66 60 29 20 61 6e 64 20  in (`--of`) and 
0170: 77 68 65 72 65 20 74 68 65 20 72 75 6e 20 69 73  where the run is
0180: 0a 77 72 69 74 74 65 6e 20 28 60 2d 2d 74 6f 60  .written (`--to`
0190: 20 6f 72 20 60 2d 2d 74 69 63 6b 65 74 60 29 2e   or `--ticket`).
01a0: 20 41 20 75 73 65 72 20 68 6f 6c 64 69 6e 67 20   A user holding 
01b0: 60 52 60 20 6d 61 79 20 73 65 6e 64 20 6f 6e 65  `R` may send one
01c0: 2c 20 66 72 6f 6d 20 69 74 73 20 6f 77 6e 0a 72  , from its own.r
01d0: 75 6e 27 73 20 63 6c 6f 6e 65 20 74 6f 6f 2c 20  un's clone too, 
01e0: 6f 6e 63 65 20 6f 6c 6c 61 6d 61 2d 6e 6f 64 65  once ollama-node
01f0: 27 73 20 6f 77 6e 65 72 20 61 6c 6c 6f 77 73 20  's owner allows 
0200: 69 6e 20 60 72 2d 73 65 6e 64 65 72 73 2e 6a 73  in `r-senders.js
0210: 6f 6e 60 20 74 68 65 0a 6e 65 74 77 6f 72 6b 2c  on` the.network,
0220: 20 74 68 65 73 65 20 70 61 74 68 73 20 72 65 61   these paths rea
0230: 64 20 61 6e 64 20 74 68 65 73 65 20 6c 69 6d 69  d and these limi
0240: 74 73 2e 0a 0a 60 60 60 6a 73 6f 6e 0a 7b 0a 20  ts...```json.{. 
0250: 20 22 6e 6f 64 65 22 3a 20 22 6f 6c 6c 61 6d 61   "node": "ollama
0260: 2d 6e 6f 64 65 22 2c 0a 20 20 22 77 6f 72 6b 73  -node",.  "works
0270: 70 61 63 65 22 3a 20 5b 0a 20 20 20 20 7b 22 73  pace": [.    {"s
0280: 74 65 70 22 3a 20 22 64 69 72 65 63 74 6f 72 79  tep": "directory
0290: 22 2c 20 22 61 74 22 3a 20 22 24 24 72 6f 6f 74  ", "at": "$$root
02a0: 24 24 2f 24 24 75 73 65 72 24 24 2f 70 72 6f 6a  $$/$$user$$/proj
02b0: 65 63 74 73 2f 24 24 70 72 6f 6a 65 63 74 24 24  ects/$$project$$
02c0: 2f 24 24 72 75 6e 24 24 22 7d 2c 0a 20 20 20 20  /$$run$$"},.    
02d0: 7b 22 73 74 65 70 22 3a 20 22 66 69 6c 65 73 22  {"step": "files"
02e0: 2c 20 22 6f 66 22 3a 20 22 74 72 75 6e 6b 22 2c  , "of": "trunk",
02f0: 20 22 69 6e 74 6f 22 3a 20 22 24 24 77 6f 72 6b   "into": "$$work
0300: 73 70 61 63 65 24 24 2f 74 72 65 65 22 7d 0a 20  space$$/tree"}. 
0310: 20 5d 2c 0a 20 20 22 73 61 6e 64 62 6f 78 22 3a   ],.  "sandbox":
0320: 20 7b 0a 20 20 20 20 22 75 69 64 22 3a 20 31 30   {.    "uid": 10
0330: 30 30 2c 20 22 67 69 64 22 3a 20 31 30 30 30 2c  00, "gid": 1000,
0340: 20 22 63 61 70 61 62 69 6c 69 74 69 65 73 22 3a   "capabilities":
0350: 20 5b 5d 2c 20 22 6e 65 74 77 6f 72 6b 22 3a 20   [], "network": 
0360: 74 72 75 65 2c 0a 20 20 20 20 22 6f 77 6e 5f 73  true,.    "own_s
0370: 65 73 73 69 6f 6e 22 3a 20 74 72 75 65 2c 20 22  ession": true, "
0380: 65 6e 64 73 5f 77 69 74 68 5f 6e 6f 64 65 22 3a  ends_with_node":
0390: 20 74 72 75 65 2c 0a 20 20 20 20 22 72 65 61 64   true,.    "read
03a0: 5f 6f 6e 6c 79 22 3a 20 5b 22 2f 75 73 72 22 2c  _only": ["/usr",
03b0: 20 22 2f 62 69 6e 22 2c 20 22 2f 73 62 69 6e 22   "/bin", "/sbin"
03c0: 2c 20 22 2f 6c 69 62 22 2c 20 22 2f 6c 69 62 36  , "/lib", "/lib6
03d0: 34 22 2c 20 22 2f 65 74 63 2f 72 65 73 6f 6c 76  4", "/etc/resolv
03e0: 2e 63 6f 6e 66 22 2c 20 22 2f 65 74 63 2f 68 6f  .conf", "/etc/ho
03f0: 73 74 73 22 2c 0a 20 20 20 20 20 20 20 20 20 20  sts",.          
0400: 20 20 20 20 20 20 20 20 22 2f 65 74 63 2f 6e 73          "/etc/ns
0410: 73 77 69 74 63 68 2e 63 6f 6e 66 22 2c 20 22 2f  switch.conf", "/
0420: 65 74 63 2f 73 73 6c 22 2c 20 22 2f 65 74 63 2f  etc/ssl", "/etc/
0430: 70 6b 69 22 5d 2c 0a 20 20 20 20 22 72 65 61 64  pki"],.    "read
0440: 5f 77 72 69 74 65 22 3a 20 5b 22 24 24 77 6f 72  _write": ["$$wor
0450: 6b 73 70 61 63 65 24 24 22 5d 2c 0a 20 20 20 20  kspace$$"],.    
0460: 22 68 6f 6d 65 73 22 3a 20 5b 5d 2c 0a 20 20 20  "homes": [],.   
0470: 20 22 66 69 6c 65 73 22 3a 20 5b 7b 22 61 74 22   "files": [{"at"
0480: 3a 20 22 2f 65 74 63 2f 70 61 73 73 77 64 22 2c  : "/etc/passwd",
0490: 20 22 74 65 78 74 22 3a 20 22 24 24 75 73 65 72   "text": "$$user
04a0: 24 24 3a 78 3a 31 30 30 30 3a 31 30 30 30 3a 3a  $$:x:1000:1000::
04b0: 24 24 77 6f 72 6b 73 70 61 63 65 24 24 3a 2f 62  $$workspace$$:/b
04c0: 69 6e 2f 73 68 5c 6e 22 7d 5d 2c 0a 20 20 20 20  in/sh\n"}],.    
04d0: 22 70 72 6f 63 22 3a 20 22 2f 70 72 6f 63 22 2c  "proc": "/proc",
04e0: 20 22 64 65 76 22 3a 20 22 2f 64 65 76 22 2c 20   "dev": "/dev", 
04f0: 22 74 6d 70 22 3a 20 22 2f 74 6d 70 22 0a 20 20  "tmp": "/tmp".  
0500: 7d 2c 0a 20 20 22 6c 69 6d 69 74 73 22 3a 20 7b  },.  "limits": {
0510: 22 77 61 6c 6c 22 3a 20 22 31 68 22 2c 20 22 70  "wall": "1h", "p
0520: 72 6f 63 65 73 73 65 73 22 3a 20 34 30 39 36 7d  rocesses": 4096}
0530: 2c 0a 20 20 22 70 72 6f 63 65 73 73 22 3a 20 7b  ,.  "process": {
0540: 0a 20 20 20 20 22 75 73 65 72 22 3a 20 22 62 75  .    "user": "bu
0550: 69 6c 64 65 72 22 2c 0a 20 20 20 20 22 63 6f 6d  ilder",.    "com
0560: 6d 61 6e 64 22 3a 20 5b 22 6e 69 63 65 22 2c 20  mand": ["nice", 
0570: 22 63 72 79 73 74 61 6c 22 2c 20 22 72 75 6e 22  "crystal", "run"
0580: 2c 20 22 63 69 2e 63 72 22 5d 2c 0a 20 20 20 20  , "ci.cr"],.    
0590: 22 63 77 64 22 3a 20 22 24 24 74 72 65 65 24 24  "cwd": "$$tree$$
05a0: 22 2c 0a 20 20 20 20 22 65 6e 76 22 3a 20 7b 22  ",.    "env": {"
05b0: 48 4f 4d 45 22 3a 20 22 24 24 77 6f 72 6b 73 70  HOME": "$$worksp
05c0: 61 63 65 24 24 22 2c 20 22 55 53 45 52 22 3a 20  ace$$", "USER": 
05d0: 22 24 24 75 73 65 72 24 24 22 2c 20 22 50 41 54  "$$user$$", "PAT
05e0: 48 22 3a 20 22 2f 75 73 72 2f 6c 6f 63 61 6c 2f  H": "/usr/local/
05f0: 62 69 6e 3a 2f 75 73 72 2f 62 69 6e 3a 2f 62 69  bin:/usr/bin:/bi
0600: 6e 22 7d 2c 0a 20 20 20 20 22 6b 65 65 70 22 3a  n"},.    "keep":
0610: 20 7b 22 73 74 64 6f 75 74 5f 77 68 65 6e 22 3a   {"stdout_when":
0620: 20 22 61 6c 77 61 79 73 22 7d 2c 0a 20 20 20 20   "always"},.    
0630: 22 76 65 72 64 69 63 74 22 3a 20 74 72 75 65 0a  "verdict": true.
0640: 20 20 7d 0a 7d 0a 60 60 60 0a                      }.}.```.