code wiki / _hdl_build / nx_studio_gate_smoke.nx

nx_studio_gate_smoke.nx

buildroot/runtime/_hdl_build/nx_studio_gate_smoke.nx

7249 B130 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind smoketopic studio
docsdependenciesstructsconstsfunctions

about

nx_studio_gate_smoke.nx -- forks nx_studio_gate and drives it as a REAL HTTP client over a socket, proving the OPERATOR-ONLY gate end-to-end: register -> login -> GET /app[no token]=401 (THE GATE) -> GET /app[valid] =200+studio page -> GET /app[bad token]=401 -> GET /whoami[valid]=200. This is the gate-first safety proof (no content reachable without a valid OPAQUE session) that the prod cutover requires. Needs /tmp/nx_studio_gate.sov.elf built in the same WSL session. exit 0 = pass, N = assertion N failed.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_connect.nx nx_assert.nx nx_studio_gate_smoke.nx

imports: nx_syscalls.nxnx_connect.nxnx_assert.nx

imported by: nobody (leaf or entry point)

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

main smk_trunc sys_openat_wr sys_close sys_fork sys_mmap sys_execve sys_exit sys_sleep_ms sys_mmap ↻ sys_munmap smk_post smk_slen sys_mmap ↻ smk_http sys_socket sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap ↻ sys_mmap ↻ nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close ↻ sys_write sys_read nx_puts_err sys_write ↻ nx_puti_err sys_mmap ↻ sys_write ↻ smk_find nx_kill smk_get sys_wait4

structs

none

consts

9const SMK_MAGIC_32768: i64 = 32768
10const SMK_MAGIC_2048: i64 = 2048
11const SMK_MAGIC_32767: i64 = 32767
13const SMK_PORT: i64 = 18097
14const DAEMON_ELF: *u8 = "/tmp/nx_studio_gate.sov.elf" as *u8

functions

16func smk_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: smk_post
17func smk_find(buf: *u8, n: i64, needle: *u8, nl: i64) -> i64
called by 1: main
23func smk_trunc(path: *u8) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd>=0 { sys_close(fd) } return 0 }
called by 1: main calls 2: sys_openat_wrsys_close
25func smk_http(req: *u8, reqn: i64, resp: *u8, cap: i64) -> i64
38func smk_post(reqbuf: *u8, path: *u8, body: *u8) -> i64
called by 1: main calls 2: smk_slensys_mmap
50func smk_get(reqbuf: *u8, path: *u8, tok: *u8) -> i64
called by 1: main
64func main() -> i64