code wiki / _hdl_build / nx_studio_e2e_gate.nx
nx_studio_e2e_gate.nx
buildroot/runtime/_hdl_build/nx_studio_e2e_gate.nx
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
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
structs
| none |
consts
| 13 | const E_PORT: i64 = 8101 |
| 14 | const E_DAEMON: *u8 = "/tmp/nx_sitegen_studio_daemon.sov.elf" as *u8 |
functions
| 16 | func ew(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 17 | func 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 } |
| 18 | func 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 |
| 19 | func 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 } |
| 20 | func elen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: e_post |
| 21 | func efind(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64 called by 1: ehas |
| 27 | func 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 } |
| 28 | func 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 } |
| 30 | func e_send(reqbuf: *u8, reqlen: i64, resp: *u8, cap: i64) -> i64 called by 1: main calls 7: sys_mmapnx_http_client_sockaddr_ipv4sys_socketnx_connect_boundedsys_closesys_write+1 |
| 45 | func e_get(req: *u8, path: *u8) -> i64 |
| 50 | func e_post(req: *u8, path: *u8, body: *u8) -> i64 |
| 59 | func main() -> i64 |