code wiki / _hdl_build / nx_hub_graft.nx
nx_hub_graft.nx
buildroot/runtime/_hdl_build/nx_hub_graft.nx
about
nx_hub_graft.nx -- NON-REGRESSIVE hub card add (operator 2026-07-10: "eat the debt, deploy with rollback").
The /compare hub is laptop-published from a multi-session-contended registry; my local copy is a stale
11-domain subset while the LIVE hub carries ~30 cards. Regenerating from my stale registry would DROP ~19
workstreams' cards. Instead: fetch the LIVE hub over the sovereign TLS stack, INJECT the instrument card
before the footer (preserving every existing card), and emit (a) knowledge/compare/hub_backup.html = the
exact live bytes (the ROLLBACK point) and (b) knowledge/compare/hub_grafted.html = live + instrument card.
A downstream push + sovereign verify proves card-count did not regress; if it did, push the backup.
license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const K_MAGIC_4194304: i64 = 4194304 |
| 14 | const K_MAGIC_4000: i64 = 4000 |
functions
| 16 | func w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 17 | func wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(fd,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(fd,bb,k); return 0 } |
| 18 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 20 | func find_in(hay: *u8, n: i64, needle: *u8) -> i64 calls 1: slen |
| 32 | func count_in(hay: *u8, n: i64, needle: *u8) -> i64 calls 1: slen |
| 38 | func write_file(path: *u8, buf: *u8, n: i64) -> i64 |
| 46 | func main() -> i64 |