code wiki / _hdl_build / nx_studio_e2e_gate.nx

nx_studio_e2e_gate.nx

buildroot/runtime/_hdl_build/nx_studio_e2e_gate.nx

8620 B135 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic studio
docsdependenciesstructsconstsfunctions

about

nx_studio_e2e_gate.nx -- SOVEREIGN end-to-end gate for the capability-adaptive studio (no shells, no curl). Forks the real studio daemon (/tmp/nx_sitegen_studio_daemon.sov.elf -- build it --build-only first) and drives it over raw sovereign sockets (nx_http_client's sockaddr builder), exercising the WHOLE flow over real HTTP: the PICKER front door, each tier surface (guided/blocks/freeform), and POST /build through se_build_tier for each tier -- governed page out, incomplete refused, hostile field escaped. Proves the multi-tier WYSIWYG works end-to-end the sovereign way. Appends a CMSGATE row to knowledge/status/cms_gate.log on all-pass. PRE: ./_offc/nx_sov_build_run.elf nx_sitegen_studio_daemon --build-only (produces the .sov.elf forked here) license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_http_client.nx nx_connect.nx nx_syscalls.nx nx_studio_e2e_gate.nx

imports: nx_http_client.nxnx_connect.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_fork sys_mmap sys_execve sys_exit e_send sys_mmap ↻ nx_http_client_sockaddr_ip sys_socket nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close sys_write sys_read e_get ecat ehas efind erow ew sys_write ↻ sys_mmap ↻ sys_write ↻ e_post elen ecat ↻ enm sys_mmap ↻ ecatn ew ↻ sys_write ↻ ecat ↻ sys_openat_append sys_close ↻

structs

none

consts

13const E_PORT: i64 = 8101
14const E_DAEMON: *u8 = "/tmp/nx_sitegen_studio_daemon.sov.elf" as *u8

functions

16func ew(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: erowmain calls 1: sys_write
17func ecat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var k: i64=0; while s[k]!=(0 as u8){dst[o]=s[k];o=o+1;k=k+1} return o }
called by 3: e_gete_postmain
18func ecatn(dst: *u8, off: i64, s: *u8, n: i64) -> i64 { var o: i64=off; var k: i64=0; while k<n{dst[o]=s[k];o=o+1;k=k+1} return o }
called by 1: e_post
19func enm(dst: *u8, off: i64, v: i64) -> i64 { var o: i64=off; let t: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; 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{dst[o]=t[k-1-i];o=o+1;i=i+1} return o }
called by 1: e_post calls 1: sys_mmap
20func elen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: e_post
21func efind(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64
called by 1: ehas
27func ehas(buf: *u8, n: i64, s: *u8) -> i64 { var pl: i64=0; while s[pl]!=(0 as u8){pl=pl+1} if efind(buf,n,s,pl)>=0 { return 1 } return 0 }
called by 1: main calls 1: efind
28func erow(id: i64, ok: i64, what: *u8) -> i64 { ew("E2EROW " as *u8); let b: *u8=sys_mmap(8); b[0]=(48+id) as u8; sys_write(1,b,1); ew(" " as *u8); if ok==1 { ew("PASS " as *u8) } else { ew("FAIL " as *u8) } ew(what); ew("\n" as *u8); return ok }
called by 1: main calls 3: ewsys_mmapsys_write
30func e_send(reqbuf: *u8, reqlen: i64, resp: *u8, cap: i64) -> i64
45func e_get(req: *u8, path: *u8) -> i64
called by 1: main calls 1: ecat
50func e_post(req: *u8, path: *u8, body: *u8) -> i64
called by 1: main calls 4: elenecatenmecatn
59func main() -> i64