code wiki / (root) / nx_dev_api_build_probe.nx

nx_dev_api_build_probe.nx

buildroot/runtime/nx_dev_api_build_probe.nx

8736 B156 linesdepth 19pulls 121 transitivereach 0 importersview sourcekind probetopic dev
docsdependenciesstructsconstsfunctions

about

nx_dev_api_build_probe.nx -- SOVEREIGN end-to-end proof that /api/dev/build BUILDS on the hub over the LIVE edge. The true round-trip (operator: "build so verify"): a TLS-1.3 client POSTs /api/dev/build with the operator's X-Nishi-Cap (dev_cap.tok) + organ=nx_bytes_eq to https://nishifamily.com; the edge proxies to the loopback dev daemon; da_do_build forks ./_offc/nx_sov_build_run.elf (the toolchain we shipped) -> compiles on the NAS -> returns {exit, output}. GREEN iff the response carries the daemon's own build output ("SOVEREIGN"). Clones the proven TLS POST path from nx_login_e2e_probe. A CLIENT that runs+exits. license_tier: ORIGINAL expect_exit: 0

dependencies 14 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_tls13_client_validate_certifica nx_tls13_client_session_run.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_http_response_parse.nx nx_tls13.nx nx_tls13_record.nx nx_dev_api_build_probe.nx

diagram shows first 10 each side; +4 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_http_response_parse.nxnx_tls13.nxnx_tls13_record.nxnx_tls13_read_record_from_fd.nxnx_tls13_client_session.nxnx_chacha20_poly1305.nxnx_u256.nx

imported by: nobody (leaf or entry point)

structs

none

consts

21const K_MAGIC_16645: i64 = 16645
22const K_MAGIC_4194304: i64 = 4194304
23const K_MAGIC_1024: i64 = 1024
24const K_MAGIC_8192: i64 = 8192
25const K_MAGIC_262144: i64 = 262144

functions

27func ep(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
calls 1: sys_write
28func epn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var x: i64=v; if x<0 {b[0]=45;sys_write(1,b,1);x=0-x}; if x==0 {b[0]=48;sys_write(1,b,1);return 0} var d: i64=0; var y: i64=x; while y>0 {d=d+1;y=y/10} var i: i64=d-1; y=x; while i>=0 {b[i]=(48+(y%10)) as u8; y=y/10; i=i-1} sys_write(1,b,d); return 0 }
29func ecat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){dst[o]=s[i]; o=o+1; i=i+1} return o }
called by 1: e2e_req
30func eslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
31func econtains(buf: *u8, n: i64, needle: *u8) -> i64
38func ewrite_n(fd: i64, buf: *u8, n: i64) -> i64 { var off: i64=0; while off<n { let w: i64=sys_write(fd, ((buf as i64)+off) as *u8, n-off); if w<=0 { return 0-1 } off=off+w } return 0 }
called by 1: e2e_send calls 1: sys_write
40func e2e_send(s: *Tls13ClientSession, fd: i64, req: *u8, req_len: i64, out: *u8, out_cap: i64) -> i64
77func e2e_req(store: *TrustStore, req: *u8, req_len: i64, out: *u8, out_cap: i64) -> i64
106func read_cap(out: *u8, cap: i64) -> i64
118func build_post_cap(path: *u8, cap: *u8, body: *u8, out: *u8) -> i64
131func main() -> i64