code wiki / _hdl_build / nx_hub_graft.nx

nx_hub_graft.nx

buildroot/runtime/_hdl_build/nx_hub_graft.nx

5692 B91 linesdepth 21pulls 146 transitivereach 0 importersview sourcekind tooltopic hub
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_hub_graft.nx

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

main nx_trust_store_load_from_c sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻ _is_space _decode_octal_escape _is_octal trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load sys_mmap ↻ x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length asn1_read_length ↻ x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻ x509_read_alg_id sys_mmap ↻ asn1_expect_tag ↻

structs

none

consts

13const K_MAGIC_4194304: i64 = 4194304
14const K_MAGIC_4000: i64 = 4000

functions

16func 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 }
called by 1: main calls 1: sys_write
17func 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 }
18func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: find_incount_in
20func find_in(hay: *u8, n: i64, needle: *u8) -> i64
calls 1: slen
32func count_in(hay: *u8, n: i64, needle: *u8) -> i64
calls 1: slen
38func write_file(path: *u8, buf: *u8, n: i64) -> i64
46func main() -> i64