aienos.com
Source of www.aienos.com, served from my own hardware
Brought by drakestapleton
aienos.com / om / site / engineer.om
| 1 | note About the engineer (/engineer/): drakestapleton.com, merged into aienos.com on 2026-10-26. |
| 2 | note Source: public/data/engineer.json, read afresh for every page (aien-dev/aienos.com main c81942e). |
| 3 | note Each page: path, old[], name, title, description, kind, body_html. body_html is repository-authored |
| 4 | note HTML (the ported drakestapleton.com bodies), emitted unescaped like hand-written public pages. |
| 5 | note Two markers in a body are filled from facts.json: <!--engineer:live--> and <!--engineer:verdict-->. |
| 6 | note Every load replaces the JSON state, so the body is emitted in spans: emit up to a marker, load |
| 7 | note facts.json and render its block, reload engineer.json, find the page again, continue after it. |
| 8 | note Oracle: aienos.com crates/site-builder/src/components/engineer.rs (render, verify). |
| 9 | note No directive here: the composed site unit starts with om2. Requires runtime.om and json.om before it. |
| 10 | |
| 11 | text egfile "public/data/engineer.json" |
| 12 | text egfacts "facts.json" |
| 13 | text egpages "pages" |
| 14 | text egpath "path" |
| 15 | text egname "name" |
| 16 | text egdesc "description" |
| 17 | text egkind "kind" |
| 18 | text egbody "body_html" |
| 19 | text eghome "home" |
| 20 | text eginfo "infographic" |
| 21 | text egroot "/engineer/" |
| 22 | text eglive "<!--engineer:live-->" |
| 23 | text egverd "<!--engineer:verdict-->" |
| 24 | text egcss "<link rel=\"stylesheet\" href=\"/assets/engineer.css\">" |
| 25 | text egmobcss "<link rel=\"stylesheet\" href=\"/assets/engineer-mobile.css\">" |
| 26 | text egigcss "<link rel=\"stylesheet\" href=\"/assets/engineer-infographic.css\">" |
| 27 | text eguni "<script defer src=\"/js/engineer-universe.js\"></script>" |
| 28 | text egopen "<div class=\"engineer\">" |
| 29 | text egclose "</div>" |
| 30 | text egback "<p class=\"engineer-back\"><a href=\"/engineer/\">About the engineer</a></p>" |
| 31 | text egixa "<section class=\"engineer-index\" id=\"index\" aria-labelledby=\"engineer-index-title\"><h2 id=\"engineer-index-title\">Everything in this section</h2><ul>" |
| 32 | text egixb "<li><a href=\"" |
| 33 | text egixc "\">" |
| 34 | text egixd "</a> <span>" |
| 35 | text egixe "</span></li>" |
| 36 | text egixf "</ul></section>" |
| 37 | text egrcpt "receipt" |
| 38 | text egstate "state" |
| 39 | text egsha "sha" |
| 40 | text egdescr "description" |
| 41 | text egturl "target_url" |
| 42 | text egcomps "components" |
| 43 | text egrepo "repo" |
| 44 | text egprs "open_prs" |
| 45 | text eglast "last_merge" |
| 46 | text egtitle "title" |
| 47 | text egurl "url" |
| 48 | text eggen "generated_at" |
| 49 | text egsucc "success" |
| 50 | text egfail "failure" |
| 51 | text egpend "pending" |
| 52 | text egblk "BLOCKED" |
| 53 | text egnotrun "NOT_RUN" |
| 54 | text egwpass "PASS" |
| 55 | text egwblk "BLOCKED" |
| 56 | text egwfail "FAIL" |
| 57 | text egwrun "RUNNING" |
| 58 | text egwnone "NO VERDICT" |
| 59 | text eghttps "https://" |
| 60 | text egvda "<div class=\"stat-card\"><p class=\"stat-value tabular-nums verdict-" |
| 61 | text egvdb "\">" |
| 62 | text egvdc "</p><p class=\"stat-unit\">Spark judge, sovereign core</p><p class=\"stat-label\">Verdict for commit " |
| 63 | text egvdd " of the host runtime: " |
| 64 | text egvde ". " |
| 65 | text egvdf "<a href=\"" |
| 66 | text egvdg "\">Receipt</a>" |
| 67 | text egvdh "</p></div>" |
| 68 | text eglva "<section class=\"live-record\" id=\"live\"><h2>Aien today</h2><p>This block is not typed by hand. It is read from the record <a href=\"https://www.aienos.com/facts.json\">facts.json</a>, gathered from GitHub and published with reviewed releases.</p><div class=\"grid stats-grid\">" |
| 69 | text eglvb "</div>" |
| 70 | text eglvc "<table class=\"live-table\"><thead><tr><th>Component</th><th>Last merged change</th><th>Open proposals</th></tr></thead><tbody>" |
| 71 | text eglvd "<tr><td>" |
| 72 | text eglve "\">" |
| 73 | text eglvf "</td><td>" |
| 74 | text eglvg "</td><td class=\"tabular-nums\">" |
| 75 | text eglvh "</td></tr>" |
| 76 | text eglvi "</tbody></table>" |
| 77 | text eglvj "<p class=\"live-generated\">Record generated " |
| 78 | text eglvk ".</p></section>" |
| 79 | text egnone "none recorded" |
| 80 | text egaa "<a href=\"" |
| 81 | text egab "\">" |
| 82 | text egac "</a>" |
| 83 | |
| 84 | note The page object for route, or 0. Loads engineer.json (replacing any JSON state). |
| 85 | fn eg_find route view uchar * to ulong |
| 86 | root = sj_load egfile |
| 87 | arr = sj_find root egpages |
| 88 | if ne sj_kind arr 2 |
| 89 | trap 10 |
| 90 | end |
| 91 | node = sj_first arr |
| 92 | while ne node 0 bound 256 |
| 93 | if sj_eq sj_find node egpath route |
| 94 | ret node |
| 95 | end |
| 96 | node = sj_next node |
| 97 | end |
| 98 | ret 0 |
| 99 | end |
| 100 | |
| 101 | note True when string node holds the bytes of mk starting at byte i. |
| 102 | fn eg_textat node ulong i ulong mk view uchar * to bool |
| 103 | m = len mk |
| 104 | if gt add i m sj_size node |
| 105 | ret false |
| 106 | end |
| 107 | for k ulong m |
| 108 | if ne sj_byte node add i k get mk k |
| 109 | ret false |
| 110 | end |
| 111 | end |
| 112 | ret true |
| 113 | end |
| 114 | |
| 115 | note True when node is a string that contains s. |
| 116 | fn eg_has node ulong s view uchar * to bool |
| 117 | if ne sj_kind node 3 |
| 118 | ret false |
| 119 | end |
| 120 | n = sj_size node |
| 121 | if gt len s n |
| 122 | ret false |
| 123 | end |
| 124 | for i ulong add sub n len s 1 |
| 125 | if eg_textat node i s |
| 126 | ret true |
| 127 | end |
| 128 | end |
| 129 | ret false |
| 130 | end |
| 131 | |
| 132 | note 1 when the live marker starts at byte i of body, 2 for the verdict marker, else 0. |
| 133 | fn eg_marker body ulong i ulong to uchar |
| 134 | if ne sj_byte body i 60 |
| 135 | ret 0 |
| 136 | end |
| 137 | if eg_textat body i eglive |
| 138 | ret 1 |
| 139 | end |
| 140 | if eg_textat body i egverd |
| 141 | ret 2 |
| 142 | end |
| 143 | ret 0 |
| 144 | end |
| 145 | |
| 146 | fn eg_word state ulong descr ulong to void |
| 147 | if sj_eq state egsucc |
| 148 | sr_raw egwpass |
| 149 | ret |
| 150 | end |
| 151 | if sj_eq state egfail |
| 152 | if and sj_prefix descr egblk eg_has descr egnotrun |
| 153 | sr_raw egwblk |
| 154 | ret |
| 155 | end |
| 156 | sr_raw egwfail |
| 157 | ret |
| 158 | end |
| 159 | if sj_eq state egpend |
| 160 | sr_raw egwrun |
| 161 | ret |
| 162 | end |
| 163 | sr_raw egwnone |
| 164 | end |
| 165 | |
| 166 | note Escaped decoded bytes [0, min(cnt, size)) of a string node. |
| 167 | fn eg_head node ulong cnt ulong to void |
| 168 | k = cnt |
| 169 | if lt sj_size node k |
| 170 | k = sj_size node |
| 171 | end |
| 172 | for j ulong k |
| 173 | gc8 = sj_byte node j |
| 174 | gd8 = gc8 |
| 175 | if lt add j 1 k |
| 176 | gd8 = sj_byte node add j 1 |
| 177 | end |
| 178 | sr_escref gc8 gd8 |
| 179 | end |
| 180 | end |
| 181 | |
| 182 | note Every live-record link is a forge page; a value with no Radicle equivalent is "" and plain. |
| 183 | fn eg_https node ulong to void |
| 184 | if not sj_prefix node rdfgb |
| 185 | trap 10 |
| 186 | end |
| 187 | sj_href node |
| 188 | end |
| 189 | |
| 190 | note The Spark judge's verdict card, from the current facts.json state. |
| 191 | fn eg_verdict root ulong to void |
| 192 | r = sj_find root egrcpt |
| 193 | state = sj_find r egstate |
| 194 | descr = sj_find r egdescr |
| 195 | sr_raw egvda |
| 196 | sj_emit state |
| 197 | sr_raw egvdb |
| 198 | eg_word state descr |
| 199 | sr_raw egvdc |
| 200 | eg_head sj_find r egsha 7 |
| 201 | sr_raw egvdd |
| 202 | sj_emit descr |
| 203 | sr_raw egvde |
| 204 | url = sj_find r egturl |
| 205 | if gt sj_size url 0 |
| 206 | sr_raw egvdf |
| 207 | eg_https url |
| 208 | sr_raw egvdg |
| 209 | rd_rcpt url |
| 210 | end |
| 211 | sr_raw egvdh |
| 212 | end |
| 213 | |
| 214 | fn eg_merge c ulong to void |
| 215 | last = sj_find c eglast |
| 216 | if ne sj_kind last 1 |
| 217 | sr_raw egnone |
| 218 | ret |
| 219 | end |
| 220 | url = sj_find last egurl |
| 221 | if and eq sj_kind url 3 gt sj_size url 0 |
| 222 | sr_raw egaa |
| 223 | eg_https url |
| 224 | sr_raw egab |
| 225 | sj_emit sj_find last egtitle |
| 226 | sr_raw egac |
| 227 | rd_rcpt url |
| 228 | ret |
| 229 | end |
| 230 | sj_emit sj_find last egtitle |
| 231 | end |
| 232 | |
| 233 | fn eg_row c ulong to void |
| 234 | sr_raw eglvd |
| 235 | url = sj_find c egurl |
| 236 | if and eq sj_kind url 3 gt sj_size url 0 |
| 237 | sr_raw egaa |
| 238 | eg_https url |
| 239 | sr_raw eglve |
| 240 | sj_emit sj_find c egname |
| 241 | sr_raw egac |
| 242 | else |
| 243 | sj_emit sj_find c egname |
| 244 | end |
| 245 | sr_raw eglvf |
| 246 | eg_merge c |
| 247 | sr_raw eglvg |
| 248 | sj_emit sj_find c egprs |
| 249 | sr_raw eglvh |
| 250 | end |
| 251 | |
| 252 | note The AIEN-today block: verdict, one row per component, the record time. |
| 253 | fn eg_live root ulong to void |
| 254 | sr_raw eglva |
| 255 | eg_verdict root |
| 256 | sr_raw eglvb |
| 257 | comps = sj_find root egcomps |
| 258 | if gt sj_len comps 0 |
| 259 | sr_raw eglvc |
| 260 | c = sj_first comps |
| 261 | while ne c 0 bound 256 |
| 262 | eg_row c |
| 263 | c = sj_next c |
| 264 | end |
| 265 | sr_raw eglvi |
| 266 | end |
| 267 | sr_raw eglvj |
| 268 | sj_emit sj_find root eggen |
| 269 | sr_raw eglvk |
| 270 | end |
| 271 | |
| 272 | fn eg_block which uchar to void |
| 273 | root = sj_load egfacts |
| 274 | if eq which 1 |
| 275 | eg_live root |
| 276 | ret |
| 277 | end |
| 278 | eg_verdict root |
| 279 | end |
| 280 | |
| 281 | note Emits body bytes from pos up to the next marker (or the end) and returns where it stopped. |
| 282 | fn eg_span route view uchar * pos ulong to ulong |
| 283 | page = eg_find route |
| 284 | body = sj_find page egbody |
| 285 | n = sj_size body |
| 286 | if ge pos n |
| 287 | ret n |
| 288 | end |
| 289 | for j ulong sub n pos |
| 290 | i = add pos j |
| 291 | if ne eg_marker body i 0 |
| 292 | ret i |
| 293 | end |
| 294 | sr_byte sj_byte body i |
| 295 | end |
| 296 | ret n |
| 297 | end |
| 298 | |
| 299 | note The marker at pos (page reloaded); returns 1 or 2, or 0 at the end of the body. |
| 300 | fn eg_at route view uchar * pos ulong to uchar |
| 301 | page = eg_find route |
| 302 | body = sj_find page egbody |
| 303 | if ge pos sj_size body |
| 304 | ret 0 |
| 305 | end |
| 306 | ret eg_marker body pos |
| 307 | end |
| 308 | |
| 309 | fn eg_body route view uchar * to void |
| 310 | pos = ulong 0 |
| 311 | more = true |
| 312 | while more bound 64 |
| 313 | pos = eg_span route pos |
| 314 | which = eg_at route pos |
| 315 | if eq which 0 |
| 316 | more = false |
| 317 | else |
| 318 | eg_block which |
| 319 | if eq which 1 |
| 320 | pos = add pos len eglive |
| 321 | else |
| 322 | pos = add pos len egverd |
| 323 | end |
| 324 | end |
| 325 | end |
| 326 | end |
| 327 | |
| 328 | fn eg_index_item node ulong to void |
| 329 | if sj_eq sj_find node egkind eghome |
| 330 | ret |
| 331 | end |
| 332 | p = sj_find node egpath |
| 333 | if not sj_prefix p egroot |
| 334 | trap 10 |
| 335 | end |
| 336 | sr_raw egixb |
| 337 | sj_href p |
| 338 | sr_raw egixc |
| 339 | sj_emit sj_find node egname |
| 340 | sr_raw egixd |
| 341 | sj_emit sj_find node egdesc |
| 342 | sr_raw egixe |
| 343 | end |
| 344 | |
| 345 | note The foot of /engineer/: every other page of the section, from the data file. |
| 346 | fn eg_index to void |
| 347 | root = sj_load egfile |
| 348 | arr = sj_find root egpages |
| 349 | sr_raw egixa |
| 350 | node = sj_first arr |
| 351 | while ne node 0 bound 256 |
| 352 | eg_index_item node |
| 353 | node = sj_next node |
| 354 | end |
| 355 | sr_raw egixf |
| 356 | end |
| 357 | |
| 358 | note Renders the main body of an /engineer/ route; false when engineer.json has no such page. |
| 359 | fn se_page route view uchar * to bool |
| 360 | page = eg_find route |
| 361 | if eq page 0 |
| 362 | ret false |
| 363 | end |
| 364 | kind = sj_find page egkind |
| 365 | home = sj_eq kind eghome |
| 366 | info = sj_eq kind eginfo |
| 367 | sr_raw egcss |
| 368 | sr_raw egmobcss |
| 369 | if info |
| 370 | sr_raw egigcss |
| 371 | end |
| 372 | if home |
| 373 | sr_raw eguni |
| 374 | end |
| 375 | sr_raw egopen |
| 376 | if not home |
| 377 | sr_raw egback |
| 378 | end |
| 379 | eg_body route |
| 380 | if home |
| 381 | eg_index |
| 382 | end |
| 383 | sr_raw egclose |
| 384 | ret true |
| 385 | end |