code wiki / _hdl_build / nx_nofloat_serve_gate.nx

nx_nofloat_serve_gate.nx

buildroot/runtime/_hdl_build/nx_nofloat_serve_gate.nx

12550 B224 linesdepth 10pulls 30 transitivereach 0 importersview sourcekind gate/prooftopic nofloat
docsdependenciesstructsconstsfunctions

about

nx_nofloat_serve_gate.nx -- gates the no-float LLM serve CORE in-process (pure-core+gate+daemon idiom: no sockets here; synthetic HTTP requests straight into nsv_handle). Teeth: T1 GET /health -> 200 + ok:1 (init fail-fast worked; model + both caches live) T2 POST /gen "The capital of France is" (i32) -> 200 + READABLE " Paris. It is the" (real spaces -- the byte-level-BPE decode; raw pieces would read "GParis." with G-dot 0xC4 0xA0) T3 arbitrary second prompt -> 200 + gen_tokens>0 + NO 0xC4 0xA0 byte pair anywhere (decode total) T4 mode i8 on the France prompt -> 200 + contains "Paris" (fast mode serves) T5 GET /nope -> 404 (router honest) T8-T10 (2026-09-17, the prompt-length class, four pillars): nsv_prompt_admit refuses by BYTES, tk_bpe_encode_b refuses by capacity, and a prompt past the byte cap (T10a) or the token cap (T10b, more ids than NSV_MAXT held by the byte-sized ids buffer) answers 400 err 3 with the process alive; the pre-fix engine died in tk_rank_fast on both Requires /home/elderwesto/nx_stage/nx_real_model.gguf. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_nofloat_serve_core.nx nx_gate_verdict.nx nx_stage_path.nx nx_nofloat_serve_gate.nx

imports: nx_nofloat_serve_core.nxnx_gate_verdict.nxnx_stage_path.nx

imported by: nobody (leaf or entry point)

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

main sg_puts nsv_init sys_now_ms sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_clock_gettime_mono nsv_log sys_write ↻ nf_pool nx_pool_new nx_hw_worker_count nx_hw_cpu_count sys_mmap ↻ sys_munmap sys_mmap ↻ nx_chan_new sys_mmap ↻ _nx_chan_cell sys_thread_create nx_thread_spawn sys_mmap ↻ nx_thread_spawn_fn sys_mmap ↻ sys_mmap ↻ nsv_load_meta sys_mmap ↻

structs

none

consts

none

functions

17func sg_puts(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: sg_checkmain
18func sg_pn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} 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{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: main
19func sg_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 3: sg_hassg_reqmain
21func sg_has(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: sg_slen
34func sg_check(name: *u8, cond: i64) -> i64
called by 1: main calls 1: sg_puts
41func sg_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } d[p] = 0 as u8; return p }
called by 1: main
42func sg_catn(d: *u8, o: i64, v: i64) -> i64
called by 1: main
53func sg_req(req: *u8, resb: *u8) -> i64
called by 1: main calls 2: nsv_handlesg_slen
57func main() -> i64