code wiki / _hdl_build / nx_creation_tree_gate.nx

nx_creation_tree_gate.nx source

↩ module page · 342 lines · 20079 B

1import "nx_gate_gn.nx" 2import "nx_gate_base.nx" 3// nx_creation_tree_gate.nx -- THE CREATION FAMILY TREE (operator: "show the pulse and the growth from god 4// down the generations like a growing family tree"). Emits a SOVEREIGN HTML page that RENDERS THE REAL 5// GENEALOGY: reads knowledge/registry/genesis_lineage.tsv (god -> {0,1} -> ISA -> toolchain -> womb -> 6// organs -> the whole canopy), parses every node + its parent, and draws a nested family tree rooted at 7// god, generation by generation, colour-coded by sovereignty -- PLUS the living pulse (god_pulse.log) with 8// a CSS-only animated heartbeat (no JS). Data-driven (rule 6): the tree IS the lineage, not a static table. 9// S-class = sovereign by construction: 0 JS, 0 third-party, FAIL-CLOSED (scans its own output, refuses to 10// write if any script/src/link/@import is present). Gated for /wiki/creation (behind the OPAQUE wall). 11// license_tier: ORIGINAL [[feedback-nishi-ecosystem-only]] [[project-self-scaffold-exceed-eurisko-2026-06-23]] 12import "nx_syscalls.nx" 13 14const CT_LIN: *u8 = "knowledge/registry/genesis_lineage.tsv" 15const CT_PULSE: *u8 = "knowledge/status/god_pulse.log" 16const CT_PAGE: *u8 = "web_assets/creation.html" 17 18 19func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" 20" as *u8); return ok } 21func cc(buf: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){ buf[o]=s[i]; o=o+1; i=i+1 } return o } 22func ccn(buf: *u8, off: i64, src: *u8, n: i64) -> i64 { var o: i64=off; var i: i64=0; while i<n { buf[o]=src[i]; o=o+1; i=i+1 } return o } 23func ccnum(buf: *u8, off: i64, v: i64) -> i64 { if v==0 { buf[off]=(48 as u8); return off+1 } var m: i64=v; let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } var o: i64=off; var q: i64=k-1; while q>=0 { buf[o]=t[q]; o=o+1; q=q-1 } return o } 24func ptr_at(b: *u8, off: i64) -> *u8 { return ((b as i64)+off) as *u8 } 25 26// append src[0..n) into buf with HTML-escaping (labels carry <, >, & e.g. "app <-> IO LOOP") 27func ccesc(buf: *u8, off: i64, src: *u8, n: i64) -> i64 { 28 var o: i64=off; var i: i64=0 29 while i<n { 30 let c: u8 = src[i] 31 if c==(60 as u8) { o=cc(buf,o,"&lt;" as *u8) } 32 else { if c==(62 as u8) { o=cc(buf,o,"&gt;" as *u8) } 33 else { if c==(38 as u8) { o=cc(buf,o,"&amp;" as *u8) } 34 else { buf[o]=c; o=o+1 } } } 35 i=i+1 36 } 37 return o 38} 39 40func cfind(buf: *u8, n: i64, pat: *u8) -> i64 { 41 var pl: i64=0; while pat[pl]!=(0 as u8){pl=pl+1} 42 var i: i64=0 43 while i+pl<=n { var j: i64=0; var ok: i64=1; while j<pl { if buf[i+j]!=pat[j] { ok=0; j=pl } else { j=j+1 } } if ok==1 { return i } i=i+1 } 44 return 0-1 45} 46 47// count non-overlapping occurrences of NUL-term pat in buf[0..n) 48func ccount(buf: *u8, n: i64, pat: *u8) -> i64 { 49 var pl: i64=0; while pat[pl]!=(0 as u8){pl=pl+1} 50 if pl==0 { return 0 } 51 var c: i64=0; var i: i64=0 52 while i+pl<=n { 53 var j: i64=0; var ok: i64=1 54 while j<pl { if buf[i+j]!=pat[j] { ok=0; j=pl } else { j=j+1 } } 55 if ok==1 { c=c+1; i=i+pl } else { i=i+1 } 56 } 57 return c 58} 59 60// exact-match: fbuf[off..off+len) == lit (lit fully consumed) 61func streq(fbuf: *u8, off: i64, len: i64, lit: *u8) -> i64 { 62 var i: i64=0 63 while i<len { if lit[i]==(0 as u8) { return 0 } if fbuf[off+i]!=lit[i] { return 0 } i=i+1 } 64 if lit[len]!=(0 as u8) { return 0 } 65 return 1 66} 67 68// sovereignty field -> colour code (0 sovereign, 1 building, 2 third-party/locked, 3 future, 69// 4 sovereign-emu, 5 origin/god, 6 mixed, 7 other e.g. GOAL-not-built) 70func sov_code(fbuf: *u8, off: i64, len: i64) -> i64 { 71 if streq(fbuf,off,len,"origin" as *u8)==1 { return 5 } 72 if streq(fbuf,off,len,"sovereign-emu" as *u8)==1 { return 4 } 73 if streq(fbuf,off,len,"sovereign" as *u8)==1 { return 0 } 74 if streq(fbuf,off,len,"building" as *u8)==1 { return 1 } 75 if streq(fbuf,off,len,"third-party" as *u8)==1 { return 2 } 76 if streq(fbuf,off,len,"future" as *u8)==1 { return 3 } 77 if streq(fbuf,off,len,"mixed" as *u8)==1 { return 6 } 78 return 7 79} 80 81func rt_sovclass(c: i64) -> *u8 { 82 if c==0 { return "s0" as *u8 } 83 if c==1 { return "s1" as *u8 } 84 if c==2 { return "s2" as *u8 } 85 if c==3 { return "s3" as *u8 } 86 if c==4 { return "s4" as *u8 } 87 if c==5 { return "s5" as *u8 } 88 if c==6 { return "s6" as *u8 } 89 return "s7" as *u8 90} 91 92// depth of a node = steps to god (root has depth 0) 93func node_depth(nd: *i64, idx: i64) -> i64 { 94 var d: i64=0; var cur: i64=idx; var guard: i64=0 95 while cur>=0 { 96 let p: i64 = nd[cur*8+2] 97 if p<0 { cur = 0-1 } else { d=d+1; cur=p; guard=guard+1; if guard>500 { cur=0-1 } } 98 } 99 return d 100} 101 102// recursive family-tree render: emit node idx as <li>, then its children as a nested <ul>. 103// nd stride 8: [0]=id_off [1]=id_len [2]=parent_idx [3]=sov_code [4]=lab_off [5]=lab_len [6]=- [7]=visited 104func rt_render(h: *u8, o: i64, idx: i64, nd: *i64, fbuf: *u8, n: i64) -> i64 { 105 if nd[idx*8+7]==1 { return o } 106 nd[idx*8+7]=1 107 var oo: i64 = o 108 oo = cc(h, oo, "<li><span class='nd " as *u8) 109 oo = cc(h, oo, rt_sovclass(nd[idx*8+3])) 110 oo = cc(h, oo, "'><b>" as *u8) 111 oo = ccesc(h, oo, ptr_at(fbuf, nd[idx*8+0]), nd[idx*8+1]) 112 oo = cc(h, oo, "</b> " as *u8) 113 var ll: i64 = nd[idx*8+5]; var trunc: i64 = 0 114 if ll>116 { ll=116; trunc=1 } 115 oo = ccesc(h, oo, ptr_at(fbuf, nd[idx*8+4]), ll) 116 if trunc==1 { oo = cc(h, oo, "&hellip;" as *u8) } 117 oo = cc(h, oo, "</span>" as *u8) 118 var hasc: i64 = 0; var j: i64 = 0 119 while j<n { if nd[j*8+2]==idx { hasc=1; j=n } else { j=j+1 } } 120 if hasc==1 { 121 oo = cc(h, oo, "<ul>" as *u8) 122 j = 0 123 while j<n { if nd[j*8+2]==idx { oo = rt_render(h, oo, j, nd, fbuf, n) } j=j+1 } 124 oo = cc(h, oo, "</ul>" as *u8) 125 } 126 oo = cc(h, oo, "</li>" as *u8) 127 return oo 128} 129 130func main(argc: i64, argv: *i64) -> i64 { 131 gw("=== CREATION FAMILY TREE: render the real genesis lineage (god -> generations), 0-JS ===\n" as *u8) 132 133 // ---- read the genealogy ---- 134 let linlen: *i64 = sys_mmap(16) as *i64 135 let fbuf: *u8 = sys_read_file(CT_LIN, linlen) 136 if (fbuf as i64) == 0 { gw("FATAL: cannot read genesis_lineage.tsv\n" as *u8); sys_exit(1); return 1 } 137 let fn: i64 = linlen[0] 138 139 // ---- read the pulse ---- 140 let plenp: *i64 = sys_mmap(16) as *i64 141 let pbuf: *u8 = sys_read_file(CT_PULSE, plenp) 142 var pn: i64 = 0; var phave: i64 = 0 143 if (pbuf as i64) != 0 { pn = plenp[0]; phave = 1 } 144 145 // ---- parse the lineage into nd[] (stride 8) ---- 146 let nd: *i64 = sys_mmap(256*8*8) as *i64 147 var nn: i64 = 0 148 var i: i64 = 0 149 while i < fn { 150 let ls: i64 = i 151 var le: i64 = i 152 while le < fn { if fbuf[le]==(10 as u8) { break } le=le+1 } 153 if le > ls { 154 if fbuf[ls] != (35 as u8) { 155 var fstart: i64 = ls 156 var fnum: i64 = 0 157 var k: i64 = ls 158 var ido: i64=0; var idl: i64=0 159 var paro: i64=0; var parl: i64=0 160 var sovo: i64=0; var sovl: i64=0 161 var labo: i64=0; var labl: i64=0 162 while k <= le { 163 var sep: i64 = 0 164 if k==le { sep=1 } else { if fbuf[k]==(9 as u8) { sep=1 } } 165 if sep==1 { 166 let flen: i64 = k - fstart 167 if fnum==0 { ido=fstart; idl=flen } 168 if fnum==2 { paro=fstart; parl=flen } 169 if fnum==4 { sovo=fstart; sovl=flen } 170 if fnum==5 { labo=fstart; labl=flen } 171 fnum=fnum+1 172 fstart=k+1 173 } 174 k=k+1 175 } 176 if idl>0 { if nn<256 { 177 nd[nn*8+0]=ido; nd[nn*8+1]=idl 178 nd[nn*8+2]=0-1 179 nd[nn*8+3]=sov_code(fbuf, sovo, sovl) 180 nd[nn*8+4]=labo; nd[nn*8+5]=labl 181 nd[nn*8+6]=paro 182 nd[nn*8+7]=parl 183 nn=nn+1 184 } } 185 } 186 } 187 i = le + 1 188 } 189 190 // ---- resolve parent_idx by id match (slot 6=parent_off, slot 7=parent_len before this) ---- 191 var a: i64 = 0 192 while a<nn { 193 let po: i64 = nd[a*8+6]; let pl: i64 = nd[a*8+7] 194 if pl==1 { if fbuf[po]==(45 as u8) { nd[a*8+2]=0-1 } } 195 if nd[a*8+2]==(0-1) { 196 if pl==1 { if fbuf[po]==(45 as u8) { nd[a*8+7]=0; a=a } } 197 } 198 var done: i64 = 0 199 if pl==1 { if fbuf[po]==(45 as u8) { done=1 } } 200 if done==0 { 201 var b: i64=0; var found: i64=0-1 202 while b<nn { 203 if nd[b*8+1]==pl { 204 var m: i64=0; var eq: i64=1 205 while m<pl { if fbuf[nd[b*8+0]+m]!=fbuf[po+m] { eq=0; m=pl } else { m=m+1 } } 206 if eq==1 { found=b; b=nn } 207 } 208 b=b+1 209 } 210 nd[a*8+2]=found 211 } 212 nd[a*8+7]=0 213 a=a+1 214 } 215 216 // ---- counts by sovereignty + max generation depth ---- 217 let cnt: *i64 = sys_mmap(8*8) as *i64 218 var ci: i64=0; while ci<8 { cnt[ci]=0; ci=ci+1 } 219 var maxd: i64=0 220 a=0 221 while a<nn { 222 let sc: i64 = nd[a*8+3]; cnt[sc]=cnt[sc]+1 223 let d: i64 = node_depth(nd, a); if d>maxd { maxd=d } 224 a=a+1 225 } 226 let gens: i64 = maxd + 1 227 228 // ---- emit the sovereign page ---- 229 let h: *u8 = sys_mmap(262144) 230 var o: i64 = 0 231 o = cc(h, o, "<!doctype html><html lang='en'><head><meta charset='utf-8'><meta name='viewport' content='width=device-width,initial-scale=1'><title>Creation -- the family tree from god</title><style>\n" as *u8) 232 o = cc(h, o, "*{box-sizing:border-box}body{margin:0;font:15px/1.55 -apple-system,Segoe UI,Roboto,sans-serif;color:#e8ecf4;background:#080b13}\n" as *u8) 233 o = cc(h, o, ".hero{padding:54px 24px 30px;text-align:center;background:radial-gradient(120% 100% at 50% 0,#16264a,#0a0f1d 70%)}\n" as *u8) 234 o = cc(h, o, ".hero h1{font-size:46px;margin:0 0 8px;letter-spacing:-1px;background:linear-gradient(90deg,#6ea8ff,#b388ff,#7af5c8);-webkit-background-clip:text;background-clip:text;color:transparent}\n" as *u8) 235 o = cc(h, o, ".hero p{font-size:17px;color:#9fb0cc;margin:0}.hero b{color:#ffd479}\n" as *u8) 236 o = cc(h, o, ".badge{display:inline-block;margin-top:16px;padding:6px 14px;border:1px solid #2e6f53;border-radius:999px;color:#7af5c8;font-size:12px;background:#0e2018}\n" as *u8) 237 o = cc(h, o, ".wrap{max-width:1000px;margin:0 auto;padding:18px 24px 40px}\n" as *u8) 238 o = cc(h, o, "section{margin:22px 0;padding:22px;background:#0d1422;border:1px solid #1c2840;border-radius:14px}\n" as *u8) 239 o = cc(h, o, "h2{margin:0 0 12px;font-size:20px;color:#cdd9f2}\n" as *u8) 240 o = cc(h, o, ".note{color:#9fb0cc;font-size:14px;margin:0 0 14px}.note b{color:#cdd9f2}\n" as *u8) 241 o = cc(h, o, ".pre{white-space:pre-wrap;font:13px/1.5 ui-monospace,Menlo,monospace;color:#9fe6c2;background:#0a1410;border:1px solid #18342a;border-radius:10px;padding:13px;overflow:auto}\n" as *u8) 242 // the living heartbeat (CSS only, no JS) 243 o = cc(h, o, "@keyframes beat{0%,100%{transform:scale(1);opacity:.5}45%{transform:scale(1.35);opacity:1}}\n" as *u8) 244 o = cc(h, o, ".heart{display:inline-block;width:13px;height:13px;border-radius:50%;background:#ff5a78;box-shadow:0 0 13px #ff5a78;animation:beat 1.25s ease-in-out infinite;vertical-align:middle;margin-right:8px}\n" as *u8) 245 // family tree 246 o = cc(h, o, "ul.tree,ul.tree ul{list-style:none;margin:0;padding-left:24px;position:relative}\n" as *u8) 247 o = cc(h, o, "ul.tree{padding-left:4px}ul.tree li{position:relative;padding:4px 0}\n" as *u8) 248 o = cc(h, o, "ul.tree ul{border-left:1px solid #29395c}\n" as *u8) 249 o = cc(h, o, "ul.tree ul li::before{content:'';position:absolute;left:-24px;top:16px;width:20px;height:1px;background:#29395c}\n" as *u8) 250 o = cc(h, o, ".nd{display:inline-block;padding:3px 9px;border-radius:7px;border:1px solid #1e2b45;background:#0e1626}\n" as *u8) 251 o = cc(h, o, ".nd b{font-family:ui-monospace,monospace;font-size:11.5px;color:#cdd9f2}\n" as *u8) 252 o = cc(h, o, ".s0{border-color:#2e6f53;background:#0c1c15}.s4{border-color:#2b6f7a;background:#0a1b20}\n" as *u8) 253 o = cc(h, o, ".s1{border-color:#7a6326;background:#1d1709}.s2{border-color:#7a2e3a;background:#1d0a0e}\n" as *u8) 254 o = cc(h, o, ".s3{border-color:#4a3a6a;background:#140e20}.s5{border-color:#b8902a;background:#241c08}\n" as *u8) 255 o = cc(h, o, ".s5 b{color:#ffd479}.s6{border-color:#7a5a2e;background:#1d140a}.s7{border-color:#3a4a66;background:#0e1626}\n" as *u8) 256 o = cc(h, o, ".k{display:inline-block;padding:1px 7px;border-radius:5px;font-size:12px;margin:0 2px}\n" as *u8) 257 o = cc(h, o, ".grid{display:flex;gap:10px;flex-wrap:wrap}.cell{flex:1;min-width:120px;padding:14px;border-radius:10px;border:1px solid #1c2840;background:#0b1220;text-align:center}.cell .big{font-size:30px;font-weight:700}\n" as *u8) 258 o = cc(h, o, ".ev{color:#7af5c8}.em{color:#69d6e6}.ip{color:#ffd479}.ms{color:#ff8a8a}.fu{color:#b9a6e6}\n" as *u8) 259 o = cc(h, o, ".foot{text-align:center;color:#5c6b88;font-size:12px;padding:26px 0 0}\n" as *u8) 260 o = cc(h, o, "</style></head><body>\n" as *u8) 261 262 // hero (live numbers) 263 o = cc(h, o, "<div class='hero'><h1>Creation</h1><p>the Nishi system, grown from <b>god</b> down " as *u8) 264 o = ccnum(h, o, gens) 265 o = cc(h, o, " generations &mdash; a living family tree of " as *u8) 266 o = ccnum(h, o, nn) 267 o = cc(h, o, " capabilities</p><div class='badge'>0 JavaScript &middot; 0 third-party &middot; rendered by a Nishi organ from the real genesis lineage</div></div><div class='wrap'>\n" as *u8) 268 269 // PULSE -- the living heartbeat 270 o = cc(h, o, "<section><h2><span class='heart'></span>The pulse &mdash; it builds on its own beat</h2><p class='note'>Fired once, the system runs its own god-up cycle &mdash; <b>scaffold &rarr; emit &rarr; GOD-BUILD (rv64im&rarr;nx_cc&rarr;nxasm) &rarr; run &rarr; gate &rarr; grade</b> &mdash; beat after beat, zero human between beats. The heartbeat it wrote (the dot above pulses live, CSS only):</p><div class='pre'>" as *u8) 271 if phave == 1 { o = ccn(h, o, pbuf, pn) } else { o = cc(h, o, "(no heartbeat yet -- run nx_god_pulse_gate)" as *u8) } 272 o = cc(h, o, "</div></section>\n" as *u8) 273 274 // FAMILY TREE 275 o = cc(h, o, "<section><h2>The family tree &mdash; from god, down the generations</h2><p class='note'>Every node is one capability; its parent is one step toward <b>god</b> (the origination point &mdash; any hardware substrate). Colour = sovereignty: <span class='k s5'>god</span> <span class='k s0'>sovereign</span> <span class='k s4'>sovereign-emu</span> <span class='k s1'>building</span> <span class='k s2'>locked (3rd-party)</span> <span class='k s3'>future</span>. Derived live from <b>genesis_lineage.tsv</b> &mdash; the tree IS the lineage.</p><ul class='tree'>\n" as *u8) 276 // render every root (parent_idx < 0); ORIGIN/god is the root 277 var r: i64 = 0 278 while r<nn { if nd[r*8+2] < 0 { o = rt_render(h, o, r, nd, fbuf, nn) } r=r+1 } 279 o = cc(h, o, "</ul></section>\n" as *u8) 280 281 // STATS -- the tree's health 282 o = cc(h, o, "<section><h2>The tree's health &mdash; how far evolution has reached</h2><p class='note'>Counted from the live lineage &mdash; how much of the tree has grown sovereign vs is still a lock-in worklist. Evidence, not assertion.</p><div class='grid'>\n" as *u8) 283 o = cc(h, o, "<div class='cell'><div class='big ev'>" as *u8); o = ccnum(h, o, cnt[0]); o = cc(h, o, "</div>sovereign</div>\n" as *u8) 284 o = cc(h, o, "<div class='cell'><div class='big em'>" as *u8); o = ccnum(h, o, cnt[4]); o = cc(h, o, "</div>sovereign-emu</div>\n" as *u8) 285 o = cc(h, o, "<div class='cell'><div class='big ip'>" as *u8); o = ccnum(h, o, cnt[1]); o = cc(h, o, "</div>building</div>\n" as *u8) 286 o = cc(h, o, "<div class='cell'><div class='big ms'>" as *u8); o = ccnum(h, o, cnt[2]); o = cc(h, o, "</div>locked (3rd-party)</div>\n" as *u8) 287 o = cc(h, o, "<div class='cell'><div class='big fu'>" as *u8); o = ccnum(h, o, cnt[3]); o = cc(h, o, "</div>future</div>\n" as *u8) 288 o = cc(h, o, "</div></section>\n" as *u8) 289 290 o = cc(h, o, "<div class='foot'>Sovereign by construction &mdash; no script, no external resource. Rendered by nx_creation_tree (nx_cc&rarr;nxasm, no gcc) from knowledge/registry/genesis_lineage.tsv + knowledge/status/god_pulse.log. Behind the OPAQUE wall at /wiki/creation.</div>\n" as *u8) 291 o = cc(h, o, "</div></body></html>\n" as *u8) 292 293 // ---- FAIL-CLOSED SOVEREIGNTY: scan our OWN output ---- 294 var sov: i64 = 1 295 if cfind(h, o, "<script" as *u8) >= 0 { sov = 0 } 296 if cfind(h, o, "src=" as *u8) >= 0 { sov = 0 } 297 if cfind(h, o, "<link" as *u8) >= 0 { sov = 0 } 298 if cfind(h, o, "@import" as *u8) >= 0 { sov = 0 } 299 if cfind(h, o, "javascript:" as *u8) >= 0 { sov = 0 } 300 301 var wrote: i64 = 0 302 if sov == 1 { 303 let fd: i64 = sys_openat_wr(CT_PAGE, 420) 304 if fd >= 0 { sys_write(fd, h, o); sys_close(fd); wrote = 1 } 305 } 306 307 gw(" nodes=" as *u8); gn(nn); gw(" generations=" as *u8); gn(gens); gw(" sovereign=" as *u8); gn(cnt[0]); gw(" emu=" as *u8); gn(cnt[4]); gw(" building=" as *u8); gn(cnt[1]); gw(" locked=" as *u8); gn(cnt[2]); gw(" future=" as *u8); gn(cnt[3]); gw("\n" as *u8) 308 gw(" emitted=" as *u8); gn(wrote); gw(" bytes=" as *u8); gn(o); gw(" sovereign(0-JS)=" as *u8); gn(sov); gw(" pulse=" as *u8); gn(phave); gw("\n" as *u8) 309 310 // liar-kill: the scanner must DETECT a planted <script 311 let probe: *u8 = sys_mmap(64); var po2: i64 = cc(probe, 0, "<div><script>x</script></div>" as *u8) 312 var liar_caught: i64 = 0; if cfind(probe, po2, "<script" as *u8) >= 0 { liar_caught = 1 } 313 314 var t1: i64 = 0; if wrote == 1 { t1 = 1 } 315 var t2: i64 = 0; if sov == 1 { t2 = 1 } 316 // T3: a REAL tree -- god at the root, a deep descendant present, and many generations 317 var t3: i64 = 0 318 if cfind(h, o, "ORIGIN" as *u8) >= 0 { if cfind(h, o, "DESC-TOOLCHAIN" as *u8) >= 0 { if cfind(h, o, "CAP-NOFLOAT-ATTENTION" as *u8) >= 0 { if gens >= 8 { t3 = 1 } } } } 319 // T4: the pulse is embedded + the heartbeat animation is present 320 var t4: i64 = 0; if phave == 1 { if cfind(h, o, "GOD-PULSE" as *u8) >= 0 { if cfind(h, o, "@keyframes beat" as *u8) >= 0 { t4 = 1 } } } 321 var t5: i64 = 0; if liar_caught == 1 { t5 = 1 } 322 // T6: the lineage was really parsed -- a substantial node count (not a stub) 323 var t6: i64 = 0; if nn >= 100 { t6 = 1 } 324 // T7: well-formed family tree -- balanced <li>/<ul>, exactly one <li> per node (no dup/leak) 325 let li_o: i64 = ccount(h, o, "<li>" as *u8) 326 let li_c: i64 = ccount(h, o, "</li>" as *u8) 327 let ul_o: i64 = ccount(h, o, "<ul" as *u8) 328 let ul_c: i64 = ccount(h, o, "</ul>" as *u8) 329 var t7: i64 = 0 330 if li_o==li_c { if ul_o==ul_c { if li_o==nn { t7 = 1 } } } 331 332 gw("T1 emitted=" as *u8); gn(t1); gw(" T2 sovereign=" as *u8); gn(t2); gw(" T3 real-tree(god->deep, gens>=8)=" as *u8); gn(t3); gw(" T4 living-pulse=" as *u8); gn(t4); gw(" T5 scan-has-teeth=" as *u8); gn(t5); gw(" T6 lineage-parsed(>=100)=" as *u8); gn(t6); gw("\n" as *u8) 333 gw("T7 well-formed-tree(li " as *u8); gn(li_o); gw("=" as *u8); gn(li_c); gw(", ul " as *u8); gn(ul_o); gw("=" as *u8); gn(ul_c); gw(", li==nodes " as *u8); gn(nn); gw(")=" as *u8); gn(t7); gw("\n" as *u8) 334 335 var green: i64 = 0 336 if t1==1 { if t2==1 { if t3==1 { if t4==1 { if t5==1 { if t6==1 { if t7==1 { green = 1 } } } } } } } 337 if green == 1 { 338 gw("VERDICT: GREEN -- the Creation FAMILY TREE is rendered from the real genesis lineage (god -> " as *u8); gn(gens); gw(" generations, " as *u8); gn(nn); gw(" capabilities), with the living pulse. Sovereign 0-JS, fail-closed. -> web_assets/creation.html (deploy behind OPAQUE at /wiki/creation).\n" as *u8) 339 sys_exit(0); return 0 340 } 341 gw("VERDICT: RED\n" as *u8); sys_exit(1); return 1 342}